Skip to content

Commit

Permalink
Feature: Enable dockablz to drag & drop tabs inside a window (#2669)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
BornToBeRoot authored Apr 8, 2024
1 parent b816b93 commit e336ec3
Show file tree
Hide file tree
Showing 86 changed files with 3,117 additions and 2,080 deletions.
2 changes: 1 addition & 1 deletion InnoSetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "NETworkManager"
#define MyAppVersion "2024.4.1.0"
#define MyAppVersion "2024.4.9.0"
#define MyAppPublisher "BornToBeRoot"
#define MyAppURL "https://github.com/BornToBeRoot/NETworkManager/"
#define MyAppExeName "NETworkManager.exe"
Expand Down
4 changes: 2 additions & 2 deletions Source/GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("2024.4.1.0")]
[assembly: AssemblyFileVersion("2024.4.1.0")]
[assembly: AssemblyVersion("2024.4.9.0")]
[assembly: AssemblyFileVersion("2024.4.9.0")]
309 changes: 280 additions & 29 deletions Source/NETworkManager.Settings/ConfigurationInfo.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NETworkManager.Models;
using System.Diagnostics;
using NETworkManager.Models;
using NETworkManager.Utilities;

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

/// <summary>
/// Full path of the application like "C:\Program Files\NETworkManager\NETworkManager.exe"
/// </summary>
public string ApplicationFullName { get; set; }
public string ApplicationFullName { get; }

/// <summary>
/// Application name like "NETworkManager".
/// </summary>
public string ApplicationName { get; set; }
public string ApplicationName { get; }

/// <summary>
/// Indicates if the application is running in portable mode.
/// </summary>
public bool IsPortable { get; set; }
public bool IsPortable { get; }

#endregion

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

/// <summary>
/// Indicates if Remote Desktop has tabs.
/// </summary>
public bool RemoteDesktopHasTabs { get; set; }
private int _ipScannerTabCount;
public int IPScannerTabCount
{
get => _ipScannerTabCount;
set
{
if (value == _ipScannerTabCount)
return;

/// <summary>
/// Indicates if PowerShell has tabs.
/// </summary>
public bool PowerShellHasTabs { get; set; }
_ipScannerTabCount = value;
OnPropertyChanged();
}
}

/// <summary>
/// Indicates if PuTTY has tabs.
/// </summary>
public bool PuTTYHasTabs { get; set; }
private int _portScannerTabCount;
public int PortScannerTabCount
{
get => _portScannerTabCount;
set
{
if (value == _portScannerTabCount)
return;

/// <summary>
/// Indicates if AWS Session Manager has tabs.
/// </summary>
public bool AWSSessionManagerHasTabs { get; set; }
_portScannerTabCount = value;
OnPropertyChanged();
}
}

/// <summary>
/// Indicates if TigerVNC has tabs.
/// </summary>
public bool TigerVNCHasTabs { get; set; }
private int _tracerouteTabCount;
public int TracerouteTabCount
{
get => _tracerouteTabCount;
set
{
if (value == _tracerouteTabCount)
return;

/// <summary>
/// Indicates if WebConsole has tabs.
/// </summary>
public bool WebConsoleHasTabs { get; set; }
_tracerouteTabCount = value;
OnPropertyChanged();
}
}

private int _dnsLookupTabCount;
public int DNSLookupTabCount
{
get => _dnsLookupTabCount;
set
{
if (value == _dnsLookupTabCount)
return;

_dnsLookupTabCount = value;
OnPropertyChanged();
}
}

private int _remoteDesktopTabCount;
public int RemoteDesktopTabCount
{
get => _remoteDesktopTabCount;
set
{
if (value == _remoteDesktopTabCount)
return;

_remoteDesktopTabCount = value;
OnPropertyChanged();
}
}

private bool _isRemoteDesktopWindowDragging;
public bool IsRemoteDesktopWindowDragging
{
get => _isRemoteDesktopWindowDragging;
set
{
if (value == _isRemoteDesktopWindowDragging)
return;

_isRemoteDesktopWindowDragging = value;
OnPropertyChanged();
}
}

private int _powerShellTabCount;
public int PowerShellTabCount
{
get => _powerShellTabCount;
set
{
if (value == _powerShellTabCount)
return;

_powerShellTabCount = value;
OnPropertyChanged();
}
}

private bool _isPowerShellWindowDragging;
public bool IsPowerShellWindowDragging
{
get => _isPowerShellWindowDragging;
set
{
if (value == _isPowerShellWindowDragging)
return;

_isPowerShellWindowDragging = value;
OnPropertyChanged();
}
}

private int _puTTYTabCount;
public int PuTTYTabCount
{
get => _puTTYTabCount;
set
{
if (value == _puTTYTabCount)
return;

_puTTYTabCount = value;
OnPropertyChanged();
}
}

private bool _isPuTTYWindowDragging;
public bool IsPuTTYWindowDragging
{
get => _isPuTTYWindowDragging;
set
{
if (value == _isPuTTYWindowDragging)
return;

_isPuTTYWindowDragging = value;
OnPropertyChanged();
}
}

private int _awsSessionManagerTabCount;
public int AWSSessionManagerTabCount
{
get => _awsSessionManagerTabCount;
set
{
if (value == _awsSessionManagerTabCount)
return;

_awsSessionManagerTabCount = value;
OnPropertyChanged();
}
}

private bool _isAWSSessionManagerWindowDragging;
public bool IsAWSSessionManagerWindowDragging
{
get => _isAWSSessionManagerWindowDragging;
set
{
if (value == _isAWSSessionManagerWindowDragging)
return;

_isAWSSessionManagerWindowDragging = value;
OnPropertyChanged();
}
}

private int _tigerVNCTabCount;
public int TigerVNCTabCount
{
get => _tigerVNCTabCount;
set
{
if (value == _tigerVNCTabCount)
return;

_tigerVNCTabCount = value;
OnPropertyChanged();
}
}

private bool _isTigerVNCWindowDragging;
public bool IsTigerVNCWindowDragging
{
get => _isTigerVNCWindowDragging;
set
{
if (value == _isTigerVNCWindowDragging)
return;

_isTigerVNCWindowDragging = value;
OnPropertyChanged();
}
}

private int _webConsoleTabCount;
public int WebConsoleTabCount
{
get => _webConsoleTabCount;
set
{
if (value == _webConsoleTabCount)
return;

_webConsoleTabCount = value;
OnPropertyChanged();
}
}

private bool _isWebConsoleWindowDragging;
public bool IsWebConsoleWindowDragging
{
get => _isWebConsoleWindowDragging;
set
{
if (value == _isWebConsoleWindowDragging)
return;

_isWebConsoleWindowDragging = value;
OnPropertyChanged();
}
}

private int _snmpTabCount;
public int SNMPTabCount
{
get => _snmpTabCount;
set
{
if (value == _snmpTabCount)
return;

_snmpTabCount = value;
OnPropertyChanged();
}
}

private int _sntpLookupTabCount;
public int SNTPLookupTabCount
{
get => _sntpLookupTabCount;
set
{
if (value == _sntpLookupTabCount)
return;

_sntpLookupTabCount = value;
OnPropertyChanged();
}
}

private int _whoisTabCount;
public int WhoisTabCount
{
get => _whoisTabCount;
set
{
if (value == _whoisTabCount)
return;

_whoisTabCount = value;
OnPropertyChanged();
}
}

private int _ipGeolocationTabCount;
public int IPGeolocationTabCount
{
get => _ipGeolocationTabCount;
set
{
if (value == _ipGeolocationTabCount)
return;

_ipGeolocationTabCount = value;
OnPropertyChanged();
}
}

/// <summary>
/// Private variable for <see cref="ProfileManagerIsEnabled" />.
Expand Down
14 changes: 7 additions & 7 deletions Source/NETworkManager.Settings/ConfigurationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static ConfigurationManager()
/// <summary>
/// Current <see cref="ConfigurationInfo" /> that is used in the application.
/// </summary>
public static ConfigurationInfo Current { get; set; }
public static ConfigurationInfo Current { get; }

/// <summary>
/// Method can be called before opening a dialog to fix airspace issues.
Expand All @@ -46,12 +46,12 @@ public static void OnDialogOpen()
{
switch (Current.CurrentApplication)
{
case ApplicationName.RemoteDesktop when Current.RemoteDesktopHasTabs:
case ApplicationName.PowerShell when Current.PowerShellHasTabs:
case ApplicationName.PuTTY when Current.PuTTYHasTabs:
case ApplicationName.AWSSessionManager when Current.AWSSessionManagerHasTabs:
case ApplicationName.TigerVNC when Current.TigerVNCHasTabs:
case ApplicationName.WebConsole when Current.WebConsoleHasTabs:
case ApplicationName.RemoteDesktop when Current.RemoteDesktopTabCount > 0:
case ApplicationName.PowerShell when Current.PowerShellTabCount > 0:
case ApplicationName.PuTTY when Current.PuTTYTabCount > 0:
case ApplicationName.AWSSessionManager when Current.AWSSessionManagerTabCount > 0:
case ApplicationName.TigerVNC when Current.TigerVNCTabCount > 0:
case ApplicationName.WebConsole when Current.WebConsoleTabCount > 0:
Current.FixAirspace = true;
break;
}
Expand Down
Loading

0 comments on commit e336ec3

Please sign in to comment.