Exemple #1
0
 void handleScanCmd(IAsyncResult ar)
 {
     //AsyncScanCmdDelegate dlgt = (AsyncScanCmdDelegate)ar.AsyncState;
     //int speed;
     if (mdlgt.EndInvoke(ar))
     {
         if (handleScanCmd(timerScanCommand.Tag.ToString()))
         {
             CServerWrapper.setScanMsg(mInstanceID, "NavCmdSettled");
             //timerScanCommand.Stop();
             //timerScanCommand.Interval = 1000;
             //timerScanCommand.Start();
             mCmdStatus = ScanCommandStatus.Commanding;
         }
     }
 }
Exemple #2
0
 private void timerNavCmdResponse_Tick(object sender, EventArgs e)
 {
     if (mCmdStatus == ScanCommandStatus.Commanding)
     {
         ToastNotification.Show(this, "10分钟没有指令了,1分钟内没有指令将进入自动控制状态", null, 5000,
                                (eToastGlowColor)(eToastGlowColor.Red), (eToastPosition)(eToastPosition.TopCenter));
         timerScanCommand.Interval = 60000;
         timerScanCommand.Start();
         mCmdStatus = ScanCommandStatus.Leaving;
     }
     else
     {
         CGisDataSettings.AppSpeed = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["NavigationSpeed"]);
         // 五级速度,1,2,4,8,16倍速,对应20,40,80,160,320KM
         CGisDataSettings.AppSpeed = Math.Min(5, Math.Max(CGisDataSettings.AppSpeed, 1));
         mCmdStatus = ScanCommandStatus.NoCommand;
     }
 }