public SessionDetail(SingletonToolWindowHelper <SessionTreeView> sessionTreeView) : this() { _sessionsToolWindowHelper = sessionTreeView; if (_sessionsToolWindowHelper != null) { // We need to know when an instance of the SessionTreeView is created // so that we can register for the SelectionChanged event. _sessionsToolWindowHelper.InstanceChanged += SessionTreeViewInstanceChanged; SessionTreeViewInstanceChanged(_sessionsToolWindowHelper.Instance); } }
public FrmMain() { InitializeComponent(); Remote4Support.DockPanel = dockPanel1; sessions = new SingletonToolWindowHelper <SessionTreeView>("Sessions", dockPanel1, null, x => new SessionTreeView(x.DockPanel)); sessionDetail = new SingletonToolWindowHelper <SessionDetail>("Session Detail", dockPanel1, sessions, x => new SessionDetail(x.InitializerResource as SingletonToolWindowHelper <SessionTreeView>)); sessions.ShowWindow(DockState.DockRight); sessionDetail.ShowWindow(DockState.DockRightAutoHide); }
public SessionDetail(SingletonToolWindowHelper <SessionTreeview> Sessions) : this() { SessionsToolWindowHelper = Sessions; if (SessionsToolWindowHelper != null) { // We need to know when an instance of the SessionTreeView is created // so that we can register for the SelectionChanged event. SessionsToolWindowHelper.InstanceChanged += SessionTreeviewInstanceChanged; SessionTreeviewInstanceChanged(SessionsToolWindowHelper.Instance); } FormClosed += SessionDetail_FormClosed; }
public SessionDetail(SingletonToolWindowHelper<SessionTreeview> Sessions) : this() { SessionsToolWindowHelper = Sessions; if (SessionsToolWindowHelper != null) { // We need to know when an instance of the SessionTreeView is created // so that we can register for the SelectionChanged event. SessionsToolWindowHelper.InstanceChanged += SessionTreeviewInstanceChanged; SessionTreeviewInstanceChanged(SessionsToolWindowHelper.Instance); } this.FormClosed += SessionDetail_FormClosed; }
public frmSuperPutty() { // Verify Putty is set; Prompt user if necessary; exit otherwise dlgFindPutty.PuttyCheck(); InitializeComponent(); // force toolbar locations...designer likes to flip them around this.tsConnect.Location = new System.Drawing.Point(0, 24); this.tsCommands.Location = new System.Drawing.Point(0, 49); if (this.DesignMode) return; // setup connection bar this.tbTxtBoxPassword.TextBox.PasswordChar = '*'; this.RefreshConnectionToolbarData(); // version in status bar this.toolStripStatusLabelVersion.Text = SuperPuTTY.Version; // tool windows this.sessions = new SingletonToolWindowHelper<SessionTreeview>("Sessions", this.DockPanel, x => new SessionTreeview(x.DockPanel)); this.layouts = new SingletonToolWindowHelper<LayoutsList>("Layouts", this.DockPanel); this.logViewer = new SingletonToolWindowHelper<Log4netLogViewer>("Log Viewer", this.DockPanel); // for toolbar this.tbFocusHelperHost = new TextBoxFocusHelper(this.tbTxtBoxHost.TextBox); this.tbFocusHelperUserName = new TextBoxFocusHelper(this.tbTxtBoxLogin.TextBox); this.tbFocusHelperPassword = new TextBoxFocusHelper(this.tbTxtBoxPassword.TextBox); this.sendCommandsDocumentSelector = new frmDocumentSelector(this.DockPanel); this.sendCommandsDocumentSelector.Owner = this; // Hook into status SuperPuTTY.StatusEvent += new Action<string>(delegate(String msg) { this.toolStripStatusLabelMessage.Text = msg; }); SuperPuTTY.ReportStatus("Ready"); // Check for updates if enabled. (disabled if compiled with DEBUG) if (SuperPuTTY.Settings.AutoUpdateCheck) { #if DEBUG Log.Info("Automatic Update Check Disabled in DEBUG mode"); #else Log.Info("Checking for updates"); this.checkForUpdatesToolStripMenuItem_Click(this, new EventArgs()); #endif } // Hook into LayoutChanging/Changed SuperPuTTY.LayoutChanging += new EventHandler<LayoutChangedEventArgs>(SuperPuTTY_LayoutChanging); // Low-Level Mouse and Keyboard hooks llkp = KBHookCallback; kbHookID = SetKBHook(llkp); //llmp = MHookCallback; //mHookID = SetMHook(llmp); this.focusHelper = new ChildWindowFocusHelper(this); this.focusHelper.Start(); // Restore window location and size if (SuperPuTTY.Settings.RestoreWindowLocation) { FormUtils.RestoreFormPositionAndState(this, SuperPuTTY.Settings.WindowPosition, SuperPuTTY.Settings.WindowState); } this.ResizeEnd += new EventHandler(frmSuperPutty_ResizeEnd); // tab switching this.tabSwitcher = new TabSwitcher(this.DockPanel); // full screen this.fullscreenViewState = new ViewState(this); // Apply Settings this.ApplySettings(); this.ApplySettingsToToolbars(); this.DockPanel.ContentAdded += DockPanel_ContentAdded; this.DockPanel.ContentRemoved += DockPanel_ContentRemoved; }