private void wbMap_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { try { this.wbMap.Document.Window.Error += (sender1, e1) => { e1.Handled = true; }; ///() if (this.wbMap.Url.ToString().Equals("about:blank")) { this.picLoadMap.Visible = false; return; } if (this.wbMap.Document.GetElementById("map") == null) { this.picLoadMap.Visible = false; this.wbMap.Url = new Uri("about:blank"); MessageBox.Show("地图初始化失败!"); Record.execFileRecord("加载地图", "地图初始化失败!"); return; } this.wbMap.setMap(MainForm.myMap.getMapView()); this.pnlSetRegion.Enabled = true; } catch { this.picLoadMap.Visible = false; } this.picLoadMap.Visible = false; }
private void _mediaDownLoadThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { try { if (this._isPlayerAudio && (e.Result != null)) { if (File.Exists(e.Result.ToString())) { VideoBroadcast broadcast = new VideoBroadcast(e.Result.ToString()); broadcast.ShowDialog(); broadcast.Dispose(); broadcast = null; } } else if (!this._isPlayerAudio && File.Exists(e.Result.ToString())) { VideoBroadcast broadcast2 = new VideoBroadcast(e.Result.ToString()); broadcast2.ShowDialog(); broadcast2.Dispose(); broadcast2 = null; } } catch (Exception exception) { Record.execFileRecord("异常播放获取的音视频", exception.Message); } finally { this.pnlMedia.Enabled = true; } }
private void _worker_DoWork(object sender, DoWorkEventArgs e) { try { if (base.OrderCode == CmdParam.OrderCode.载兴趣点) { base.reResult = RemotingClient.DownData_SimpleCmd(base.ParamType, base.sValue, base.sPw, CmdParam.CommMode.未知方式, this.m_SimpleCmd); } else { string[] strArray = base.sValue.Split(new char[] { ',' }); int length = strArray.Length; int num2 = 0; if (length > 1) { foreach (string str in strArray) { base.reResult = RemotingClient.DownData_SelMultiPathAlarm(base.ParamType, str, base.sPw, CmdParam.CommMode.未知方式, this.m_PathAlarmList); num2++; this._worker.ReportProgress((int)((((double)num2) / ((double)length)) * 100.0)); } } else { base.reResult = RemotingClient.DownData_SelMultiPathAlarm(base.ParamType, base.sValue, base.sPw, CmdParam.CommMode.未知方式, this.m_PathAlarmList); } } } catch (Exception exception) { Record.execFileRecord("设置分段偏移路线报警-->", exception.Message); } }
private void gisMap1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (this.wbMap.Url.ToString().Equals("about:blank")) { this.picLoadMap.Visible = false; this.isClose = true; } else if (this.wbMap.Document.GetElementById("map") == null) { this.picLoadMap.Visible = false; this.isClose = true; this.wbMap.Url = new Uri("about:blank"); MessageBox.Show("地图初始化失败!"); Record.execFileRecord("加载地图", "地图初始化失败!"); } else if (this.wbMap.getMapList() == null) { this.picLoadMap.Visible = false; this.isClose = true; } else { this.wbMap.setMap(MainForm.myMap.getMapView()); this.isClose = false; this.picLoadMap.Visible = false; this.btnSumit.Enabled = true; this.btnSet.Enabled = true; this.btnTool.Enabled = true; this.pnlHandle.Enabled = true; } }
public void AddUserMessageToNewLog(string sReceTime, string sCarNum, string sOrderId, string sOrderType, string sOrderName, string sOrderResult, string sMsg) { if (base.m_dtLogData != null) { try { if (base.m_dtLogData.Columns.Count <= 0) { foreach (DataGridViewColumn column in base.dgvLogData.Columns) { if (!(column.Name == "CarName") && !(column.Name == "workid")) { base.m_dtLogData.Columns.Add(column.Name, typeof(string)); } } } if (!base.m_dtLogData.Columns.Contains("ColLog")) { base.m_dtLogData.Columns.Add(new DataColumn("ColLog")); } if (!base.m_dtLogData.Columns.Contains("LocalCurTime")) { base.m_dtLogData.Columns.Add(new DataColumn("LocalCurTime")); } DataRow row = base.m_dtLogData.NewRow(); row["ReceTime"] = sReceTime; row["CarNum"] = sCarNum; row["OrderId"] = sOrderId; row["OrderType"] = sOrderType; row["OrderName"] = sOrderName; row["OrderResult"] = sOrderResult; row["Describe"] = sMsg; row["LocalCurTime"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); base.m_dtLogData.Rows.Add(row); if (base.m_dvLogData.Sort.Length == 0) { base.m_dvLogData = new DataView(base.m_dtLogData, "", "LocalCurTime DESC, ReceTime DESC", DataViewRowState.CurrentRows); base.dgvLogData.DataSource = base.m_dvLogData; } int firstDisplayedScrollingRowIndex = base.dgvLogData.FirstDisplayedScrollingRowIndex; if (base.dgvLogData.SelectedRows.Count == 0) { base.dgvLogData.ClearSelection(); } if (base.m_dtLogData.Rows.Count > base.iMaxLogCnt) { base.m_dvLogData.Delete(base.iMaxLogCnt); } if (firstDisplayedScrollingRowIndex >= 0) { base.dgvLogData.FirstDisplayedScrollingRowIndex = firstDisplayedScrollingRowIndex; } base.dgvLogData.Refresh(); } catch (Exception exception) { Record.execFileRecord("最新日志添加操作->增加提示信息", exception.Message); } } }
public void BindCarTextList() { try { this.dtText.Rows.Clear(); foreach (ThreeStateTreeNode node in MainForm.myCarList.tvList.Nodes) { if (node != null) { if ((node.Tag != null) && node.Tag.Equals("CAR")) { if (node.Checked) { this.dtText.Rows.Add(new object[] { node.CarNum, node.SimNum }); } } else { this.getTreeNodeIsChecked(node, ref this.dtText); } } } this.source.DataSource = this.dtText; } catch (Exception exception) { Record.execFileRecord("多路图像查询->加载数据", exception.Message); } }
private void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { try { if ((this.dtFlag == null) || (this.dtFlag.Rows.Count <= 0)) { this.cmbFlagType.addItems("(无)", 0); } else { foreach (DataRow row in this.dtFlag.Rows) { this.cmbFlagType.addItems(row["name"].ToString(), row["id"].ToString()); } this.cmbFlagType.SelectedIndex = 0; } if ((this.dtArea != null) && (this.dtArea.Rows.Count > 0)) { this.dtArea.Columns["AreaName"].ColumnName = "Display"; this.dtArea.Columns["AreaCode"].ColumnName = "Value"; this.cmbArea.DataSource = this.dtArea; } this.btnOK.Enabled = true; } catch (Exception exception) { MessageBox.Show(exception.Message); Record.execFileRecord("MapFlag->异步加裁完成事件", exception.StackTrace); } finally { this.grpPoint.Enabled = true; WaitForm.Hide(); } }
private void MCompleteGetRefRegion(DataTable dt) { try { this.dgvSearchCarList.Columns[0].Visible = true; this.dtSearchCar.Rows.Clear(); foreach (DataRow row in dt.Rows) { string str = row["CarNum"].ToString().Trim(); string str2 = row["SimNum"].ToString(); string str3 = row["StatuName"].ToString(); string str4 = row["AreaName"].ToString(); string str5 = row["CarID"].ToString(); string str6 = row["speed"].ToString(); string str7 = "车牌:" + str + "\r\n车号:" + str5 + "\r\n电话:" + str2 + "\r\n状态:" + str3 + "\r\n属于:" + str4 + "\r\n速度:" + str6 + "km/h\r\n时间:" + row["GpsTime"].ToString() + "\r\n"; this.dtSearchCar.Rows.Add(new object[] { row["CarNum"], str7, str5, str2, row["Longitude"], row["Latitude"], str6, row["GpsTime"] }); } this.grbSearchCarList.Text = string.Format("查车结果({0})", dt.Rows.Count); this.dgvSearchCarList.Columns[2].Visible = false; } catch (Exception exception) { Record.execFileRecord("拉框查车加裁查车表", exception.Message); } }
private void ShowTopText(string sValue) { if (string.IsNullOrEmpty(sValue)) { return; } WaitForm.sText = sValue; try { this.bShow = true; if (this.m_Thread == null || this.m_Thread.ThreadState == ThreadState.Stopped) { this.m_Thread = new Thread(new ParameterizedThreadStart(this.ShowLoginingTopForm)); this.m_Thread.Start(sValue); } else { Thread.Sleep(300); WaitForm.sText = sValue; } } catch (ThreadAbortException threadAbortException) { Thread.Sleep(300); Thread.ResetAbort(); } catch (Exception exception) { Record.execFileRecord("置顶显示提示信息", exception.ToString()); } }
private void ShowLoginingTopForm(object sValue) { try { WaitForm waitForm = new WaitForm() { Text = string.Concat(Variable.sTitle, Variable.sVersion) }; waitForm.seSkin.SkinFile = Variable.sSkinFiles[Convert.ToInt32(Variable.sSkinDataIndex)]; waitForm.Show(); while (this.bShow) { waitForm.lblText.Text = WaitForm.sText; Thread.Sleep(100); waitForm.TopMost = true; Application.DoEvents(); } waitForm.Close(); waitForm = null; } catch (ThreadAbortException threadAbortException) { Thread.Sleep(300); Thread.ResetAbort(); } catch (Exception exception) { Record.execFileRecord("ShowLoginingTopForm", exception.Message); } }
private void ShowText(string sValue, IWin32Window iWin) { if (string.IsNullOrEmpty(sValue)) { return; } WaitForm.sText = sValue; try { if (WaitForm.m_Form == null) { WaitForm.m_Form = new WaitForm(); } WaitForm.m_Form.seSkin.SkinFile = Variable.sSkinFiles[Convert.ToInt32(Variable.sSkinDataIndex)]; WaitForm.m_Form.TopLevel = true; WaitForm.m_Form.lblText.Text = WaitForm.sText; try { WaitForm.m_Form.Visible = false; WaitForm.m_Form.Show(iWin); } catch (ArgumentException argumentException) { WaitForm.m_Form.Show(); } Application.DoEvents(); } catch (Exception exception) { Record.execFileRecord("显示提示信息", exception.ToString()); } }
private void wbMap_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { if (this.wbMap.Url.ToString().Equals("about:blank")) { this.picLoadMap.Visible = false; } else if (this.wbMap.Document.GetElementById("map") == null) { this.picLoadMap.Visible = false; this.wbMap.Url = new Uri("about:blank"); MessageBox.Show("地图初始化失败!"); Record.execFileRecord("加载地图", "地图初始化失败!"); } else { this.pnlHandle.Enabled = true; this.pnlTool.Enabled = true; object obj2 = this.wbMap.getMapList(); if (obj2 == null) { this.picLoadMap.Visible = false; } else { this.setMap(obj2.ToString()); this.wbMap.setMap(MainForm.myMap.getMapView()); this.picLoadMap.Visible = false; this.myTrackingCar = new dTrackingCar(this.setTrackingCar); } } }
private void _worker_DoWork(object sender, DoWorkEventArgs e) { try { string[] strArray = this.sValue.ToArray(); int length = strArray.Length; int num2 = 0; if (length > 1) { foreach (string str in strArray) { this.reResult = RemotingClient.DownData_SetRegionAlarm_FJYD(CmdParam.ParamType.SimNum, str, "", CmdParam.CommMode.未知方式, this.m_RegionAlarmList); num2++; this._worker.ReportProgress((int)((((double)num2) / ((double)length)) * 100.0)); } } else { this.reResult = RemotingClient.DownData_SetRegionAlarm_FJYD(CmdParam.ParamType.SimNum, this.sValue[0], "", CmdParam.CommMode.未知方式, this.m_RegionAlarmList); } } catch (Exception exception) { Record.execFileRecord("设置区域报警-->", exception.Message); } }
private void _worker_DoWork(object sender, DoWorkEventArgs e) { try { string[] strArray = base.sValue.Split(new char[] { ',' }); int length = strArray.Length; int num2 = 0; if (length > 1) { string[] strArray2 = strArray; for (int i = 0; i < strArray2.Length; i++) { string text1 = strArray2[i]; base.reResult = RemotingClient.DownData_SimpleCmd(base.ParamType, base.sValue, base.sPw, CmdParam.CommMode.未知方式, this.m_SimpleCmd); num2++; this._worker.ReportProgress((int)((((double)num2) / ((double)length)) * 100.0)); } } else { base.reResult = RemotingClient.DownData_SimpleCmd(base.ParamType, base.sValue, base.sPw, CmdParam.CommMode.未知方式, this.m_SimpleCmd); } } catch (Exception exception) { Record.execFileRecord("取消路线报警-->", exception.Message); } }
private void setMap(string sMapsStr) { if (this.cmbSelectMap.Items.Count <= 0) { try { this.cmbSelectMap.ComboBox.Items.Clear(); DataTable table = new DataTable(); table.Columns.Add("values", typeof(string)); table.Columns.Add("Text", typeof(string)); string[] strArray = sMapsStr.Split(new char[] { ',' }); for (int i = 0; i < strArray.Length; i++) { string[] strArray2 = strArray[i].Split(new char[] { ';' }); if (strArray2.Length == 2) { table.Rows.Add(new object[] { strArray2[0], strArray2[1] }); } } this.cmbSelectMap.ComboBox.DisplayMember = "Text"; this.cmbSelectMap.ComboBox.ValueMember = "values"; this.cmbSelectMap.ComboBox.DataSource = table; this.cmbSelectMap.ComboBox.SelectedValue = MainForm.m_sSelectedMap; } catch (Exception exception) { Record.execFileRecord("设置地图", exception.Message); } } }
private void btnPreviewDel_Click(object sender, EventArgs e) { this.pnlRegion.Visible = true; DataTable table = RemotingClient.Alarm_GetRegionInfo(); try { table.PrimaryKey = new DataColumn[] { table.Columns["regionID"] }; } catch (Exception exception) { Record.execFileRecord("预设区域-->获取数据", exception.Message); } if ((table != null) && (table.Rows.Count > 0)) { this.cmbRegion.DataSource = table; this.cmbRegion.SelectedIndex = 0; } else { this.cmbRegion.DataSource = null; this.cmbRegion.Items.Clear(); this.cmbRegion.Items.Add(m_sRegionKong); this.cmbRegion.Text = m_sRegionKong; } }
private void _mediaDownLoadThread_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { try { if (this._isPlayerAudio && (e.Result != null)) { if (File.Exists(e.Result.ToString())) { this.mediaPlayer1.VideoPlayer.URL = e.Result.ToString(); } } else if (!this._isPlayerAudio && File.Exists(e.Result.ToString())) { this.mediaPlayer1.VideoPlayer.URL = e.Result.ToString(); } } catch (Exception exception) { Record.execFileRecord("多媒体信息查询", exception.Message); } finally { base.Enabled = true; } }
public void SetCarPlace() { try { for (int i = 0; i < this.dtText.Rows.Count; i++) { DataRow row = this.dtText.Rows[i]; string str = row["Longitude"].ToString(); string sLat = row["Latitude"].ToString(); if (!string.IsNullOrEmpty(str)) { try { row["CurrentAddress"] = GisService.QueryAllLayerByPoint(str, sLat); } catch { } } } } catch (Exception exception) { Record.execFileRecord("文本位置->获取详细地址", exception.Message); } }
private void myWorker_DoWork(object sender, DoWorkEventArgs e) { try { string str = ""; string str1 = ""; str1 = (this.sCarId.IndexOf(',') <= 0 ? this.sCarId : this.sCarId.Substring(0, this.sCarId.IndexOf(',') - 1)); str = string.Concat(str, " Select Param "); str = string.Concat(str, " From GpsCarSetParam "); str = string.Concat(str, " Where CarId = ", str1); object obj = str; object[] orderCode = new object[] { obj, " And MsgType = '", (int)this.OrderCode, "'" }; str = string.Concat(orderCode); DataTable dataTable = RemotingClient.ExecSql(str); if (dataTable != null && dataTable.Rows.Count > 0) { e.Result = dataTable.Rows[0]["Param"].ToString(); } } catch (Exception exception1) { Exception exception = exception1; e.Result = null; Record.execFileRecord("取得界面参数异步方法", exception.Message); } }
private void getAddress() { object obj2 = MainForm.myMap.getTrackPointQueryInfo(this.sQueryTypeValue); if ((obj2 != null) && !string.IsNullOrEmpty(obj2.ToString())) { foreach (string str2 in obj2.ToString().Split(this.sSplit, StringSplitOptions.RemoveEmptyEntries)) { string[] strArray2 = str2.Split(new char[] { '|' }); string key = strArray2[0]; string str4 = strArray2[1]; try { DataRow row = this.dtText.Rows.Find(key); if (row != null) { row["CurrentAddress"] = str4; } } catch (Exception exception) { Record.execFileRecord("文本位置->设置地址信息", exception.Message); } } } }
private void doWorker() { if (this.dtText.Rows.Count == 0) { this.iNodeCnt = MainForm.myCarList.tvList.hasCarPath.Count; } else { this.iNodeCnt = this.dtText.Rows.Count; } WaitForm.Show("正在生成文本信息...", this); if (this.dgvCarTextList.DataSource != null) { this.dtText.Rows.Clear(); } if (worker == null) { try { worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler(this.worder_DoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.worder_RunWorkerCompleted); worker.ProgressChanged += new ProgressChangedEventHandler(this.worker_ProgressChanged); worker.WorkerReportsProgress = true; worker.RunWorkerAsync(); } catch (Exception exception) { Record.execFileRecord("文本位置->异步加载", exception.Message); } } }
protected override void btnOK_Click(object sender, EventArgs e) { base.btnOK_Click(sender, e); if (!string.IsNullOrEmpty(base.sValue)) { try { if (this.getParam()) { if (base.OrderCode == CmdParam.OrderCode.停止报警) { base.reResult = RemotingClient.StopAlarmDeal(base.ParamType, base.sValue, base.sPw, CmdParam.CommMode.未知方式, this.m_AlarmInfo, (this.m_cmd.Count > 0) ? this.m_cmd[0] : null); } else { base.reResult = RemotingClient.DownData_SimpleCmd(base.ParamType, base.sValue, base.sPw, CmdParam.CommMode.未知方式, this.m_SimpleCmd); } if (base.reResult.ResultCode != 0L) { MessageBox.Show(base.reResult.ErrorMsg); } else { if ((this._toPlatformContent.Length > 0) && (base.OrderCode == CmdParam.OrderCode.停止报警)) { SimpleCmd cmdParameter = new SimpleCmd { OrderCode = CmdParam.OrderCode.主动上报报警处理结果信息 }; RemotingClient.Car_CommandParameterInsterToDB(base.ParamType, base.sValue, base.sPw, cmdParameter, this._toPlatformContent, "上传处理结果信息"); foreach (string str in base.sValue.Split(new char[] { ',' })) { string sCarId = MainForm.myCarList.execChangeCarValue((int)base.ParamType, 1, str); ThreeStateTreeNode node = MainForm.myCarList.tvList.getNodeById(sCarId); if (node != null) { if (node.CarStatusValue.IndexOf("平台偏离路线") >= 0) { RemotingClient.ExecNoQuery(string.Format(" update GpsJtbCarPathAlarm_Platform set stopAlarmTime = dateadd(ss, " + Variable.sStopAlarmTime + ", getdate()) where CarID = '{0}' ", sCarId)); } else if (node.CarStatusValue.IndexOf("平台区域") >= 0) { RemotingClient.ExecNoQuery(string.Format(" update GpsJtbCarRegionAlarm_Platform set stopAlarmTime = dateadd(ss, " + Variable.sStopAlarmTime + ", getdate()) where CarID = '{0}' ", sCarId)); } else if (node.CarStatusValue.IndexOf("平台分路段限速") >= 0) { RemotingClient.ExecNoQuery(string.Format(" update GpsJtbCarPathSegmentAlarm_Platform set stopAlarmTime = dateadd(ss, " + Variable.sStopAlarmTime + ", getdate()) where CarID = '{0}' ", sCarId)); } } } } base.DialogResult = DialogResult.OK; } } } catch (Exception exception) { Record.execFileRecord("停止报警->确定", exception.Message); } } }
private void _worker_DoWork(object sender, DoWorkEventArgs e) { try { string[] strArray = base.sValue.Split(new char[] { ',' }); int length = strArray.Length; int num2 = 0; if (length > 1) { foreach (string str in strArray) { base.reResult = RemotingClient.icar_SetPlatformAlarmCmd(base.ParamType, str, base.sPw, CmdParam.CommMode.未知方式, this.SimpleCmd); num2++; this._worker.ReportProgress((int)((((double)num2) / ((double)length)) * 100.0)); } } else { base.reResult = RemotingClient.icar_SetPlatformAlarmCmd(base.ParamType, base.sValue, base.sPw, CmdParam.CommMode.未知方式, this.SimpleCmd); } } catch (Exception exception) { Record.execFileRecord("设置平台分路段超速报警-->", exception.Message); } }
private void ShowImage(string sFilePath) { this.linkLblDownImg.Visible = false; this.pbImage.Visible = true; Image image = null; try { if (base.dgvLogData.SelectedRows.Count != 0) { image = Image.FromFile(sFilePath); this.pbImage.Image = image; this.pbImage.Size = image.Size; } } catch (OutOfMemoryException exception) { Record.execFileRecord("显示图片", exception.Message); GC.Collect(); } catch (Exception exception2) { Record.execFileRecord("显示图片", exception2.Message); if (image != null) { image.Dispose(); image = null; } } }
private void btnAddSegment_Click(object sender, EventArgs e) { if (this.cachSegment.ContainsKey(this.txtSegment.Text.Trim())) { MessageBox.Show("已存在该路段名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } else { try { object obj2 = this.wbMap.getLineCoordStr(); if ((obj2 != null) && (obj2.ToString().Length > 0)) { if (this.cachSegment.ContainsValue(obj2.ToString())) { MessageBox.Show("该路段已存在,请添加新的路段!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); return; } this.grpSegment.Tag = obj2; } else { MessageBox.Show("请在地图上添加路段!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } this.cachSegment[this.txtSegment.Text.Trim()] = this.grpSegment.Tag.ToString(); this.setSegmentControlState(false); } catch (Exception exception) { Record.execFileRecord("路线添加路段", exception.Message); } } }
public void getTrackPointQueryInfo() { string[] separator = new string[] { "::" }; object obj2 = null; try { obj2 = MainForm.myMap.getTrackPointQueryInfo(this.sBatchNameOrder); if ((obj2 != null) && !string.IsNullOrEmpty(obj2.ToString())) { string[] strArray2 = obj2.ToString().Split(separator, StringSplitOptions.RemoveEmptyEntries); string str2 = ""; string str3 = ""; foreach (string str4 in strArray2) { int index = str4.IndexOf('|'); if (index != -1) { str2 = str4.Substring(index + 1); str3 = str4.Substring(0, index); if (MainForm.htBatchName[str3] != null) { string[] strArray3 = MainForm.htBatchName[str3].ToString().Split(new char[] { '|' }); string filterExpression = string.Format("OrderId='{0}' and CarId='{1}' and ReceTime='{2}'", strArray3[0], str3, strArray3[1]); DataRow[] rowArray = base.m_dtLogData.Select(filterExpression); if (rowArray.Length > 0) { //DataRow row; /// DataTable table = new DataTable(); DataRow row = table.NewRow(); /// object obj3 = row["Describe"]; (row = rowArray[0])["Describe"] = string.Concat(new object[] { obj3, ";位置信息[", str2, "];" }); MainForm.htBatchName.Remove(str3); ThreeStateTreeNode node = MainForm.myCarList.tvList.getNodeById(str3); if (node != null) { node.Address = str2; } } } } } if (MainForm.htBatchName.Count == 0) { this.execStopPlayTrackLine(); this.tBatchNameRemoveEventHandler(); MainForm.htBatchName = null; } } } catch (Exception exception) { Record.execFileRecord("批量点名->获取地理位置信息", exception.Message); } }
private void dgvLogData_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if ((e.RowIndex >= 0) && (e.Button == MouseButtons.Left)) { try { string sPicFolderPath = Variable.sPicFolderPath; string str2 = base.dgvLogData["ReadPicTime", e.RowIndex].Value.ToString(); string str3 = base.dgvLogData["carNum", e.RowIndex].Value.ToString(); string str4 = base.dgvLogData["simNum", e.RowIndex].Value.ToString(); string str5 = base.dgvLogData["cameraid", e.RowIndex].Value.ToString(); string s = base.dgvLogData["ReceTime", e.RowIndex].Value.ToString(); string str7 = base.m_dtLogData.Columns.Contains("PicDataType") ? base.dgvLogData["PicDataType", e.RowIndex].Value.ToString() : string.Empty; if (str7.Equals(string.Empty) || str7.Equals("1")) { this.pnlMedia.Visible = false; sPicFolderPath = sPicFolderPath + DateTime.Parse(s).ToString("yyyy-MM-dd") + @"\"; string str8 = DateTime.Parse(s).ToString("yyyyMMddHHmmssffff") + str3 + str5 + ".jpg"; FileInfo info = new FileInfo(sPicFolderPath + str8); if (!info.Exists) { for (int i = 0; i < base.m_dtLogData.Rows.Count; i++) { base.m_dtLogData.Rows[i]["showImage"] = ""; } base.dgvLogData.Rows[e.RowIndex].Cells["showImage"].Value = "正在下载"; string[] sArgLst = new string[] { str2, str3, str4, str5, s }; this.linkLblDownImg.Text = "正在下载车辆[" + str3 + "]图片,请稍候..."; this.linkLblDownImg.Visible = true; this.pbImage.Visible = false; this.GetCarImgInfo(sArgLst); } else { this.ShowImage(sPicFolderPath + str8); } } else if (str7.Equals("2")) { this.pbImage.Image = null; this.btnVideo.Visible = false; this.btnSound.Visible = true; this.pnlMedia.Visible = true; } else if (str7.Equals("3")) { this.pbImage.Image = null; this.btnVideo.Visible = true; this.btnSound.Visible = false; this.pnlMedia.Visible = true; } } catch (Exception exception) { Record.execFileRecord("显示图像", exception.Message); } } }
public void Set(ThreeStateTreeNode myNode, DataRow dr) { string str; try { string str1 = string.Concat("Attach_", myNode.CarId); string str2 = string.Concat("Attach_", dr["OrderID"].ToString(), "_", dr["CarID"].ToString()); if (dr.Table.ExtendedProperties.ContainsKey(str1)) { str = dr.Table.ExtendedProperties[str1].ToString(); } else { str = (dr.Table.ExtendedProperties.ContainsKey(str2) ? dr.Table.ExtendedProperties[str2].ToString() : ""); } string str3 = str; if (str3.Length > 0) { AttachData attachDatum = new AttachData(str3); string str4 = attachDatum.ParseAttachData("1", ""); if (str4.Trim().Length <= 0) { str4 = attachDatum.ParseAttachData("01", ""); if (str4.Trim().Length > 0) { myNode.DynamicAttr["oil"] = string.Concat(str4, "L"); } } else { myNode.DynamicAttr["oil"] = string.Concat(str4, "L"); } str4 = attachDatum.ParseAttachData("D1", "1"); if (str4.Trim().Length <= 0 || !str4.Equals("1")) { str4 = attachDatum.ParseAttachData("D1", "0"); if (str4.Trim().Length <= 0 || !str4.Equals("1")) { myNode.DynamicAttr["罐子状态"] = "停转"; } else { myNode.DynamicAttr["罐子状态"] = "卸料"; } } else { myNode.DynamicAttr["罐子状态"] = "搅拌"; } } } catch (Exception exception) { Record.execFileRecord(string.Concat("附加报文解析异常:", exception.ToString())); } }
private void wbMap_MouseUp(object sender, HtmlElementEventArgs e) { object obj2 = this.wbMap.getMapClicked(); if ((obj2 != null) && bool.Parse(obj2.ToString())) { GisMap.MapTool sTool = this.wbMap.m_sTool; if (sTool != GisMap.MapTool.设置矩形区域) { if (sTool != GisMap.MapTool.设置圆形区域) { return; } } else { try { string str = this.wbMap.getZoomBoxPoints().ToString().Trim(new char[] { ';' }); if (!string.IsNullOrEmpty(str)) { string[] strArray = str.Split(new char[] { ';' }); if ((strArray.Length >= 2) && ((strArray.Length != 2) || (strArray[0] != strArray[1]))) { string[] strArray2 = str.Replace(";", ",").Split(new char[] { ',' }); str = strArray[0] + ";"; str = ((str + strArray2[0] + "," + strArray2[3] + ";") + strArray[1] + ";") + strArray2[2] + "," + strArray2[1]; this.execRefRegion(str); } } } catch (Exception exception) { Record.execFileRecord("预设区域", exception.Message); } return; } try { string str2 = this.wbMap.getCurrentPoint().ToString().Trim(new char[] { ';' }); if (!string.IsNullOrEmpty(str2)) { string[] strArray3 = str2.Split(new char[] { ';' }); if (strArray3.Length <= 2) { str2 = strArray3[0] + "," + strArray3[1]; this.execRefRegion(str2); } } } catch (Exception exception2) { Record.execFileRecord("预设区域", exception2.Message); } } }
private bool execReadIni() { try { this.txtServerIp.Text = Variable.sServerIp; this.numPort.Value = int.Parse(Variable.sPort); this.txtMapIp.Text = Variable.sMapIp; this.numMapPort.Value = int.Parse(Variable.sMapPort); this.txtGpsAdminIp.Text = Variable.sGpsIp; this.numGpsAdminPort.Value = int.Parse(Variable.sGpsPort); this.cmbAlarmSound.Text = Variable.sAlarmSoundStatus; this.txtAlarmSoundFilePath.Text = Variable.sAlarmSoundStatusFilePath; if (Variable.sCompressDownCarInfo == "1") { this.rdoInternet.Checked = true; } else { this.rdoLan.Checked = true; } if ("0".Equals(Variable.sUseHttpProxy)) { this.rbtnTcp.Checked = true; this.rbtnHttpProxy.Checked = false; this.txtProxyIp.Enabled = false; this.numProxyPort.Enabled = false; } else { this.rbtnTcp.Checked = false; this.rbtnHttpProxy.Checked = true; } this.txtProxyIp.Text = Variable.sHttpProxyIp; this.numProxyPort.Value = int.Parse(Variable.sHttpProxyPort); this.chkAlarmWin.Checked = Variable.sAlarmPopupWindow.Trim().Equals("1", StringComparison.OrdinalIgnoreCase); this.chkUrgencySound.Checked = Variable.sCustomAlarmSound.Trim().Equals("1", StringComparison.OrdinalIgnoreCase); this.setLogFilterAlarmTypeValue = Variable.sLogFilterAlarmType; this.chkMapCarLegend.Checked = Variable.sMapCarLegendShowAreaName.Equals("1", StringComparison.OrdinalIgnoreCase); this.chkCarServerTimeRemind.Checked = Variable.sCarServerTimeRemind.Equals("1", StringComparison.OrdinalIgnoreCase); this.chkLogListAreaVisible.Checked = Variable.sLogListAreaVisible.Equals("1", StringComparison.OrdinalIgnoreCase); this.chkShowManagerSystem.Checked = Variable.sShowManagerSystem.Equals("1", StringComparison.OrdinalIgnoreCase); //建工显示车牌选项 this.rbJGCode.Checked = Variable.sJGShowCar.Equals("1"); this.rbCarNum.Checked = Variable.sJGShowCar.Equals("2"); this.rbOrg.Checked = Variable.sJGShowCar.Equals("0"); } catch (Exception exception) { Record.execFileRecord("SetParam->读取配置", exception.Message); } this.setCarDetailShowType(); this.setCarTipShowType(); return(true); }