public void InitializeDop(BarcodeScanner xSc, Size szBatt, Point ptBatt) { string sExePath = System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName; string sExeDir = System.IO.Path.GetDirectoryName(sExePath); xBCScanner = xSc; if (xBCScanner != null) { nTerminalType = xBCScanner.nTermType; xBCScanner.BarcodeScan += new BarcodeScanner.BarcodeScanEventHandler(OnScan); } TimeSync.SyncAsync("10.0.0.221"); // настройка выполняемых функций на клавиши конкретного терминала SetMainFuncDict(nTerminalType, sExeDir); xPars = (AppPars)AppPars.InitPars(sExeDir); SetBindAppPars(); xNSI = new NSI(xPars.sNSIPath, xPars.sDataPath); xNSI.ConnDTGrid(new DataGrid[] { dgDoc, dgTTN, dgMC }); Smena.ReadSm(ref xSm, xPars.sDataPath + "CS.XML"); // создать индикатор батареи xBBI = new BATT_INF(tpInOut, szBatt, ptBatt); xBBI.BIFont = 8F; // инфо-панель xFPan = new FuncPanel(this); }
private void MinimizeButton_Click(object sender, RoutedEventArgs e) { if (MinimizeButton.ToolTip.ToString() == "微缩化") { MinimizeButton.ToolTip = "恢复"; FuncPanel.BeginAnimation(OpacityProperty, new DoubleAnimation(0, Duration4)); } else { MinimizeButton.ToolTip = "微缩化"; FuncPanel.BeginAnimation(OpacityProperty, new DoubleAnimation(1, Duration4)); } }
public bool TestConn(bool bForcibly, BarcodeScanner xBCS, FuncPanel xFP) { bool ret = true; //string sOldInf = xFPan.RegInf; WiFiStat.CONN_TYPE cT = xBCS.WiFi.ConnectionType(); if ((cT == WiFiStat.CONN_TYPE.NOCONNECTIONS) || (bForcibly)) { bool bHidePan = false; if (!xFP.IsShown) { //xBCS.WiFi.IsEnabled = true; xBCS.WiFi.ShowWiFi((Control)xFP.xPan, true); xFP.ShowP(6, 50, "Переподключение к сети", "Wi-Fi"); bHidePan = true; } Cursor crsOld = Cursor.Current; Cursor.Current = Cursors.WaitCursor; xFP.RegInf = "Переподключение Wi-Fi..."; ret = xBCS.WiFi.ResetWiFi(2); if (ret) { Thread.Sleep(4000); xBCS.WiFi.GetIPList(); xFP.RegInf = "IP: " + xBCS.WiFi.IPCurrent; } else { xFP.RegInf = "Wi-Fi недоступен..."; } if (bHidePan) { xFP.HideP(); } Cursor.Current = crsOld; } return(ret); }