本文整理汇总了C#中WindowType.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# WindowType.Equals方法的具体用法?C# WindowType.Equals怎么用?C# WindowType.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowType
的用法示例。
在下文中一共展示了WindowType.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Show
public static void Show(WindowType windowType)
{
try
{
if (windowType.Equals(WindowType.About))
{
if (_aboutForm == null || _aboutForm.IsDisposed)
{
_aboutForm = new AboutWindow(_aboutPanel);
_aboutPanel = _aboutForm;
}
_aboutForm.Show(frmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.ActiveDirectoryImport))
{
if (_adimportForm == null || _adimportForm.IsDisposed)
{
_adimportForm = new ActiveDirectoryImportWindow(_adimportPanel);
_adimportPanel = _adimportForm;
}
_adimportPanel.Show(frmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.Options))
{
using (var optionsForm = new frmOptions())
{
optionsForm.ShowDialog(frmMain.Default.pnlDock);
}
}
else if (windowType.Equals(WindowType.SSHTransfer))
{
SshtransferForm = new SSHTransferWindow(_sshtransferPanel);
_sshtransferPanel = SshtransferForm;
SshtransferForm.Show(frmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.Update))
{
if (UpdateForm == null || UpdateForm.IsDisposed)
{
UpdateForm = new UpdateWindow(UpdatePanel);
UpdatePanel = UpdateForm;
}
UpdateForm.Show(frmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.Help))
{
if (_helpForm == null || _helpForm.IsDisposed)
{
_helpForm = new HelpWindow(_helpPanel);
_helpPanel = _helpForm;
}
_helpForm.Show(frmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.ExternalApps))
{
if (_externalappsForm == null || _externalappsForm.IsDisposed)
{
_externalappsForm = new ExternalToolsWindow(_externalappsPanel);
_externalappsPanel = _externalappsForm;
}
_externalappsForm.Show(frmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.PortScan))
{
_portscanForm = new PortScanWindow(_portscanPanel);
_portscanPanel = _portscanForm;
_portscanForm.Show(frmMain.Default.pnlDock);
}
else if (windowType.Equals(WindowType.UltraVNCSC))
{
if (_ultravncscForm == null || _ultravncscForm.IsDisposed)
{
_ultravncscForm = new UltraVNCWindow(_ultravncscPanel);
_ultravncscPanel = _ultravncscForm;
}
_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(_componentscheckPanel);
_componentscheckPanel = _componentscheckForm;
}
_componentscheckForm.Show(frmMain.Default.pnlDock);
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionStackTrace("App.Runtime.Windows.Show() failed.", ex);
}
}