private void checkHasCarIn() { if (Visibility != Visibility.Visible) { checkTP.stop(); return; } bool hasCarIn = MS2.IfHasCarIn(); if (Visibility != Visibility.Visible) { checkTP.stop(); return; } if (hasCarIn == false) { if (nextStep == null) { TH.addOnceUI(BackExit.Exit); } else { TH.addOnceUI(nextStep); } checkTP.stop(); } }
public static void stop() { if (readCarThread != null) { readCarThread.stop(); } }
public void stopUpdateThread() { updateTimeTP.stop(); }
//结束并隐藏 public void stop() { timeTP.stop(); Visibility = Visibility.Hidden; time.Text = "180s"; }
//设备登陆 public static void DeviceLogin() { if (isDemo() || isTryingLogin) { return; } isTryingLogin = true; string deviceIP = null; string deviceMAC = null; string hardver = null; string softver = null; string status = null; bool isUseTestData = Config.net_dic("IsUseTestData") == "1"; if (isUseTestData) { deviceIP = Config.net_dic("deviceIP"); deviceMAC = Config.net_dic("deviceMAC"); hardver = Config.net_dic("hardver"); softver = Config.net_dic("softver"); status = Config.net_dic("status"); } else { } Dictionary <string, string> kv = new Dictionary <string, string>(); kv["deviceIP"] = deviceIP; kv["deviceMAC"] = deviceMAC; kv["hardver"] = hardver; kv["softver"] = softver; kv["status"] = status; string error = null; //test //return; MJson mj = NetHandle.Post(kv, "DeviceLogin", out error); if (error != null) { deviceLoginError = error; TipWin.showTip(error, 5000, null); } else { deviceLoginError = null; deviceID = mj["data"]["deviceID"].ToString(); wdno = mj["data"]["wdno"].ToString(); wdmc = mj["data"]["wdmc"].ToString(); } isTryingLogin = false; loginTP.resetTime(6000); if (deviceID != null && deviceID != "") { loginTP.stop(); } ////////////[TEST]/////////////////////// //MJson ret0 = UserLogin("100001", "userName", "password"); //MJson ret1 = getCPCarMsg("412201199004126586", "张三"); //UpdateRecord_Test(); ///////////////////////////////////////// }