Пример #1
0
 public static OutPutForm GetInstacne()
 {
     if (uniqueInstance == null)
     {
         uniqueInstance = new OutPutForm();
     }
     return(uniqueInstance);
 }
Пример #2
0
 private void SetOutPutTextInner(string text)
 {
     if (OutPutForm.GetInstacne().InvokeRequired)
     {
         var threadWork = new ThreadAddText(OutPutForm.Log);
         this.Invoke(threadWork, text);
     }
     else
     {
         OutPutForm.Log(text);
     }
 }
Пример #3
0
        //点击菜单,显示输出区子窗体
        private void OutPutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OutPutForm        outPutForm = OutPutForm.GetInstacne();
            ToolStripMenuItem item       = (ToolStripMenuItem)sender;

            item.Checked = !item.Checked;
            if (item.Checked)
            {
                outPutForm.Show(dockPanel1, DockState.DockBottom);
            }
            else
            {
                outPutForm.Hide();
            }
        }
Пример #4
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            //显示FuncItem
            FuncItemsForm fItemsWnd = FuncItemsForm.GetInstance();

            fItemsWnd.Show(dockPanel1, DockState.DockLeft);

            //显示Property
            PropertyForm propertyWnd = PropertyForm.GetInstance();

            propertyWnd.Show(dockPanel1, DockState.DockRight);

            //显示OutPutForm
            OutPutForm outPutForm = OutPutForm.GetInstacne();

            outPutForm.Show(dockPanel1, DockState.DockBottom);
        }
Пример #5
0
 public static void Log(string text)
 {
     OutPutForm.GetInstacne().AddText(text);
 }