private void frmButtDebug_FormClosing(object sender, FormClosingEventArgs e) { ButtStatusTimer.Enabled = false; //pPlcSrv.ReleaseGroup(ButtDebugGroupName); MyInstance = null; }
private static frmButtDebug Myinstance() { if (MyInstance == null || MyInstance.IsDisposed) { MyInstance = new frmButtDebug(); MyInstance.StartPosition = FormStartPosition.CenterScreen; //MyInstance.WindowState = FormWindowState.Maximized; } else { MyInstance.BringToFront(); } return(MyInstance); }