renamed frmMain to FrmMain (resharper)

This commit is contained in:
David Sparer
2017-02-06 15:19:52 -07:00
parent ee7993b918
commit 529f1ca835
34 changed files with 93 additions and 93 deletions

View File

@@ -24,7 +24,7 @@ namespace mRemoteNG.App
var errorText = string.Format(Language.strErrorFipsPolicyIncompatible, GeneralAppInfo.ProductName,
GeneralAppInfo.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
messageCollector.AddMessage(MessageClass.ErrorMsg, errorText, true);
MessageBox.Show(frmMain.Default, errorText);
MessageBox.Show(FrmMain.Default, errorText);
Environment.Exit(1);
}

View File

@@ -34,7 +34,7 @@ namespace mRemoteNG.App
exportForm.SelectedConnection = selectedNode;
}
if (exportForm.ShowDialog(frmMain.Default) != DialogResult.OK)
if (exportForm.ShowDialog(FrmMain.Default) != DialogResult.OK)
return;
ConnectionInfo exportTarget;

View File

@@ -26,7 +26,7 @@ namespace mRemoteNG.App
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(frmMain.Default);
Application.Run(FrmMain.Default);
}
public static void CloseSingletonInstanceMutex()

View File

@@ -72,7 +72,7 @@ namespace mRemoteNG.App
private static void ShowConnectionWindow(ConnectionWindow connectionForm)
{
connectionForm.Show(frmMain.Default.pnlDock, DockState.Document);
connectionForm.Show(FrmMain.Default.pnlDock, DockState.Document);
}
private static void PrepareTabControllerSupport(bool noTabber, ConnectionWindow connectionForm)
@@ -347,7 +347,7 @@ namespace mRemoteNG.App
}
else
{
MessageBox.Show(frmMain.Default,
MessageBox.Show(FrmMain.Default,
string.Format(Language.strErrorStartupConnectionFileLoad, Environment.NewLine, Application.ProductName, GetStartupConnectionFileName(), MiscTools.GetExceptionMessageRecursive(ex)),
@"Could not load startup file.", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
@@ -502,7 +502,7 @@ namespace mRemoteNG.App
saveFileDialog.Filter = string.Join("|", fileTypes.ToArray());
if (saveFileDialog.ShowDialog(frmMain.Default) != DialogResult.OK) return;
if (saveFileDialog.ShowDialog(FrmMain.Default) != DialogResult.OK) return;
connectionsSave.SaveFormat = ConnectionsSaver.Format.mRXML;
connectionsSave.ConnectionFileName = saveFileDialog.FileName;

View File

@@ -10,17 +10,17 @@ namespace mRemoteNG.App
{
bool wasMax = false;
if (frmMain.Default.WindowState == FormWindowState.Maximized)
if (FrmMain.Default.WindowState == FormWindowState.Maximized)
{
wasMax = true;
frmMain.Default.WindowState = FormWindowState.Normal;
FrmMain.Default.WindowState = FormWindowState.Normal;
}
frmMain.Default.Location = Screen.Bounds.Location;
FrmMain.Default.Location = Screen.Bounds.Location;
if (wasMax)
{
frmMain.Default.WindowState = FormWindowState.Maximized;
FrmMain.Default.WindowState = FormWindowState.Maximized;
}
}

View File

@@ -15,7 +15,7 @@ namespace mRemoteNG.App
public static void Quit(string updateFilePath = null)
{
_updateFilePath = updateFilePath;
frmMain.Default.Close();
FrmMain.Default.Close();
ProgramRoot.CloseSingletonInstanceMutex();
}

View File

@@ -56,7 +56,7 @@ namespace mRemoteNG.App
public void CreateConnectionsProvider(MessageCollector messageCollector)
{
messageCollector.AddMessage(MessageClass.DebugMsg, "Determining if we need a database syncronizer");
frmMain.Default.AreWeUsingSqlServerForSavingConnections = Settings.Default.UseSQLServer;
FrmMain.Default.AreWeUsingSqlServerForSavingConnections = Settings.Default.UseSQLServer;
if (!Settings.Default.UseSQLServer) return;
messageCollector.AddMessage(MessageClass.DebugMsg, "Creating database syncronizer");
@@ -87,9 +87,9 @@ namespace mRemoteNG.App
private void GetUpdateInfoCompleted(object sender, AsyncCompletedEventArgs e)
{
if (frmMain.Default.InvokeRequired)
if (FrmMain.Default.InvokeRequired)
{
frmMain.Default.Invoke(new AsyncCompletedEventHandler(GetUpdateInfoCompleted), sender, e);
FrmMain.Default.Invoke(new AsyncCompletedEventHandler(GetUpdateInfoCompleted), sender, e);
return;
}

View File

@@ -32,61 +32,61 @@ namespace mRemoteNG.App
{
if (_aboutForm == null || _aboutForm.IsDisposed)
_aboutForm = new AboutWindow();
_aboutForm.Show(frmMain.Default.pnlDock);
_aboutForm.Show(FrmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.ActiveDirectoryImport))
{
if (_adimportForm == null || _adimportForm.IsDisposed)
_adimportForm = new ActiveDirectoryImportWindow();
_adimportForm.Show(frmMain.Default.pnlDock);
_adimportForm.Show(FrmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.Options))
{
using (var optionsForm = new frmOptions())
{
optionsForm.ShowDialog(frmMain.Default.pnlDock);
optionsForm.ShowDialog(FrmMain.Default.pnlDock);
}
}
else if (windowType.Equals(WindowType.SSHTransfer))
{
SshtransferForm = new SSHTransferWindow();
SshtransferForm.Show(frmMain.Default.pnlDock);
SshtransferForm.Show(FrmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.Update))
{
if (UpdateForm == null || UpdateForm.IsDisposed)
UpdateForm = new UpdateWindow();
UpdateForm.Show(frmMain.Default.pnlDock);
UpdateForm.Show(FrmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.Help))
{
if (_helpForm == null || _helpForm.IsDisposed)
_helpForm = new HelpWindow();
_helpForm.Show(frmMain.Default.pnlDock);
_helpForm.Show(FrmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.ExternalApps))
{
if (_externalappsForm == null || _externalappsForm.IsDisposed)
_externalappsForm = new ExternalToolsWindow();
_externalappsForm.Show(frmMain.Default.pnlDock);
_externalappsForm.Show(FrmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.PortScan))
{
_portscanForm = new PortScanWindow();
_portscanForm.Show(frmMain.Default.pnlDock);
_portscanForm.Show(FrmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.UltraVNCSC))
{
if (_ultravncscForm == null || _ultravncscForm.IsDisposed)
_ultravncscForm = new UltraVNCWindow();
_ultravncscForm.Show(frmMain.Default.pnlDock);
_ultravncscForm.Show(FrmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.ComponentsCheck))
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Showing ComponentsCheck window", true);
if (_componentscheckForm == null || _componentscheckForm.IsDisposed)
_componentscheckForm = new ComponentsCheckWindow();
_componentscheckForm.Show(frmMain.Default.pnlDock);
_componentscheckForm.Show(FrmMain.Default.pnlDock);
}
}
catch (Exception ex)

View File

@@ -38,7 +38,7 @@ namespace mRemoteNG.Config.Connections
var connectionTreeModel = deserializer.Deserialize();
if (connectionTreeModel != null)
frmMain.Default.ConnectionsFileName = ConnectionFileName;
FrmMain.Default.ConnectionsFileName = ConnectionFileName;
else
connectionTreeModel = new ConnectionTreeModel();

View File

@@ -73,10 +73,10 @@ namespace mRemoteNG.Config.Connections
default:
SaveToXml();
if (!Export)
frmMain.Default.ConnectionsFileName = ConnectionFileName;
FrmMain.Default.ConnectionsFileName = ConnectionFileName;
break;
}
frmMain.Default.AreWeUsingSqlServerForSavingConnections = SaveFormat == Format.SQL;
FrmMain.Default.AreWeUsingSqlServerForSavingConnections = SaveFormat == Format.SQL;
}
#endregion

View File

@@ -69,7 +69,7 @@ namespace mRemoteNG.Config.Serializers
private void ShowIncompatibleVersionDialogBox()
{
CTaskDialog.ShowTaskDialogBox(
frmMain.Default,
FrmMain.Default,
Application.ProductName,
"Incompatible connection file format",
$"The format of this connection file is not supported. Please upgrade to a newer version of {Application.ProductName}.",

View File

@@ -11,10 +11,10 @@ namespace mRemoteNG.Config.Settings
{
public class ExternalAppsLoader
{
private readonly frmMain _mainForm;
private readonly FrmMain _mainForm;
private readonly MessageCollector _messageCollector;
public ExternalAppsLoader(frmMain mainForm, MessageCollector messageCollector)
public ExternalAppsLoader(FrmMain mainForm, MessageCollector messageCollector)
{
if (mainForm == null)
throw new ArgumentNullException(nameof(mainForm));
@@ -83,7 +83,7 @@ namespace mRemoteNG.Config.Settings
_mainForm.SwitchToolBarText(mRemoteNG.Settings.Default.ExtAppsTBShowText);
frmMain.Default.AddExternalToolsToToolBar();
FrmMain.Default.AddExternalToolsToToolBar();
}
}
}

View File

@@ -11,10 +11,10 @@ namespace mRemoteNG.Config.Settings
{
public class LayoutSettingsLoader
{
private readonly frmMain _mainForm;
private readonly FrmMain _mainForm;
private readonly MessageCollector _messageCollector;
public LayoutSettingsLoader(frmMain mainForm, MessageCollector messageCollector)
public LayoutSettingsLoader(FrmMain mainForm, MessageCollector messageCollector)
{
if (mainForm == null)
throw new ArgumentNullException(nameof(mainForm));
@@ -51,7 +51,7 @@ namespace mRemoteNG.Config.Settings
}
else
{
frmMain.Default.SetDefaultLayout();
FrmMain.Default.SetDefaultLayout();
}
}
catch (Exception ex)

View File

@@ -20,10 +20,10 @@ namespace mRemoteNG.Config.Settings
private readonly ExternalAppsLoader _externalAppsLoader;
private readonly MessageCollector _messageCollector;
private frmMain MainForm { get; }
private FrmMain MainForm { get; }
public SettingsLoader(frmMain mainForm, MessageCollector messageCollector)
public SettingsLoader(FrmMain mainForm, MessageCollector messageCollector)
{
if (mainForm == null)
throw new ArgumentNullException(nameof(mainForm));
@@ -68,7 +68,7 @@ namespace mRemoteNG.Config.Settings
private static void SetAlwaysShowPanelTabs()
{
if (mRemoteNG.Settings.Default.AlwaysShowPanelTabs)
frmMain.Default.pnlDock.DocumentStyle = DocumentStyle.DockingWindow;
FrmMain.Default.pnlDock.DocumentStyle = DocumentStyle.DockingWindow;
}
private static void SetTheme()

View File

@@ -16,8 +16,8 @@ namespace mRemoteNG.Config.Settings
{
try
{
var with1 = frmMain.Default;
var windowPlacement = new WindowPlacement(frmMain.Default);
var with1 = FrmMain.Default;
var windowPlacement = new WindowPlacement(FrmMain.Default);
if (with1.WindowState == FormWindowState.Minimized & windowPlacement.RestoreToMaximized)
{
with1.Opacity = 0;
@@ -79,7 +79,7 @@ namespace mRemoteNG.Config.Settings
Directory.CreateDirectory(SettingsFileInfo.SettingsPath);
}
frmMain.Default.pnlDock.SaveAsXml(SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.LayoutFileName);
FrmMain.Default.pnlDock.SaveAsXml(SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.LayoutFileName);
}
catch (Exception ex)
{

View File

@@ -50,7 +50,7 @@ namespace mRemoteNG.Connection
var connectionWindow = (ConnectionWindow)interfaceControl.FindForm();
connectionWindow?.Focus();
var findForm = (ConnectionWindow)interfaceControl.FindForm();
findForm?.Show(frmMain.Default.pnlDock);
findForm?.Show(FrmMain.Default.pnlDock);
var tabPage = (TabPage)interfaceControl.Parent;
tabPage.Selected = true;
return true;
@@ -114,7 +114,7 @@ namespace mRemoteNG.Connection
}
connectionInfo.OpenConnections.Add(newProtocol);
frmMain.Default.SelectedConnection = connectionInfo;
FrmMain.Default.SelectedConnection = connectionInfo;
}
catch (Exception ex)
{
@@ -176,7 +176,7 @@ namespace mRemoteNG.Connection
if (connectionForm == null)
connectionForm = Runtime.AddPanel(connectionPanel);
else
((ConnectionWindow)connectionForm).Show(frmMain.Default.pnlDock);
((ConnectionWindow)connectionForm).Show(FrmMain.Default.pnlDock);
connectionForm.Focus();
return connectionForm;

View File

@@ -205,7 +205,7 @@ namespace mRemoteNG.Connection.Protocol.ICA
{
if ((Force & ConnectionInfo.Force.Fullscreen) == ConnectionInfo.Force.Fullscreen)
{
_ICAClient.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, Screen.FromControl(frmMain.Default).Bounds.Width, Screen.FromControl(frmMain.Default).Bounds.Height, 0);
_ICAClient.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, Screen.FromControl(FrmMain.Default).Bounds.Width, Screen.FromControl(FrmMain.Default).Bounds.Height, 0);
_ICAClient.FullScreenWindow();
return;
@@ -221,7 +221,7 @@ namespace mRemoteNG.Connection.Protocol.ICA
}
else if (InterfaceControl.Info.Resolution == ProtocolRDP.RDPResolutions.Fullscreen)
{
_ICAClient.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, Screen.FromControl(frmMain.Default).Bounds.Width, Screen.FromControl(frmMain.Default).Bounds.Height, 0);
_ICAClient.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, Screen.FromControl(FrmMain.Default).Bounds.Width, Screen.FromControl(FrmMain.Default).Bounds.Height, 0);
_ICAClient.FullScreenWindow();
}
else

View File

@@ -486,8 +486,8 @@ namespace mRemoteNG.Connection.Protocol.RDP
if ((Force & ConnectionInfo.Force.Fullscreen) == ConnectionInfo.Force.Fullscreen)
{
_rdpClient.FullScreen = true;
_rdpClient.DesktopWidth = Screen.FromControl(frmMain.Default).Bounds.Width;
_rdpClient.DesktopHeight = Screen.FromControl(frmMain.Default).Bounds.Height;
_rdpClient.DesktopWidth = Screen.FromControl(FrmMain.Default).Bounds.Width;
_rdpClient.DesktopHeight = Screen.FromControl(FrmMain.Default).Bounds.Height;
return;
}
@@ -507,8 +507,8 @@ namespace mRemoteNG.Connection.Protocol.RDP
else if (InterfaceControl.Info.Resolution == RDPResolutions.Fullscreen)
{
_rdpClient.FullScreen = true;
_rdpClient.DesktopWidth = Screen.FromControl(frmMain.Default).Bounds.Width;
_rdpClient.DesktopHeight = Screen.FromControl(frmMain.Default).Bounds.Height;
_rdpClient.DesktopWidth = Screen.FromControl(FrmMain.Default).Bounds.Width;
_rdpClient.DesktopHeight = Screen.FromControl(FrmMain.Default).Bounds.Height;
}
else
{

View File

@@ -161,7 +161,7 @@ namespace mRemoteNG.Connection.Protocol.VNC
{
_VNC.ConnectComplete += VNCEvent_Connected;
_VNC.ConnectionLost += VNCEvent_Disconnected;
frmMain.clipboardchange += VNCEvent_ClipboardChanged;
FrmMain.clipboardchange += VNCEvent_ClipboardChanged;
if (((int)Force & (int)ConnectionInfo.Force.NoCredentials) != (int)ConnectionInfo.Force.NoCredentials && !string.IsNullOrEmpty(Info.CredentialRecord?.Password.ConvertToUnsecureString()))
{
_VNC.GetPassword = VNCEvent_Authenticate;

View File

@@ -76,7 +76,7 @@ namespace mRemoteNG.Messages.WriterDecorators
private void SwitchToMessage()
{
_messageWindow.PreviousActiveForm = (DockContent)frmMain.Default.pnlDock.ActiveContent;
_messageWindow.PreviousActiveForm = (DockContent)FrmMain.Default.pnlDock.ActiveContent;
ShowMcForm();
_messageWindow.lvErrorCollector.Focus();
_messageWindow.lvErrorCollector.SelectedItems.Clear();
@@ -86,10 +86,10 @@ namespace mRemoteNG.Messages.WriterDecorators
private void ShowMcForm()
{
if (frmMain.Default.pnlDock.InvokeRequired)
frmMain.Default.pnlDock.Invoke((MethodInvoker)ShowMcForm);
if (FrmMain.Default.pnlDock.InvokeRequired)
FrmMain.Default.pnlDock.Invoke((MethodInvoker)ShowMcForm);
else
_messageWindow.Show(frmMain.Default.pnlDock);
_messageWindow.Show(FrmMain.Default.pnlDock);
}
}
}

View File

@@ -89,7 +89,7 @@ namespace mRemoteNG.Tools
private static void nI_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (frmMain.Default.Visible)
if (FrmMain.Default.Visible)
HideForm();
else
ShowForm();
@@ -97,8 +97,8 @@ namespace mRemoteNG.Tools
private static void ShowForm()
{
frmMain.Default.Show();
frmMain.Default.WindowState = frmMain.Default.PreviousWindowState;
FrmMain.Default.Show();
FrmMain.Default.WindowState = FrmMain.Default.PreviousWindowState;
if (Settings.Default.ShowSystemTrayIcon) return;
Runtime.NotificationAreaIcon.Dispose();
@@ -107,15 +107,15 @@ namespace mRemoteNG.Tools
private static void HideForm()
{
frmMain.Default.Hide();
frmMain.Default.PreviousWindowState = frmMain.Default.WindowState;
FrmMain.Default.Hide();
FrmMain.Default.PreviousWindowState = FrmMain.Default.WindowState;
}
private void ConMenItem_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button != MouseButtons.Left) return;
if (!(((ToolStripMenuItem) sender).Tag is ConnectionInfo)) return;
if (frmMain.Default.Visible == false)
if (FrmMain.Default.Visible == false)
ShowForm();
_connectionInitiator.OpenConnection((ConnectionInfo) ((ToolStripMenuItem) sender).Tag);
}

View File

@@ -73,7 +73,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
Settings.Default.ShowDescriptionTooltipsInTree = chkShowDescriptionTooltipsInTree.Checked;
Settings.Default.ShowCompleteConsPathInTitle = chkShowFullConnectionsFilePathInTitle.Checked;
frmMain.Default.ShowFullPathInTitle = chkShowFullConnectionsFilePathInTitle.Checked;
FrmMain.Default.ShowFullPathInTitle = chkShowFullConnectionsFilePathInTitle.Checked;
Settings.Default.ShowSystemTrayIcon = chkShowSystemTrayIcon.Checked;
if (Settings.Default.ShowSystemTrayIcon)

View File

@@ -112,12 +112,12 @@ namespace mRemoteNG.UI.Forms.OptionsPages
Settings.Default.AutoSaveEveryMinutes = (int) numAutoSave.Value;
if (Settings.Default.AutoSaveEveryMinutes > 0)
{
frmMain.Default.tmrAutoSave.Interval = Settings.Default.AutoSaveEveryMinutes*60000;
frmMain.Default.tmrAutoSave.Enabled = true;
FrmMain.Default.tmrAutoSave.Interval = Settings.Default.AutoSaveEveryMinutes*60000;
FrmMain.Default.tmrAutoSave.Enabled = true;
}
else
{
frmMain.Default.tmrAutoSave.Enabled = false;
FrmMain.Default.tmrAutoSave.Enabled = false;
}
if (radCredentialsNoInfo.Checked)

View File

@@ -63,7 +63,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
private static void ReinitializeSqlUpdater()
{
Runtime.RemoteConnectionsSyncronizer?.Dispose();
frmMain.Default.AreWeUsingSqlServerForSavingConnections = Settings.Default.UseSQLServer;
FrmMain.Default.AreWeUsingSqlServerForSavingConnections = Settings.Default.UseSQLServer;
if (Settings.Default.UseSQLServer)
{

View File

@@ -44,7 +44,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
base.SaveSettings();
Settings.Default.AlwaysShowPanelTabs = chkAlwaysShowPanelTabs.Checked;
frmMain.Default.ShowHidePanelTabs();
FrmMain.Default.ShowHidePanelTabs();
Settings.Default.OpenTabsRightOfSelected = chkOpenNewTabRightOfSelected.Checked;
Settings.Default.ShowLogonInfoOnTabs = chkShowLogonInfoOnTabs.Checked;

View File

@@ -2,7 +2,7 @@ using mRemoteNG.UI.Controls;
namespace mRemoteNG.UI.Forms
{
public partial class frmMain : System.Windows.Forms.Form
public partial class FrmMain : System.Windows.Forms.Form
{
//Form overrides dispose to clean up the component list.
@@ -786,7 +786,7 @@ namespace mRemoteNG.UI.Forms
this.Controls.Add(this.tsContainer);
this.Icon = global::mRemoteNG.Resources.mRemote_Icon;
this.MainMenuStrip = this.msMain;
this.Name = "frmMain";
this.Name = "FrmMain";
this.Opacity = 0D;
this.Text = "mRemoteNG";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing);

View File

@@ -31,9 +31,9 @@ using WeifenLuo.WinFormsUI.Docking;
namespace mRemoteNG.UI.Forms
{
public partial class frmMain
public partial class FrmMain
{
public static frmMain Default { get; } = new frmMain();
public static FrmMain Default { get; } = new FrmMain();
private static clipboardchangeEventHandler clipboardchangeEvent;
private bool _inSizeMove;
@@ -52,7 +52,7 @@ namespace mRemoteNG.UI.Forms
private frmMain()
private FrmMain()
{
_showFullPathInTitle = Settings.Default.ShowCompleteConsPathInTitle;
InitializeComponent();
@@ -60,7 +60,7 @@ namespace mRemoteNG.UI.Forms
pnlDock.Theme = new VS2012LightTheme();
}
static frmMain()
static FrmMain()
{
}

View File

@@ -43,12 +43,12 @@ namespace mRemoteNG.UI.Window
#region Private Methods
private void Base_Load(System.Object sender, System.EventArgs e)
{
frmMain.Default.ShowHidePanelTabs();
FrmMain.Default.ShowHidePanelTabs();
}
private void Base_FormClosed(System.Object sender, System.Windows.Forms.FormClosedEventArgs e)
{
frmMain.Default.ShowHidePanelTabs(this);
FrmMain.Default.ShowHidePanelTabs(this);
}
#endregion
}

View File

@@ -154,12 +154,12 @@ namespace mRemoteNG.UI.Window
{
if (TabController.SelectedTab == null)
{
frmMain.Default.SelectedConnection = null;
FrmMain.Default.SelectedConnection = null;
}
else
{
var interfaceControl = TabController.SelectedTab?.Tag as InterfaceControl;
frmMain.Default.SelectedConnection = interfaceControl?.Info;
FrmMain.Default.SelectedConnection = interfaceControl?.Info;
}
}
#endregion
@@ -178,8 +178,8 @@ namespace mRemoteNG.UI.Window
{
if (_documentHandlersAdded)
{
frmMain.Default.ResizeBegin -= Connection_ResizeBegin;
frmMain.Default.ResizeEnd -= Connection_ResizeEnd;
FrmMain.Default.ResizeBegin -= Connection_ResizeBegin;
FrmMain.Default.ResizeEnd -= Connection_ResizeEnd;
_documentHandlersAdded = false;
}
DockHandler.FloatPane.FloatWindow.ResizeBegin += Connection_ResizeBegin;
@@ -194,8 +194,8 @@ namespace mRemoteNG.UI.Window
DockHandler.FloatPane.FloatWindow.ResizeEnd -= Connection_ResizeEnd;
_floatHandlersAdded = false;
}
frmMain.Default.ResizeBegin += Connection_ResizeBegin;
frmMain.Default.ResizeEnd += Connection_ResizeEnd;
FrmMain.Default.ResizeBegin += Connection_ResizeBegin;
FrmMain.Default.ResizeEnd += Connection_ResizeEnd;
_documentHandlersAdded = true;
}
}
@@ -222,7 +222,7 @@ namespace mRemoteNG.UI.Window
private void Connection_FormClosing(object sender, FormClosingEventArgs e)
{
if (!frmMain.Default.IsClosing &&
if (!FrmMain.Default.IsClosing &&
(Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.All & TabController.TabPages.Count > 0 ||
Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.Multiple & TabController.TabPages.Count > 1))
{
@@ -765,7 +765,7 @@ namespace mRemoteNG.UI.Window
{
try
{
if (!(NativeMethods.GetForegroundWindow() == frmMain.Default.Handle) && !_ignoreChangeSelectedTabClick)
if (!(NativeMethods.GetForegroundWindow() == FrmMain.Default.Handle) && !_ignoreChangeSelectedTabClick)
{
var clickedTab = TabController.TabPageFromPoint(e.Location);
if (clickedTab != null && TabController.SelectedTab != clickedTab)

View File

@@ -142,9 +142,9 @@ namespace mRemoteNG.UI.Window
try
{
if (PreviousActiveForm != null)
PreviousActiveForm.Show(frmMain.Default.pnlDock);
PreviousActiveForm.Show(FrmMain.Default.pnlDock);
else
Windows.TreeForm.Show(frmMain.Default.pnlDock);
Windows.TreeForm.Show(FrmMain.Default.pnlDock);
}
catch (Exception)
{

View File

@@ -70,7 +70,7 @@ namespace mRemoteNG.UI.Window
return;
}
if (MessageBox.Show(frmMain.Default, message, "Question?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
if (MessageBox.Show(FrmMain.Default, message, "Question?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
{
return;
}
@@ -265,7 +265,7 @@ namespace mRemoteNG.UI.Window
ToolsListView.EndUpdate();
frmMain.Default.AddExternalToolsToToolBar();
FrmMain.Default.AddExternalToolsToToolBar();
}
catch (Exception ex)
{

View File

@@ -471,7 +471,7 @@ namespace mRemoteNG.UI.Window
{
if (txtPassword.Text == "")
{
if (MessageBox.Show(frmMain.Default, Language.strEmptyPasswordContinue, @"Question?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
if (MessageBox.Show(FrmMain.Default, Language.strEmptyPasswordContinue, @"Question?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
return false;
}

View File

@@ -195,7 +195,7 @@ namespace mRemoteNG.UI.Window
nBtn.Location = new Point(nPB.Width - nBtn.Width, -1);
nBtn.Show();
Show(frmMain.Default.pnlDock);
Show(FrmMain.Default.pnlDock);
}
catch (Exception ex)
{

View File

@@ -451,10 +451,10 @@
<Compile Include="UI\Forms\frmChoosePanel.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Forms\frmMain.Designer.cs">
<DependentUpon>frmMain.cs</DependentUpon>
<Compile Include="UI\Forms\FrmMain.Designer.cs">
<DependentUpon>FrmMain.cs</DependentUpon>
</Compile>
<Compile Include="UI\Forms\frmMain.cs">
<Compile Include="UI\Forms\FrmMain.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UI\Forms\PasswordForm.Designer.cs">
@@ -611,8 +611,8 @@
<DependentUpon>frmChoosePanel.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="UI\Forms\frmMain.resx">
<DependentUpon>frmMain.cs</DependentUpon>
<EmbeddedResource Include="UI\Forms\FrmMain.resx">
<DependentUpon>FrmMain.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="UI\Forms\frmOptions.resx">