Пример #1
0
        public static FrmDebugConsole GetInstance()
        {
            if (instance == null || instance.IsDisposed)
            {
                instance = new FrmDebugConsole();
            }

            return(instance);
        }
Пример #2
0
        /// <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();
        }
Пример #3
0
        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);
        }