mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
open credential manager from connection tree window
This commit is contained in:
11
mRemoteNG/UI/Window/ConnectionTreeWindow.Designer.cs
generated
11
mRemoteNG/UI/Window/ConnectionTreeWindow.Designer.cs
generated
@@ -29,6 +29,7 @@ namespace mRemoteNG.UI.Window
|
|||||||
this.mMenViewCollapseAllFolders = new System.Windows.Forms.ToolStripMenuItem();
|
this.mMenViewCollapseAllFolders = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.mMenSort = new System.Windows.Forms.ToolStripMenuItem();
|
this.mMenSort = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.mMenFavorites = new System.Windows.Forms.ToolStripMenuItem();
|
this.mMenFavorites = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.mMenCredentials = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components);
|
this.vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components);
|
||||||
this.pbSearch = new MrngPictureBox(this.components);
|
this.pbSearch = new MrngPictureBox(this.components);
|
||||||
this.txtSearch = new mRemoteNG.UI.Controls.MrngSearchBox();
|
this.txtSearch = new mRemoteNG.UI.Controls.MrngSearchBox();
|
||||||
@@ -82,6 +83,7 @@ namespace mRemoteNG.UI.Window
|
|||||||
this.mMenViewExpandAllFolders,
|
this.mMenViewExpandAllFolders,
|
||||||
this.mMenViewCollapseAllFolders,
|
this.mMenViewCollapseAllFolders,
|
||||||
this.mMenSort,
|
this.mMenSort,
|
||||||
|
this.mMenCredentials,
|
||||||
this.mMenFavorites});
|
this.mMenFavorites});
|
||||||
this.msMain.Location = new System.Drawing.Point(0, 0);
|
this.msMain.Location = new System.Drawing.Point(0, 0);
|
||||||
this.msMain.Name = "msMain";
|
this.msMain.Name = "msMain";
|
||||||
@@ -139,6 +141,14 @@ namespace mRemoteNG.UI.Window
|
|||||||
this.mMenFavorites.Size = new System.Drawing.Size(28, 20);
|
this.mMenFavorites.Size = new System.Drawing.Size(28, 20);
|
||||||
this.mMenFavorites.Text = "Favorites";
|
this.mMenFavorites.Text = "Favorites";
|
||||||
//
|
//
|
||||||
|
// mMenCredentials
|
||||||
|
//
|
||||||
|
this.mMenCredentials.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.mMenCredentials.Image = global::mRemoteNG.Properties.Resources.Key_16x;
|
||||||
|
this.mMenCredentials.Name = "mMenCredentials";
|
||||||
|
this.mMenCredentials.Size = new System.Drawing.Size(28, 20);
|
||||||
|
this.mMenCredentials.Text = "Credentials";
|
||||||
|
//
|
||||||
// vsToolStripExtender
|
// vsToolStripExtender
|
||||||
//
|
//
|
||||||
this.vsToolStripExtender.DefaultRenderer = null;
|
this.vsToolStripExtender.DefaultRenderer = null;
|
||||||
@@ -219,5 +229,6 @@ namespace mRemoteNG.UI.Window
|
|||||||
internal Controls.MrngSearchBox txtSearch;
|
internal Controls.MrngSearchBox txtSearch;
|
||||||
public System.Windows.Forms.TableLayoutPanel searchBoxLayoutPanel;
|
public System.Windows.Forms.TableLayoutPanel searchBoxLayoutPanel;
|
||||||
internal System.Windows.Forms.ToolStripMenuItem mMenFavorites;
|
internal System.Windows.Forms.ToolStripMenuItem mMenFavorites;
|
||||||
|
internal System.Windows.Forms.ToolStripMenuItem mMenCredentials;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,12 +8,15 @@ using mRemoteNG.App;
|
|||||||
using mRemoteNG.Config.Connections;
|
using mRemoteNG.Config.Connections;
|
||||||
using mRemoteNG.Connection;
|
using mRemoteNG.Connection;
|
||||||
using mRemoteNG.Container;
|
using mRemoteNG.Container;
|
||||||
|
using mRemoteNG.Credential;
|
||||||
using mRemoteNG.Properties;
|
using mRemoteNG.Properties;
|
||||||
using mRemoteNG.Themes;
|
using mRemoteNG.Themes;
|
||||||
using mRemoteNG.Tree;
|
using mRemoteNG.Tree;
|
||||||
using mRemoteNG.Tree.ClickHandlers;
|
using mRemoteNG.Tree.ClickHandlers;
|
||||||
using mRemoteNG.Tree.Root;
|
using mRemoteNG.Tree.Root;
|
||||||
using mRemoteNG.UI.Controls.ConnectionTree;
|
using mRemoteNG.UI.Controls.ConnectionTree;
|
||||||
|
using mRemoteNG.UI.Forms;
|
||||||
|
using mRemoteNG.UI.Forms.CredentialManager;
|
||||||
using mRemoteNG.UI.TaskDialog;
|
using mRemoteNG.UI.TaskDialog;
|
||||||
using WeifenLuo.WinFormsUI.Docking;
|
using WeifenLuo.WinFormsUI.Docking;
|
||||||
|
|
||||||
@@ -31,6 +34,10 @@ namespace mRemoteNG.UI.Window
|
|||||||
|
|
||||||
public ConnectionTree ConnectionTree { get; set; }
|
public ConnectionTree ConnectionTree { get; set; }
|
||||||
|
|
||||||
|
public CredentialService CredentialService { get; set; } = Runtime.CredentialService;
|
||||||
|
|
||||||
|
public UnlockerFormFactory UnlockerFormFactory { get; set; } = new UnlockerFormFactory();
|
||||||
|
|
||||||
public ConnectionTreeWindow() : this(new DockContent())
|
public ConnectionTreeWindow() : this(new DockContent())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -91,6 +98,7 @@ namespace mRemoteNG.UI.Window
|
|||||||
mMenViewCollapseAllFolders.ToolTipText = Language.CollapseAllFolders;
|
mMenViewCollapseAllFolders.ToolTipText = Language.CollapseAllFolders;
|
||||||
mMenSort.ToolTipText = Language.Sort;
|
mMenSort.ToolTipText = Language.Sort;
|
||||||
mMenFavorites.ToolTipText = Language.Favorites;
|
mMenFavorites.ToolTipText = Language.Favorites;
|
||||||
|
mMenCredentials.ToolTipText = Language.Credentials;
|
||||||
|
|
||||||
txtSearch.Text = Language.SearchPrompt;
|
txtSearch.Text = Language.SearchPrompt;
|
||||||
}
|
}
|
||||||
@@ -231,6 +239,11 @@ namespace mRemoteNG.UI.Window
|
|||||||
mMenFavorites.DropDownItems.AddRange(favoritesList.ToArray());
|
mMenFavorites.DropDownItems.AddRange(favoritesList.ToArray());
|
||||||
mMenFavorites.ShowDropDown();
|
mMenFavorites.ShowDropDown();
|
||||||
};
|
};
|
||||||
|
mMenCredentials.Click += (sender, args) =>
|
||||||
|
{
|
||||||
|
var credentialManagerForm = new CredentialManagerForm(CredentialService, UnlockerFormFactory);
|
||||||
|
credentialManagerForm.ShowDialog();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FavoriteMenuItem_MouseUp(object sender, MouseEventArgs e)
|
private void FavoriteMenuItem_MouseUp(object sender, MouseEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user