Beispiel #1
0
        void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            //耗时操作在后台进程进行
            Thread worker = new Thread(delegate()
            {
                var loginStatusStr = wxRobot.wait4login();


                ShowStatus(loginStatusStr);
            });

            worker.IsBackground = true;
            worker.Start();
        }
Beispiel #2
0
        void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            //耗时操作在后台进程进行
            Thread worker = new Thread(delegate()
            {
                try
                {
                    var loginStatusStr = wxRobot.wait4login();


                    ShowStatus(loginStatusStr);
                }
                catch (Exception ex)
                {
                    wxRobot.appendText(ex.Message + "\n\r" + ex.StackTrace);
                }
            });

            worker.IsBackground = true;
            worker.Start();
        }