예제 #1
0
 void WorkerReboot_DoWork(object sender, DoWorkEventArgs e)
 {
     Thread.Sleep(1000);
     CopyDataToReal();
     ThreadMain.Run();
     XtraMessageBox.Show("Выполнена перезагрузка потока.", "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information);
 }
예제 #2
0
        /// <summary>
        /// Start按钮按下后,开启程序任务
        /// </summary>
        private void StartMailServerTask()
        {
            if (tdMain == null && !ThreadMain.isStart && !ThreadMain.stop)
            {
                tdMain = new ThreadMain();
                tdMain.StartMainThread();

                this.TxtServerStatus.Text = "Run";
            }
        }
예제 #3
0
        /// <summary>
        /// Stop按钮按下后,结束程序任务
        /// </summary>
        private void StopMailServerTask()
        {
            if (tdMain != null)
            {
                tdMain.StopMainThread();

                this.TxtServerStatus.Text = "Stop";

                tdMain = null;
            }
        }
예제 #4
0
        /// <summary>
        /// Закрытие подключений.
        /// </summary>
        public void OPCDisconnect()
        {
            if (ThreadMain != null)
            {
                ThreadMain.Stop();
            }

            if (OPCServerRealCollection != null)
            {
                foreach (OPCServerReal opcServer in OPCServerRealCollection)
                {
                    opcServer.TryDisconnect();
                }
            }
        }
예제 #5
0
        private void StartSystemThreads()
        {
            ThreadRHI.FromCurrent("RHI");
            ThreadMain.FromCurrent("Main");
            ThreadEditor.FromCurrent("Editor");

            ThreadLogic.StartThread("Logic", null);
            ThreadRender.StartThread("Render", null);
            ThreadAsync.StartThread("AsyncIO", null);
            ThreadPhysics.StartThread("Physics", null);

            if (CIPlatform.Instance.PlayMode != CIPlatform.enPlayMode.Game)
            {
                ThreadAsyncEditor.StartThread("AsyncEditor", null);
                ThreadAsyncEditorSlow.StartThread("AsyncEditorSlow", null);
            }

            EventPoster.StartPools(Desc.ThreadPoolCount);
        }
예제 #6
0
 public new bool CheckComplete(int time = 500)
 {
     return(ThreadMain.Join(time));
 }
예제 #7
0
 public new void Start()
 {
     this.ThreadMain = new Thread(Sort);
     ThreadMain.Name = "BubbleSort";
     ThreadMain.Start();
 }