private void monitorButton_Click(object sender, EventArgs e) { MonitorForm form = new MonitorForm(); Hide(); form.Show(); }
public void OpenSshSessionWindow(SessionConfig sessionConfig) { FATabStripItem page = new FATabStripItem(); MonitorForm form = new MonitorForm(sessionConfig); form.FormBorderStyle = FormBorderStyle.None; form.TopLevel = false; form.Dock = DockStyle.Fill; form.Show(); page.Tag = sessionConfig; page.Name = "page-" + TAB_INDEX; page.Title = string.Format("{0} {1}", faTab.Items.Count + 1, sessionConfig.Name); page.Controls.Add(form); TAB_MONITOR.Add(page, form); faTab.Items.Add(page); faTab.SelectedItem = page; page.ContextMenuStrip = contextMenuStrip1; TAB_INDEX++; tsl_info1.Text = sessionConfig.Host + "@" + sessionConfig.UserName; }
private void toolStripButton2_Click(object sender, EventArgs e) { if (monitorForm.IsDisposed != true) { monitorForm.Show(); //弹出这个窗口 monitorForm.Focus(); //激活显示 } else { monitorForm = new MonitorForm(); monitorForm.Show(); //弹出这个窗口 monitorForm.Focus(); //激活显示 } }