mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
revised sort button in connection tree to be able to sort in both orders, fixes #1434
This commit is contained in:
@@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
## [Unreleased]
|
||||
### Added
|
||||
- #1512: Added option to close panel from right click menu
|
||||
- #1434: Revised sort button in connection tree to be able to sort in both orders
|
||||
- #1400: Added file download handling to HTTP(S) connections using Gecko
|
||||
- #826: Allow selecting RDP version to use when connecting
|
||||
### Changed
|
||||
|
||||
14
mRemoteV1/UI/Window/ConnectionTreeWindow.Designer.cs
generated
14
mRemoteV1/UI/Window/ConnectionTreeWindow.Designer.cs
generated
@@ -6,7 +6,7 @@
|
||||
internal System.Windows.Forms.MenuStrip msMain;
|
||||
internal System.Windows.Forms.ToolStripMenuItem mMenViewExpandAllFolders;
|
||||
internal System.Windows.Forms.ToolStripMenuItem mMenViewCollapseAllFolders;
|
||||
internal System.Windows.Forms.ToolStripMenuItem mMenSortAscending;
|
||||
internal System.Windows.Forms.ToolStripMenuItem mMenSort;
|
||||
internal System.Windows.Forms.ToolStripMenuItem mMenAddConnection;
|
||||
internal System.Windows.Forms.ToolStripMenuItem mMenAddFolder;
|
||||
public System.Windows.Forms.TreeView tvConnections;
|
||||
@@ -23,7 +23,7 @@
|
||||
this.mMenAddFolder = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mMenViewExpandAllFolders = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mMenViewCollapseAllFolders = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mMenSortAscending = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mMenSort = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mMenFavorites = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components);
|
||||
this.pbSearch = new mRemoteNG.UI.Controls.Base.NGPictureBox(this.components);
|
||||
@@ -77,7 +77,7 @@
|
||||
this.mMenAddFolder,
|
||||
this.mMenViewExpandAllFolders,
|
||||
this.mMenViewCollapseAllFolders,
|
||||
this.mMenSortAscending,
|
||||
this.mMenSort,
|
||||
this.mMenFavorites});
|
||||
this.msMain.Location = new System.Drawing.Point(0, 0);
|
||||
this.msMain.Name = "msMain";
|
||||
@@ -122,10 +122,10 @@
|
||||
//
|
||||
// mMenSortAscending
|
||||
//
|
||||
this.mMenSortAscending.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.mMenSortAscending.Image = global::mRemoteNG.Resources.Sort_AZ;
|
||||
this.mMenSortAscending.Name = "mMenSortAscending";
|
||||
this.mMenSortAscending.Size = new System.Drawing.Size(28, 20);
|
||||
this.mMenSort.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.mMenSort.Image = global::mRemoteNG.Resources.Sort_AZ;
|
||||
this.mMenSort.Name = "mMenSort";
|
||||
this.mMenSort.Size = new System.Drawing.Size(28, 20);
|
||||
//
|
||||
// mMenFavorites
|
||||
//
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
private readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
private ThemeManager _themeManager;
|
||||
private bool sortedAz = true;
|
||||
|
||||
public ConnectionInfo SelectedNode => olvConnections.SelectedNode;
|
||||
|
||||
@@ -89,7 +90,7 @@ namespace mRemoteNG.UI.Window
|
||||
mMenAddFolder.ToolTipText = Language.strAddFolder;
|
||||
mMenViewExpandAllFolders.ToolTipText = Language.strExpandAllFolders;
|
||||
mMenViewCollapseAllFolders.ToolTipText = Language.strCollapseAllFolders;
|
||||
mMenSortAscending.ToolTipText = Language.strSortAsc;
|
||||
mMenSort.ToolTipText = Language.strSort;
|
||||
mMenFavorites.ToolTipText = Language.Favorites;
|
||||
|
||||
txtSearch.Text = Language.strSearchPrompt;
|
||||
@@ -199,7 +200,21 @@ namespace mRemoteNG.UI.Window
|
||||
olvConnections.CollapseAll();
|
||||
olvConnections.Expand(olvConnections.GetRootConnectionNode());
|
||||
};
|
||||
mMenSortAscending.Click += (sender, args) => olvConnections.SortRecursive(olvConnections.GetRootConnectionNode(), ListSortDirection.Ascending);
|
||||
mMenSort.Click += (sender, args) =>
|
||||
{
|
||||
if (sortedAz)
|
||||
{
|
||||
olvConnections.SortRecursive(olvConnections.GetRootConnectionNode(), ListSortDirection.Ascending);
|
||||
mMenSort.Image = mRemoteNG.Resources.Sort_ZA;
|
||||
sortedAz = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
olvConnections.SortRecursive(olvConnections.GetRootConnectionNode(), ListSortDirection.Descending);
|
||||
mMenSort.Image = mRemoteNG.Resources.Sort_AZ;
|
||||
sortedAz = true;
|
||||
}
|
||||
};
|
||||
mMenFavorites.Click += (sender, args) =>
|
||||
{
|
||||
mMenFavorites.DropDownItems.Clear();
|
||||
|
||||
2
mRemoteV1/UI/Window/PortScanWindow.Designer.cs
generated
2
mRemoteV1/UI/Window/PortScanWindow.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
|
||||
|
||||
using mRemoteNG.Themes;
|
||||
using mRemoteNG.UI.Controls;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user