Skip to content

Commit e336ec3

Browse files
authored
Feature: Enable dockablz to drag & drop tabs inside a window (#2669)
* Feature: Enable dockablz * Feature: Enable dockablz * Fix: Dragablz branch consolidation * Chore: Update module * Feature: Handle tab close and show add button * Chore: Add tab count * Chore: Cleanup * Feature: Parition & Close handler * Feature: Add Parition * Feature: Add Partition * Feature: Add close handler * Feature: Close handler * Fix: Tab count issues * Feature: Add dockablz * Feature: ContextMenu in dragged out / splitted tab * Fix: Update headers * Feature: Add interface to close tab * Chore: Upgrade dragablz * Feature: Hide embedded window while dragging * Feature: Focus embedded window based on the visual tree * Fix: Set IsDraggingWindowChanged for BranchTemplate TabablzControl * Docs: #2669
1 parent b816b93 commit e336ec3

File tree

86 files changed

+3117
-2080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3117
-2080
lines changed

InnoSetup.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "NETworkManager"
5-
#define MyAppVersion "2024.4.1.0"
5+
#define MyAppVersion "2024.4.9.0"
66
#define MyAppPublisher "BornToBeRoot"
77
#define MyAppURL "https://github.com/BornToBeRoot/NETworkManager/"
88
#define MyAppExeName "NETworkManager.exe"

Source/GlobalAssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
[assembly: AssemblyTrademark("")]
77
[assembly: AssemblyCulture("")]
88

9-
[assembly: AssemblyVersion("2024.4.1.0")]
10-
[assembly: AssemblyFileVersion("2024.4.1.0")]
9+
[assembly: AssemblyVersion("2024.4.9.0")]
10+
[assembly: AssemblyFileVersion("2024.4.9.0")]

Source/NETworkManager.Settings/ConfigurationInfo.cs

+280-29
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using NETworkManager.Models;
1+
using System.Diagnostics;
2+
using NETworkManager.Models;
23
using NETworkManager.Utilities;
34

45
namespace NETworkManager.Settings;
@@ -36,22 +37,22 @@ public ConfigurationInfo(bool isAdmin, string executionPath, string applicationF
3637
/// <summary>
3738
/// Execution path of the application like "C:\Program Files\NETworkManager".
3839
/// </summary>
39-
public string ExecutionPath { get; set; }
40+
public string ExecutionPath { get; }
4041

4142
/// <summary>
4243
/// Full path of the application like "C:\Program Files\NETworkManager\NETworkManager.exe"
4344
/// </summary>
44-
public string ApplicationFullName { get; set; }
45+
public string ApplicationFullName { get; }
4546

4647
/// <summary>
4748
/// Application name like "NETworkManager".
4849
/// </summary>
49-
public string ApplicationName { get; set; }
50+
public string ApplicationName { get; }
5051

5152
/// <summary>
5253
/// Indicates if the application is running in portable mode.
5354
/// </summary>
54-
public bool IsPortable { get; set; }
55+
public bool IsPortable { get; }
5556

5657
#endregion
5758

@@ -67,35 +68,285 @@ public ConfigurationInfo(bool isAdmin, string executionPath, string applicationF
6768
/// </summary>
6869
public ApplicationName CurrentApplication { get; set; } = Models.ApplicationName.None;
6970

70-
/// <summary>
71-
/// Indicates if Remote Desktop has tabs.
72-
/// </summary>
73-
public bool RemoteDesktopHasTabs { get; set; }
71+
private int _ipScannerTabCount;
72+
public int IPScannerTabCount
73+
{
74+
get => _ipScannerTabCount;
75+
set
76+
{
77+
if (value == _ipScannerTabCount)
78+
return;
7479

75-
/// <summary>
76-
/// Indicates if PowerShell has tabs.
77-
/// </summary>
78-
public bool PowerShellHasTabs { get; set; }
80+
_ipScannerTabCount = value;
81+
OnPropertyChanged();
82+
}
83+
}
7984

80-
/// <summary>
81-
/// Indicates if PuTTY has tabs.
82-
/// </summary>
83-
public bool PuTTYHasTabs { get; set; }
85+
private int _portScannerTabCount;
86+
public int PortScannerTabCount
87+
{
88+
get => _portScannerTabCount;
89+
set
90+
{
91+
if (value == _portScannerTabCount)
92+
return;
8493

85-
/// <summary>
86-
/// Indicates if AWS Session Manager has tabs.
87-
/// </summary>
88-
public bool AWSSessionManagerHasTabs { get; set; }
94+
_portScannerTabCount = value;
95+
OnPropertyChanged();
96+
}
97+
}
8998

90-
/// <summary>
91-
/// Indicates if TigerVNC has tabs.
92-
/// </summary>
93-
public bool TigerVNCHasTabs { get; set; }
99+
private int _tracerouteTabCount;
100+
public int TracerouteTabCount
101+
{
102+
get => _tracerouteTabCount;
103+
set
104+
{
105+
if (value == _tracerouteTabCount)
106+
return;
94107

95-
/// <summary>
96-
/// Indicates if WebConsole has tabs.
97-
/// </summary>
98-
public bool WebConsoleHasTabs { get; set; }
108+
_tracerouteTabCount = value;
109+
OnPropertyChanged();
110+
}
111+
}
112+
113+
private int _dnsLookupTabCount;
114+
public int DNSLookupTabCount
115+
{
116+
get => _dnsLookupTabCount;
117+
set
118+
{
119+
if (value == _dnsLookupTabCount)
120+
return;
121+
122+
_dnsLookupTabCount = value;
123+
OnPropertyChanged();
124+
}
125+
}
126+
127+
private int _remoteDesktopTabCount;
128+
public int RemoteDesktopTabCount
129+
{
130+
get => _remoteDesktopTabCount;
131+
set
132+
{
133+
if (value == _remoteDesktopTabCount)
134+
return;
135+
136+
_remoteDesktopTabCount = value;
137+
OnPropertyChanged();
138+
}
139+
}
140+
141+
private bool _isRemoteDesktopWindowDragging;
142+
public bool IsRemoteDesktopWindowDragging
143+
{
144+
get => _isRemoteDesktopWindowDragging;
145+
set
146+
{
147+
if (value == _isRemoteDesktopWindowDragging)
148+
return;
149+
150+
_isRemoteDesktopWindowDragging = value;
151+
OnPropertyChanged();
152+
}
153+
}
154+
155+
private int _powerShellTabCount;
156+
public int PowerShellTabCount
157+
{
158+
get => _powerShellTabCount;
159+
set
160+
{
161+
if (value == _powerShellTabCount)
162+
return;
163+
164+
_powerShellTabCount = value;
165+
OnPropertyChanged();
166+
}
167+
}
168+
169+
private bool _isPowerShellWindowDragging;
170+
public bool IsPowerShellWindowDragging
171+
{
172+
get => _isPowerShellWindowDragging;
173+
set
174+
{
175+
if (value == _isPowerShellWindowDragging)
176+
return;
177+
178+
_isPowerShellWindowDragging = value;
179+
OnPropertyChanged();
180+
}
181+
}
182+
183+
private int _puTTYTabCount;
184+
public int PuTTYTabCount
185+
{
186+
get => _puTTYTabCount;
187+
set
188+
{
189+
if (value == _puTTYTabCount)
190+
return;
191+
192+
_puTTYTabCount = value;
193+
OnPropertyChanged();
194+
}
195+
}
196+
197+
private bool _isPuTTYWindowDragging;
198+
public bool IsPuTTYWindowDragging
199+
{
200+
get => _isPuTTYWindowDragging;
201+
set
202+
{
203+
if (value == _isPuTTYWindowDragging)
204+
return;
205+
206+
_isPuTTYWindowDragging = value;
207+
OnPropertyChanged();
208+
}
209+
}
210+
211+
private int _awsSessionManagerTabCount;
212+
public int AWSSessionManagerTabCount
213+
{
214+
get => _awsSessionManagerTabCount;
215+
set
216+
{
217+
if (value == _awsSessionManagerTabCount)
218+
return;
219+
220+
_awsSessionManagerTabCount = value;
221+
OnPropertyChanged();
222+
}
223+
}
224+
225+
private bool _isAWSSessionManagerWindowDragging;
226+
public bool IsAWSSessionManagerWindowDragging
227+
{
228+
get => _isAWSSessionManagerWindowDragging;
229+
set
230+
{
231+
if (value == _isAWSSessionManagerWindowDragging)
232+
return;
233+
234+
_isAWSSessionManagerWindowDragging = value;
235+
OnPropertyChanged();
236+
}
237+
}
238+
239+
private int _tigerVNCTabCount;
240+
public int TigerVNCTabCount
241+
{
242+
get => _tigerVNCTabCount;
243+
set
244+
{
245+
if (value == _tigerVNCTabCount)
246+
return;
247+
248+
_tigerVNCTabCount = value;
249+
OnPropertyChanged();
250+
}
251+
}
252+
253+
private bool _isTigerVNCWindowDragging;
254+
public bool IsTigerVNCWindowDragging
255+
{
256+
get => _isTigerVNCWindowDragging;
257+
set
258+
{
259+
if (value == _isTigerVNCWindowDragging)
260+
return;
261+
262+
_isTigerVNCWindowDragging = value;
263+
OnPropertyChanged();
264+
}
265+
}
266+
267+
private int _webConsoleTabCount;
268+
public int WebConsoleTabCount
269+
{
270+
get => _webConsoleTabCount;
271+
set
272+
{
273+
if (value == _webConsoleTabCount)
274+
return;
275+
276+
_webConsoleTabCount = value;
277+
OnPropertyChanged();
278+
}
279+
}
280+
281+
private bool _isWebConsoleWindowDragging;
282+
public bool IsWebConsoleWindowDragging
283+
{
284+
get => _isWebConsoleWindowDragging;
285+
set
286+
{
287+
if (value == _isWebConsoleWindowDragging)
288+
return;
289+
290+
_isWebConsoleWindowDragging = value;
291+
OnPropertyChanged();
292+
}
293+
}
294+
295+
private int _snmpTabCount;
296+
public int SNMPTabCount
297+
{
298+
get => _snmpTabCount;
299+
set
300+
{
301+
if (value == _snmpTabCount)
302+
return;
303+
304+
_snmpTabCount = value;
305+
OnPropertyChanged();
306+
}
307+
}
308+
309+
private int _sntpLookupTabCount;
310+
public int SNTPLookupTabCount
311+
{
312+
get => _sntpLookupTabCount;
313+
set
314+
{
315+
if (value == _sntpLookupTabCount)
316+
return;
317+
318+
_sntpLookupTabCount = value;
319+
OnPropertyChanged();
320+
}
321+
}
322+
323+
private int _whoisTabCount;
324+
public int WhoisTabCount
325+
{
326+
get => _whoisTabCount;
327+
set
328+
{
329+
if (value == _whoisTabCount)
330+
return;
331+
332+
_whoisTabCount = value;
333+
OnPropertyChanged();
334+
}
335+
}
336+
337+
private int _ipGeolocationTabCount;
338+
public int IPGeolocationTabCount
339+
{
340+
get => _ipGeolocationTabCount;
341+
set
342+
{
343+
if (value == _ipGeolocationTabCount)
344+
return;
345+
346+
_ipGeolocationTabCount = value;
347+
OnPropertyChanged();
348+
}
349+
}
99350

100351
/// <summary>
101352
/// Private variable for <see cref="ProfileManagerIsEnabled" />.

Source/NETworkManager.Settings/ConfigurationManager.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static ConfigurationManager()
3636
/// <summary>
3737
/// Current <see cref="ConfigurationInfo" /> that is used in the application.
3838
/// </summary>
39-
public static ConfigurationInfo Current { get; set; }
39+
public static ConfigurationInfo Current { get; }
4040

4141
/// <summary>
4242
/// Method can be called before opening a dialog to fix airspace issues.
@@ -46,12 +46,12 @@ public static void OnDialogOpen()
4646
{
4747
switch (Current.CurrentApplication)
4848
{
49-
case ApplicationName.RemoteDesktop when Current.RemoteDesktopHasTabs:
50-
case ApplicationName.PowerShell when Current.PowerShellHasTabs:
51-
case ApplicationName.PuTTY when Current.PuTTYHasTabs:
52-
case ApplicationName.AWSSessionManager when Current.AWSSessionManagerHasTabs:
53-
case ApplicationName.TigerVNC when Current.TigerVNCHasTabs:
54-
case ApplicationName.WebConsole when Current.WebConsoleHasTabs:
49+
case ApplicationName.RemoteDesktop when Current.RemoteDesktopTabCount > 0:
50+
case ApplicationName.PowerShell when Current.PowerShellTabCount > 0:
51+
case ApplicationName.PuTTY when Current.PuTTYTabCount > 0:
52+
case ApplicationName.AWSSessionManager when Current.AWSSessionManagerTabCount > 0:
53+
case ApplicationName.TigerVNC when Current.TigerVNCTabCount > 0:
54+
case ApplicationName.WebConsole when Current.WebConsoleTabCount > 0:
5555
Current.FixAirspace = true;
5656
break;
5757
}

0 commit comments

Comments
 (0)