mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge remote-tracking branch 'refs/remotes/origin/develop' into release_channels
This commit is contained in:
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@@ -5,11 +5,7 @@ node('windows') {
|
||||
def vsExtensionsDir = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow"
|
||||
|
||||
stage 'Checkout Branch'
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: scm.branches,
|
||||
userRemoteConfigs: scm.userRemoteConfigs
|
||||
])
|
||||
checkout scm
|
||||
|
||||
stage 'Restore NuGet Packages'
|
||||
def nugetPath = "C:\\nuget.exe"
|
||||
|
||||
18
README.MD
18
README.MD
@@ -1,16 +1,20 @@
|
||||
# Welcome to the mRemoteNG project!
|
||||
|
||||
[](https://twitter.com/intent/follow?screen_name=mRemoteNG)
|
||||
|
||||
|
||||
[](https://gitter.im/mRemoteNG/PublicChat)
|
||||
|
||||
[](https://www.paypal.me/DavidSparer)
|
||||
|
||||
[](http://ec2-52-39-111-114.us-west-2.compute.amazonaws.com:8080/job/mRemoteNG/job/mRemoteNG/job/develop/)
|
||||
[](https://waffle.io/mRemoteNG/mRemoteNG)
|
||||
[](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.74)
|
||||
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/529)
|
||||
|
||||
[](https://waffle.io/mRemoteNG/mRemoteNG)
|
||||
|
||||
| Update Channel | Build Status | Downloads |
|
||||
| ---------------|--------------|-----------|
|
||||
| Stable | [](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/master/) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.74) |
|
||||
| Beta | [](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/beta_channel/) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.75Beta3) |
|
||||
| Development | [](https://jenkins.mremoteng.org/job/mRemoteNG/job/mRemoteNG/job/develop/) | - |
|
||||
|
||||
|
||||
|
||||
mRemoteNG is the next generation of mRemote, a full-featured, multi-tab remote connections manager.
|
||||
|
||||
|
||||
@@ -8,24 +8,23 @@ using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
public class CompatibilityChecker
|
||||
public static class CompatibilityChecker
|
||||
{
|
||||
public void CheckCompatibility()
|
||||
public static void CheckCompatibility()
|
||||
{
|
||||
CheckFipsPolicy();
|
||||
CheckLenovoAutoScrollUtility();
|
||||
}
|
||||
|
||||
private void CheckFipsPolicy()
|
||||
private static void CheckFipsPolicy()
|
||||
{
|
||||
if (FipsPolicyEnabledForServer2003() || FipsPolicyEnabledForServer2008AndNewer())
|
||||
{
|
||||
MessageBox.Show(frmMain.Default, string.Format(Language.strErrorFipsPolicyIncompatible, GeneralAppInfo.ProductName, GeneralAppInfo.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error));
|
||||
Environment.Exit(1);
|
||||
}
|
||||
Logger.Instance.InfoFormat("Checking FIPS Policy...");
|
||||
if (!FipsPolicyEnabledForServer2003() && !FipsPolicyEnabledForServer2008AndNewer()) return;
|
||||
MessageBox.Show(frmMain.Default, string.Format(Language.strErrorFipsPolicyIncompatible, GeneralAppInfo.ProductName, GeneralAppInfo.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error));
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
private bool FipsPolicyEnabledForServer2003()
|
||||
private static bool FipsPolicyEnabledForServer2003()
|
||||
{
|
||||
var regKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa");
|
||||
var fipsPolicy = regKey?.GetValue("FIPSAlgorithmPolicy");
|
||||
@@ -34,7 +33,7 @@ namespace mRemoteNG.App
|
||||
return (int)fipsPolicy != 0;
|
||||
}
|
||||
|
||||
private bool FipsPolicyEnabledForServer2008AndNewer()
|
||||
private static bool FipsPolicyEnabledForServer2008AndNewer()
|
||||
{
|
||||
var regKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa\\FIPSAlgorithmPolicy");
|
||||
var fipsPolicy = regKey?.GetValue("Enabled");
|
||||
@@ -43,12 +42,14 @@ namespace mRemoteNG.App
|
||||
return (int)fipsPolicy != 0;
|
||||
}
|
||||
|
||||
private void CheckLenovoAutoScrollUtility()
|
||||
private static void CheckLenovoAutoScrollUtility()
|
||||
{
|
||||
Logger.Instance.InfoFormat("Checking Lenovo AutoScroll Utility...");
|
||||
|
||||
if (!Settings.Default.CompatibilityWarnLenovoAutoScrollUtility)
|
||||
return;
|
||||
|
||||
Process[] proccesses = new Process[] { };
|
||||
var proccesses = new Process[] { };
|
||||
try
|
||||
{
|
||||
proccesses = Process.GetProcessesByName("virtscrl");
|
||||
@@ -58,12 +59,10 @@ namespace mRemoteNG.App
|
||||
Runtime.MessageCollector.AddExceptionMessage("Error in CheckLenovoAutoScrollUtility", ex);
|
||||
}
|
||||
|
||||
if (proccesses.Length > 0)
|
||||
{
|
||||
CTaskDialog.MessageBox(Application.ProductName, Language.strCompatibilityProblemDetected, string.Format(Language.strCompatibilityLenovoAutoScrollUtilityDetected, Application.ProductName), "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.Ok, ESysIcons.Warning, ESysIcons.Warning);
|
||||
if (CTaskDialog.VerificationChecked)
|
||||
Settings.Default.CompatibilityWarnLenovoAutoScrollUtility = false;
|
||||
}
|
||||
if (proccesses.Length <= 0) return;
|
||||
CTaskDialog.MessageBox(Application.ProductName, Language.strCompatibilityProblemDetected, string.Format(Language.strCompatibilityLenovoAutoScrollUtilityDetected, Application.ProductName), "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.Ok, ESysIcons.Warning, ESysIcons.Warning);
|
||||
if (CTaskDialog.VerificationChecked)
|
||||
Settings.Default.CompatibilityWarnLenovoAutoScrollUtility = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,14 +22,12 @@ namespace mRemoteNG.App
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
private CompatibilityChecker _compatibilityChecker;
|
||||
private AppUpdater _appUpdate;
|
||||
|
||||
public static Startup Instance { get; } = new Startup();
|
||||
|
||||
private Startup()
|
||||
{
|
||||
_compatibilityChecker = new CompatibilityChecker();
|
||||
_appUpdate = new AppUpdater();
|
||||
}
|
||||
|
||||
@@ -41,12 +39,12 @@ namespace mRemoteNG.App
|
||||
{
|
||||
Debug.Print("---------------------------" + Environment.NewLine + "[START] - " + Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture));
|
||||
LogStartupData();
|
||||
_compatibilityChecker.CheckCompatibility();
|
||||
CompatibilityChecker.CheckCompatibility();
|
||||
ParseCommandLineArgs();
|
||||
IeBrowserEmulation.Register();
|
||||
GetConnectionIcons();
|
||||
DefaultConnectionInfo.Instance.LoadFrom(Settings.Default, (a)=>"ConDefault"+a);
|
||||
DefaultConnectionInheritance.Instance.LoadFrom(Settings.Default, (a)=>"InhDefault"+a);
|
||||
DefaultConnectionInfo.Instance.LoadFrom(Settings.Default, a=>"ConDefault"+a);
|
||||
DefaultConnectionInheritance.Instance.LoadFrom(Settings.Default, a=>"InhDefault"+a);
|
||||
}
|
||||
|
||||
public void SetDefaultLayout()
|
||||
@@ -67,23 +65,23 @@ namespace mRemoteNG.App
|
||||
frmMain.Default.pnlDock.Visible = true;
|
||||
}
|
||||
|
||||
private void GetConnectionIcons()
|
||||
private static void GetConnectionIcons()
|
||||
{
|
||||
string iPath = GeneralAppInfo.HomePath + "\\Icons\\";
|
||||
var iPath = GeneralAppInfo.HomePath + "\\Icons\\";
|
||||
if (Directory.Exists(iPath) == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (string f in Directory.GetFiles(iPath, "*.ico", SearchOption.AllDirectories))
|
||||
foreach (var f in Directory.GetFiles(iPath, "*.ico", SearchOption.AllDirectories))
|
||||
{
|
||||
FileInfo fInfo = new FileInfo(f);
|
||||
var fInfo = new FileInfo(f);
|
||||
Array.Resize(ref ConnectionIcon.Icons, ConnectionIcon.Icons.Length + 1);
|
||||
ConnectionIcon.Icons.SetValue(fInfo.Name.Replace(".ico", ""), ConnectionIcon.Icons.Length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void LogStartupData()
|
||||
private static void LogStartupData()
|
||||
{
|
||||
if (!Settings.Default.WriteLogFile) return;
|
||||
LogApplicationData();
|
||||
@@ -93,17 +91,17 @@ namespace mRemoteNG.App
|
||||
LogCultureData();
|
||||
}
|
||||
|
||||
private void LogSystemData()
|
||||
private static void LogSystemData()
|
||||
{
|
||||
string osData = GetOperatingSystemData();
|
||||
string architecture = GetArchitectureData();
|
||||
var osData = GetOperatingSystemData();
|
||||
var architecture = GetArchitectureData();
|
||||
Logger.Instance.InfoFormat(string.Join(" ", Array.FindAll(new[] { osData, architecture }, s => !string.IsNullOrEmpty(Convert.ToString(s)))));
|
||||
}
|
||||
|
||||
private string GetOperatingSystemData()
|
||||
private static string GetOperatingSystemData()
|
||||
{
|
||||
string osVersion = string.Empty;
|
||||
string servicePack = string.Empty;
|
||||
var osVersion = string.Empty;
|
||||
var servicePack = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
@@ -118,13 +116,13 @@ namespace mRemoteNG.App
|
||||
{
|
||||
Logger.Instance.WarnFormat($"Error retrieving operating system information from WMI. {ex.Message}");
|
||||
}
|
||||
string osData = string.Join(" ", new string[] { osVersion, servicePack });
|
||||
var osData = string.Join(" ", new string[] { osVersion, servicePack });
|
||||
return osData;
|
||||
}
|
||||
|
||||
private string GetOSServicePack(string servicePack, ManagementObject managementObject)
|
||||
private static string GetOSServicePack(string servicePack, ManagementObject managementObject)
|
||||
{
|
||||
int servicePackNumber = Convert.ToInt32(managementObject.GetPropertyValue("ServicePackMajorVersion"));
|
||||
var servicePackNumber = Convert.ToInt32(managementObject.GetPropertyValue("ServicePackMajorVersion"));
|
||||
if (servicePackNumber != 0)
|
||||
{
|
||||
servicePack = $"Service Pack {servicePackNumber}";
|
||||
@@ -132,15 +130,15 @@ namespace mRemoteNG.App
|
||||
return servicePack;
|
||||
}
|
||||
|
||||
private string GetArchitectureData()
|
||||
private static string GetArchitectureData()
|
||||
{
|
||||
string architecture = string.Empty;
|
||||
var architecture = string.Empty;
|
||||
try
|
||||
{
|
||||
foreach (var o in new ManagementObjectSearcher("SELECT * FROM Win32_Processor WHERE DeviceID=\'CPU0\'").Get())
|
||||
{
|
||||
var managementObject = (ManagementObject) o;
|
||||
int addressWidth = Convert.ToInt32(managementObject.GetPropertyValue("AddressWidth"));
|
||||
var addressWidth = Convert.ToInt32(managementObject.GetPropertyValue("AddressWidth"));
|
||||
architecture = $"{addressWidth}-bit";
|
||||
}
|
||||
}
|
||||
@@ -151,7 +149,7 @@ namespace mRemoteNG.App
|
||||
return architecture;
|
||||
}
|
||||
|
||||
private void LogApplicationData()
|
||||
private static void LogApplicationData()
|
||||
{
|
||||
#if !PORTABLE
|
||||
Logger.Instance.InfoFormat($"{Application.ProductName} {Application.ProductVersion} starting.");
|
||||
@@ -161,17 +159,17 @@ namespace mRemoteNG.App
|
||||
#endif
|
||||
}
|
||||
|
||||
private void LogCmdLineArgs()
|
||||
private static void LogCmdLineArgs()
|
||||
{
|
||||
Logger.Instance.InfoFormat($"Command Line: {Environment.GetCommandLineArgs()}");
|
||||
}
|
||||
|
||||
private void LogCLRData()
|
||||
private static void LogCLRData()
|
||||
{
|
||||
Logger.Instance.InfoFormat($"Microsoft .NET CLR {Environment.Version}");
|
||||
}
|
||||
|
||||
private void LogCultureData()
|
||||
private static void LogCultureData()
|
||||
{
|
||||
Logger.Instance.InfoFormat(
|
||||
$"System Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}");
|
||||
@@ -197,7 +195,7 @@ namespace mRemoteNG.App
|
||||
return;
|
||||
}
|
||||
|
||||
DateTime nextUpdateCheck = Convert.ToDateTime(Settings.Default.CheckForUpdatesLastCheck.Add(TimeSpan.FromDays(Convert.ToDouble(Settings.Default.CheckForUpdatesFrequencyDays))));
|
||||
var nextUpdateCheck = Convert.ToDateTime(Settings.Default.CheckForUpdatesLastCheck.Add(TimeSpan.FromDays(Convert.ToDouble(Settings.Default.CheckForUpdatesFrequencyDays))));
|
||||
if (!Settings.Default.UpdatePending && DateTime.UtcNow < nextUpdateCheck)
|
||||
{
|
||||
return;
|
||||
@@ -240,13 +238,13 @@ namespace mRemoteNG.App
|
||||
}
|
||||
|
||||
|
||||
private void ParseCommandLineArgs()
|
||||
private static void ParseCommandLineArgs()
|
||||
{
|
||||
try
|
||||
{
|
||||
CmdArgumentsInterpreter cmd = new CmdArgumentsInterpreter(Environment.GetCommandLineArgs());
|
||||
var cmd = new CmdArgumentsInterpreter(Environment.GetCommandLineArgs());
|
||||
|
||||
string ConsParam = "";
|
||||
var ConsParam = "";
|
||||
if (cmd["cons"] != null)
|
||||
{
|
||||
ConsParam = "cons";
|
||||
@@ -256,7 +254,7 @@ namespace mRemoteNG.App
|
||||
ConsParam = "c";
|
||||
}
|
||||
|
||||
string ResetPosParam = "";
|
||||
var ResetPosParam = "";
|
||||
if (cmd["resetpos"] != null)
|
||||
{
|
||||
ResetPosParam = "resetpos";
|
||||
@@ -266,7 +264,7 @@ namespace mRemoteNG.App
|
||||
ResetPosParam = "rp";
|
||||
}
|
||||
|
||||
string ResetPanelsParam = "";
|
||||
var ResetPanelsParam = "";
|
||||
if (cmd["resetpanels"] != null)
|
||||
{
|
||||
ResetPanelsParam = "resetpanels";
|
||||
@@ -276,7 +274,7 @@ namespace mRemoteNG.App
|
||||
ResetPanelsParam = "rpnl";
|
||||
}
|
||||
|
||||
string ResetToolbarsParam = "";
|
||||
var ResetToolbarsParam = "";
|
||||
if (cmd["resettoolbar"] != null)
|
||||
{
|
||||
ResetToolbarsParam = "resettoolbar";
|
||||
@@ -293,7 +291,7 @@ namespace mRemoteNG.App
|
||||
ResetToolbarsParam = "rtbr";
|
||||
}
|
||||
|
||||
string NoReconnectParam = "";
|
||||
var NoReconnectParam = "";
|
||||
if (cmd["noreconnect"] != null)
|
||||
{
|
||||
NoReconnectParam = "noreconnect";
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
// check/continue here so we don't create empty connection objects
|
||||
if(!_importSubOU) continue;
|
||||
|
||||
ActiveDirectoryImporter.Import(ldapResult.Path, parentContainer);
|
||||
ActiveDirectoryImporter.Import(ldapResult.Path, parentContainer, _importSubOU);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,60 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head>
|
||||
<title>Quick Connect</title>
|
||||
<link href="Main.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>
|
||||
Sorry, not yet...</p>
|
||||
|
||||
</body>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head>
|
||||
<title>Quick Connect</title>
|
||||
<link href="Main.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>
|
||||
The Quick Connect functionality of mRemoteNG allows you to quickly connect to a remote host using a variety of network protocols.
|
||||
</p>
|
||||
|
||||
<p class="heading1">
|
||||
Use Cases
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The primary use case for Quick Connect is to connect to remote hosts when you already remember the DNS hostname/IP address and the appropriate protocol for the connection.
|
||||
<br />
|
||||
<br />
|
||||
An additional use case is to connect to remote hosts saved as a connection quickly.
|
||||
</p>
|
||||
|
||||
<p class="heading1">
|
||||
Prerequisites
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Knowledge of a DNS host name or IP address</li>
|
||||
<li>Knowledge of an appropriate protocol to communicate with remote host</li>
|
||||
</ul>
|
||||
<p> OR </p>
|
||||
<ul>
|
||||
<li>A predefined mRemoteNG connection</li>
|
||||
</ul>
|
||||
|
||||
<p class="heading1">
|
||||
Using QuickConnect
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To use Quick Connect, ensure the Quick Connect toolbar is enabled by selecting <b>View</b> and then <b>Quick Connect Toolbar</b>.
|
||||
<br />
|
||||
Next, input a DNS host name or IP address into the box labeled "Connect". This box will also save previous entries during your session.
|
||||
<br />
|
||||
<img alt="Quick Connect Toolbar" src="Screenshots/Quick Connect/01.png" />
|
||||
<br />
|
||||
<br />
|
||||
<img alt="Quick Connect Toolbar" src="Screenshots/Quick Connect/02.png" />
|
||||
<br />
|
||||
<br />
|
||||
Select the appropriate network protocol by clicking the arrow next to the Connect box.
|
||||
<br />
|
||||
<img alt="Quick Connect Toolbar" src="Screenshots/Quick Connect/03.png" />
|
||||
<br />
|
||||
<br />
|
||||
If you wish to use an existing connection, select the globe icon next to the protocol button and select the appropriate connection.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
BIN
mRemoteV1/Resources/Help/Screenshots/Quick Connect/01.png
Normal file
BIN
mRemoteV1/Resources/Help/Screenshots/Quick Connect/01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
mRemoteV1/Resources/Help/Screenshots/Quick Connect/02.png
Normal file
BIN
mRemoteV1/Resources/Help/Screenshots/Quick Connect/02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
mRemoteV1/Resources/Help/Screenshots/Quick Connect/03.png
Normal file
BIN
mRemoteV1/Resources/Help/Screenshots/Quick Connect/03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
mRemoteV1/Resources/Help/Screenshots/Quickconnect/01.png
Normal file
BIN
mRemoteV1/Resources/Help/Screenshots/Quickconnect/01.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
mRemoteV1/Resources/Help/Screenshots/Quickconnect/02.png
Normal file
BIN
mRemoteV1/Resources/Help/Screenshots/Quickconnect/02.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
mRemoteV1/Resources/Help/Screenshots/Quickconnect/03.png
Normal file
BIN
mRemoteV1/Resources/Help/Screenshots/Quickconnect/03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -64,9 +64,9 @@ namespace mRemoteNG.UI.Window
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ActiveDirectoryTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.ActiveDirectoryTree.Domain = "tant-a01";
|
||||
this.ActiveDirectoryTree.Domain = "DOMAIN";
|
||||
this.ActiveDirectoryTree.Location = new System.Drawing.Point(12, 52);
|
||||
this.ActiveDirectoryTree.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.ActiveDirectoryTree.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.ActiveDirectoryTree.Name = "ActiveDirectoryTree";
|
||||
this.ActiveDirectoryTree.SelectedNode = null;
|
||||
this.ActiveDirectoryTree.Size = new System.Drawing.Size(506, 280);
|
||||
|
||||
@@ -8,81 +8,96 @@ using mRemoteNG.Container;
|
||||
|
||||
namespace mRemoteNG.UI.Window
|
||||
{
|
||||
public partial class ActiveDirectoryImportWindow
|
||||
{
|
||||
public partial class ActiveDirectoryImportWindow
|
||||
{
|
||||
private string CurrentDomain;
|
||||
|
||||
#region Constructors
|
||||
public ActiveDirectoryImportWindow(DockContent panel)
|
||||
{
|
||||
InitializeComponent();
|
||||
Runtime.FontOverride(this);
|
||||
WindowType = WindowType.ActiveDirectoryImport;
|
||||
DockPnl = panel;
|
||||
}
|
||||
|
||||
public ActiveDirectoryImportWindow(DockContent panel)
|
||||
{
|
||||
InitializeComponent();
|
||||
Runtime.FontOverride(this);
|
||||
WindowType = WindowType.ActiveDirectoryImport;
|
||||
DockPnl = panel;
|
||||
CurrentDomain = Environment.UserDomainName;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Private Methods
|
||||
|
||||
#region Event Handlers
|
||||
|
||||
private void ADImport_Load(object sender, EventArgs e)
|
||||
{
|
||||
ApplyLanguage();
|
||||
txtDomain.Text = ActiveDirectoryTree.Domain;
|
||||
EnableDisableImportButton();
|
||||
}
|
||||
private void ADImport_Load(object sender, EventArgs e)
|
||||
{
|
||||
ApplyLanguage();
|
||||
txtDomain.Text = CurrentDomain;
|
||||
ActiveDirectoryTree.Domain = CurrentDomain;
|
||||
EnableDisableImportButton();
|
||||
|
||||
// Domain doesn't refresh on load, so it defaults to DOMAIN without this...
|
||||
ChangeDomain();
|
||||
}
|
||||
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNode = Windows.TreeForm.SelectedNode;
|
||||
ContainerInfo importDestination;
|
||||
if (selectedNode != null)
|
||||
importDestination = selectedNode as ContainerInfo ?? selectedNode.Parent;
|
||||
else
|
||||
importDestination = Runtime.ConnectionTreeModel.RootNodes.First();
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNode = Windows.TreeForm.SelectedNode;
|
||||
ContainerInfo importDestination;
|
||||
if (selectedNode != null)
|
||||
importDestination = selectedNode as ContainerInfo ?? selectedNode.Parent;
|
||||
else
|
||||
importDestination = Runtime.ConnectionTreeModel.RootNodes.First();
|
||||
|
||||
Import.ImportFromActiveDirectory(ActiveDirectoryTree.ADPath, importDestination, chkSubOU.Checked);
|
||||
}
|
||||
Import.ImportFromActiveDirectory(ActiveDirectoryTree.ADPath, importDestination, chkSubOU.Checked);
|
||||
}
|
||||
|
||||
/*
|
||||
private static void txtDomain_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
e.IsInputKey = true;
|
||||
}
|
||||
*/
|
||||
|
||||
private void txtDomain_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode != Keys.Enter) return;
|
||||
ChangeDomain();
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
private void txtDomain_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode != Keys.Enter) return;
|
||||
ChangeDomain();
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
|
||||
private void btnChangeDomain_Click(object sender, EventArgs e)
|
||||
{
|
||||
ChangeDomain();
|
||||
}
|
||||
private void btnChangeDomain_Click(object sender, EventArgs e)
|
||||
{
|
||||
ChangeDomain();
|
||||
}
|
||||
|
||||
private void ActiveDirectoryTree_ADPathChanged(object sender)
|
||||
{
|
||||
EnableDisableImportButton();
|
||||
}
|
||||
|
||||
private void ActiveDirectoryTree_ADPathChanged(object sender)
|
||||
{
|
||||
EnableDisableImportButton();
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void ApplyLanguage()
|
||||
{
|
||||
btnImport.Text = Language.strButtonImport;
|
||||
lblDomain.Text = Language.strLabelDomain;
|
||||
btnChangeDomain.Text = Language.strButtonChange;
|
||||
}
|
||||
|
||||
private void ChangeDomain()
|
||||
{
|
||||
ActiveDirectoryTree.Domain = txtDomain.Text;
|
||||
ActiveDirectoryTree.Refresh();
|
||||
}
|
||||
|
||||
private void EnableDisableImportButton()
|
||||
{
|
||||
btnImport.Enabled = !string.IsNullOrEmpty(ActiveDirectoryTree.ADPath);
|
||||
}
|
||||
|
||||
private void ApplyLanguage()
|
||||
{
|
||||
btnImport.Text = Language.strButtonImport;
|
||||
lblDomain.Text = Language.strLabelDomain;
|
||||
btnChangeDomain.Text = Language.strButtonChange;
|
||||
}
|
||||
|
||||
private void ChangeDomain()
|
||||
{
|
||||
CurrentDomain = txtDomain.Text;
|
||||
ActiveDirectoryTree.Domain = CurrentDomain;
|
||||
ActiveDirectoryTree.Refresh();
|
||||
}
|
||||
|
||||
private void EnableDisableImportButton()
|
||||
{
|
||||
btnImport.Enabled = !string.IsNullOrEmpty(ActiveDirectoryTree.ADPath);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -763,6 +763,15 @@
|
||||
<Content Include="Resources\Help\ScreenshotManager.htm">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\Help\Screenshots\Quick Connect\01.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\Help\Screenshots\Quick Connect\02.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\Help\Screenshots\Quick Connect\03.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Resources\Help\Screenshots\Configuration\01.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
Reference in New Issue
Block a user