internal TabControlRemover(Settings settings, MainForm mainForm, TabControl.TabControl tcTerminals)
 {
     this.settings = settings;
     this.mainForm = mainForm;
     this.tcTerminals = tcTerminals;
     this.tcTerminals.TabControlItemClosing += new TabControlItemClosingHandler(this.TcTerminals_TabControlItemClosing);
     this.tcTerminals.TabControlItemClosed += new EventHandler(this.TcTerminals_TabControlItemClosed);
 }
        internal void Initialize(MainForm mainForm, CommandLineArgs commandLine)
        {
            if (!this.firstInstance)
                return;

            this.StartServer(mainForm, commandLine);
            // startupLock obtained in constructor, the server is now available to notifications
            this.startupLock.ReleaseMutex();
        }
 internal FavoritesMenuLoader(MainForm mainForm, IPersistence persistence)
 {
     this.persistence = persistence;
     AssignMainFormFields(mainForm);
     this.favoritesToolStripMenuItem.DropDownItems.Add("-");
     CreateUntaggedItem();
     CreateTrayMenuItems();
     UpdateMenuAndContextMenu();
     RegisterEventHandlers();
 }
Exemplo n.º 4
0
 private static void RunMainForm(CommandLineArgs commandLine)
 {
     var mainForm = new MainForm(Persistence.Instance);
     SingleInstanceApplication.Instance.Initialize(mainForm, commandLine);
     mainForm.HandleCommandLineActions(commandLine);
     Application.Run(mainForm);
 }
 private void AssignMainFormFields(MainForm mainForm)
 {
     this.favoritesToolStripMenuItem = mainForm.favoritesToolStripMenuItem;
     this.tscConnectTo = mainForm.tscConnectTo;
     this.serverToolStripMenuItemClick = mainForm.ServerToolStripMenuItem_Click;
     this.favoriteToolBar = mainForm.favoriteToolBar;
     this.quickContextMenu = mainForm.QuickContextMenu;
     this.quickContextMenuItemClicked = mainForm.QuickContextMenu_ItemClicked;
     this.groupsToolStripMenuItem = mainForm.groupsToolStripMenuItem;
     this.groupsSeparator = mainForm.groupsSeparator;
     this.addTerminalToGroupToolStripMenuItem = mainForm.addTerminalToGroupToolStripMenuItem;
     this.saveTerminalsAsGroupToolStripMenuItem = mainForm.saveTerminalsAsGroupToolStripMenuItem;
     this.groupToolStripMenuItemClick = mainForm.GroupToolStripMenuItem_Click;
     this.groupAddToolStripMenuItemClick = mainForm.GroupAddToolStripMenuItem_Click;
 }
        private void StartServer(MainForm mainForm, CommandLineArgs commandLine)
        {
            if (!commandLine.SingleInstance)
                return;

            this.server = new CommandLineServer(mainForm);
            this.server.Open();
        }
 internal MainFormFullScreenSwitch(MainForm mainForm)
 {
     this.mainForm = mainForm;
 }