public static Remotecontrol getInstance() { if (rtc == null || rtc.IsDisposed) { rtc = new Remotecontrol(); rtc.FormBorderStyle = FormBorderStyle.None; rtc.Dock = DockStyle.Fill; rtc.MdiParent = Cat.ActiveForm; rtc.WindowState = FormWindowState.Maximized; } return(rtc); }
//远程控制 private void 远程监控ToolStripMenuItem_Click(object sender, EventArgs e) { Form active = this.ActiveMdiChild; if (active != null) { active.Dispose(); } if (rtc == null || rtc.IsDisposed) { rtc = Remotecontrol.getInstance(); rtc.Show(); } }