Пример #1
0
        private void SaveAs_Click(object sender, EventArgs e)
        {
            SaveAs newForm = new SaveAs();

            newForm.Show();
        }
Пример #2
0
                public static void Show(Type WindowType,
                                        PortScanMode PortScanMode = PortScanMode.Normal)
                {
                    try
                    {
                        switch (WindowType)
                        {
                            case Type.About:
                                if (aboutForm == null || aboutPanel == null | aboutPanel.VisibleState==DockState.Unknown)
                                {
                                    aboutForm = new About(aboutPanel);
                                    aboutPanel = aboutForm;
                                    aboutForm.Show(frmMain.Default.pnlDock);
                                }
                                else
                                {
                                    aboutPanel.Focus();
                                    aboutPanel.Show();
                                    aboutPanel.BringToFront();
                                    aboutForm.Focus();
                                }
                                
                                break;
                            case Type.ADImport:
                                adimportForm = new ADImport(adimportPanel);
                                adimportPanel = adimportForm;
                                adimportPanel.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.Options:
                                optionsForm = new frmOptions(optionsPanel);
                                optionsForm.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.SaveAs:
                                saveasForm = new SaveAs(saveasPanel);
                                saveasPanel = saveasForm;
                                saveasForm.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.SSHTransfer:
                                sshtransferForm = new SSHTransfer(sshtransferPanel);
                                sshtransferPanel = sshtransferForm;
                                sshtransferForm.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.Update:
                                if (updateForm == null || updatePanel == null || updatePanel.VisibleState == DockState.Unknown)
                                {
                                    updateForm = new UI.Window.Update(updatePanel);
                                    updatePanel = updateForm;
                                    updateForm.Show(frmMain.Default.pnlDock);
                                }
                                else
                                {
                                    updatePanel.Focus();
                                    updatePanel.Show();
                                    updatePanel.BringToFront();
                                    updateForm.Focus();
                                }
                                break;
                            case Type.Help:
                                helpForm = new Help(helpPanel);
                                helpPanel = helpForm;
                                helpForm.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.ExternalApps:
                                if (externalappsForm == null || externalappsPanel == null || externalappsPanel.VisibleState == DockState.Unknown)
                                {
                                    externalappsForm = new ExternalApps(externalappsPanel);
                                    externalappsPanel = externalappsForm;
                                    externalappsForm.Show(frmMain.Default.pnlDock);
                                }
                                else
                                {
                                    externalappsPanel.Focus();
                                    externalappsPanel.Show();
                                    externalappsPanel.BringToFront();
                                    externalappsForm.Focus();
                                }
                                break;
                            case Type.PortScan:
                                portscanForm = new PortScan(portscanPanel, PortScanMode);
                                portscanPanel = portscanForm;
                                portscanForm.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.UltraVNCSC:
                                ultravncscForm = new UltraVNCSC(ultravncscPanel);
                                ultravncscPanel = ultravncscForm;
                                ultravncscForm.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.ComponentsCheck:
                                if (componentscheckForm == null || componentscheckPanel == null || componentscheckPanel.VisibleState == DockState.Unknown)
                                {
                                    componentscheckForm = new ComponentsCheck(componentscheckPanel);
                                    componentscheckPanel = componentscheckForm;
                                    componentscheckForm.Show(frmMain.Default.pnlDock);
                                }
                                else
                                {
                                    componentscheckPanel.Focus();
                                    componentscheckPanel.Show();
                                    componentscheckPanel.BringToFront();
                                    componentscheckForm.Focus();
                                }

                                break;
                            case Type.Announcement:
                                AnnouncementForm = new UI.Window.Announcement(AnnouncementPanel);
                                AnnouncementPanel = AnnouncementForm;
                                AnnouncementForm.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.ConnectionStatus:
                                connectionStatusForm = new ConnectionStatusForm();
                                componentscheckPanel = connectionStatusForm;
                                connectionStatusForm.Show(frmMain.Default.pnlDock);
                                break;
                            case Type.QuickText:

                                if (quicktextPanel != null && (quicktextForm == null || quicktextPanel == null | quicktextPanel.VisibleState == DockState.Unknown))
                                {
                                    quicktextForm = new QuickTextEdit(quicktextPanel);
                                    quicktextPanel = quicktextForm;
                                    quicktextForm.Show(frmMain.Default.pnlDock);
                                }
                                else
                                {
                                    quicktextPanel.Focus();
                                    quicktextPanel.Show();
                                    quicktextPanel.BringToFront();
                                    quicktextForm.Focus();
                                }
                                
                                break;
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageCollector.AddMessage(MessageClass.ErrorMsg,
                                                    (string)
                                                    ("Show (Runtime.Windows) failed" +
                                                     Constants.vbNewLine + ex.Message), true);
                    }
                }
Пример #3
0
        private void SaveAs_Click(object sender, EventArgs e)
        {
            SaveAs newForm = new SaveAs("test.txt", OutFindInf.Text);

            newForm.Show();
        }