Ejemplo n.º 1
0
 private void _003CbtnServerCtrl_MouseLeftButtonDown_003Eb__16()
 {
     try
     {
         _003C_003Ec__DisplayClass1e _003C_003Ec__DisplayClass1e = new _003C_003Ec__DisplayClass1e();
         _003C_003Ec__DisplayClass1e._003C_003E4__this = this;
         _003C_003Ec__DisplayClass1e.success           = StartSyncServer(MeetingID);
         base.Dispatcher.BeginInvoke(new Action(_003C_003Ec__DisplayClass1e._003CbtnServerCtrl_MouseLeftButtonDown_003Eb__17));
         if (_003C_003Ec__DisplayClass1e.success)
         {
             AutoClosingMessageBox.Show("啟動成功");
             try
             {
                 _003C_003Ec__DisplayClass20 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass20();
                 _003C_003Ec__DisplayClass.CS_0024_003C_003E8__locals1f = _003C_003Ec__DisplayClass1e;
                 _003C_003Ec__DisplayClass.socketClient = Singleton_Socket.GetInstance(MeetingID, UserID, UserName, false);
                 Task.Factory.StartNew(new Action(_003C_003Ec__DisplayClass._003CbtnServerCtrl_MouseLeftButtonDown_003Eb__18));
             }
             catch (Exception ex)
             {
                 LogTool.Debug(ex);
             }
         }
         else
         {
             AutoClosingMessageBox.Show("啟動失敗");
         }
     }
     catch (Exception ex2)
     {
         LogTool.Debug(ex2);
     }
 }
Ejemplo n.º 2
0
        private void GetLawData_DoAction(LawData ld)
        {
            Action action = null;
            _003C_003Ec__DisplayClass20 _003C_003Ec__DisplayClass = new _003C_003Ec__DisplayClass20();

            _003C_003Ec__DisplayClass.ld = ld;
            _003C_003Ec__DisplayClass._003C_003E4__this = this;
            if (!base.Dispatcher.CheckAccess())
            {
                base.Dispatcher.BeginInvoke(new Action <LawData>(GetLawData_DoAction), _003C_003Ec__DisplayClass.ld);
                return;
            }
            if (_003C_003Ec__DisplayClass.ld != null)
            {
                TaskFactory factory = Task.Factory;
                if (action == null)
                {
                    action = new Action(_003C_003Ec__DisplayClass._003CGetLawData_DoAction_003Eb__1d);
                }
                factory.StartNew(action);
                DataTable dataTable = MSCE.GetDataTable("select LawJson from LawData");
                if (dataTable.Rows.Count > 0)
                {
                    MSCE.ExecuteNonQuery("UPDATE [LawData] SET [LawJson] = @1", JsonConvert.SerializeObject(_003C_003Ec__DisplayClass.ld));
                }
                else
                {
                    MSCE.ExecuteNonQuery("INSERT INTO [LawData] ([LawJson])\r\n                                                            VALUES (@1)", JsonConvert.SerializeObject(_003C_003Ec__DisplayClass.ld));
                }
            }
            else
            {
                AutoClosingMessageBox.Show("無法取得資料,請稍後再試");
            }
            MouseTool.ShowArrow();
        }