public static FrmDebugConsole GetInstance() { if (instance == null || instance.IsDisposed) { instance = new FrmDebugConsole(); } return(instance); }
/// <summary> /// 打开调试窗口 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnDebugConsole_Click(object sender, EventArgs e) { foreach (Form frm in Application.OpenForms) { if (frm is FrmDebugConsole) { FrmDebugConsole.GetInstance().Activate(); return; } } FrmDebugConsole.GetInstance().Show(); }
public static FrmDebugConsole GetInstance(FrmWeighter console = null) { if (weighter == null || instance.IsDisposed) { weighter = console; } if (instance == null || instance.IsDisposed) { instance = new FrmDebugConsole(); instance.Show(); } return(instance); }