private void advTree1_NodeClick(object sender, TreeNodeMouseEventArgs e) { try { Cookie c = (Cookie)e.Node.Tag; labelX2.Text = "Created : " + DateTime.FromFileTimeUtc(c.CreationTime).ToString(); labelX3.Text = "Expires : " + DateTime.FromFileTimeUtc(c.Expiry).ToString(); labelX4.Text = "Last Accessed : " + DateTime.FromFileTimeUtc(c.LastAccessed).ToString(); } catch { } }
private void advTreeSel_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { foreach (Node item in advTreeSel.SelectedNodes) { SearchItemV3_1 si = item.Tag as SearchItemV3_1; if (si != null) { m_viewModel.RemoveSelectedItem(si); } } InitTree(advTreeUnSel, m_viewModel.UnSelectedItems); InitTree(advTreeSel, m_viewModel.SelectedItems); labelSelectedCount.Text = "已经选择" + m_viewModel.SelectedItems.Count + "项"; }
private void advTree_Station_NodeClick(object sender, TreeNodeMouseEventArgs e) { Node node = e.Node; StationList station = node.Tag as StationList; if (station == null) { return; } currentStation = station; UpdateCameraStatus(null); UpdateUPSStatus(null); UpdateSolarEnergyStatus(null); }
private void tree_auth_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { Node node = tree_auth.SelectedNode; if (node == null) { return; } Authority auth = node.Tag as Authority; if (string.IsNullOrWhiteSpace(auth.Path)) { return; } AddTabForm(auth.TreeName, auth.Path, auth.id); }
private void AllConditions_NodeClick(object sender, TreeNodeMouseEventArgs e) { Node node = e.Node; if (node.Tag is AbstractCondition) { AllConditions.BeginUpdate(); selected = (AbstractCondition)node.Tag; ConditionEditor.Nodes.Clear(); foreach (Node conNode in selected.GetNodes()) { ConditionEditor.Nodes.Add(conNode); } AllConditions.EndUpdate(); } }
private void advTree1_NodeClick(object sender, TreeNodeMouseEventArgs e) { try { Node parent = e.Node; NodeCheckBox(parent); //NXOpen.Assemblies.Component clickComp = (NXOpen.Assemblies.Component)parent.Tag; //MessageBox.Show(parent.Nodes.Count.ToString()); } catch (System.Exception ex) { } }
/// <summary> /// 缴款列表选中事件 /// </summary> /// <param name="sender">TreePayInfoList</param> /// <param name="e">事件参数</param> private void TreePayInfoList_NodeClick(object sender, TreeNodeMouseEventArgs e) { Node node = e.Node; if (node.ImageKey == "Child") { if (Convert.ToInt32(node.Tag) == 0) { btnPayMent.Enabled = true; btnPrint.Enabled = false; } else { btnPayMent.Enabled = false; btnPrint.Enabled = true; } if (node.DataKey != null) { string[] sArray = node.DataKey.ToString().Split('|'); if (sArray.Length == 2) { iAccountId = Convert.ToInt32(node.Tag); ucAccountTab1.AccountId = iAccountId; iStaffId = Convert.ToInt32(sArray[0]); if (sysLoginRight.EmpId != iStaffId) { btnPayMent.Enabled = false; } if (sArray[1].Trim().Contains("预交金")) { iAccountType = 0; ucAccountTab1.TabSelectIndex = 1; InvokeController("GetDepositList", iStaffId, iAccountId); } else { iAccountType = 1; ucAccountTab1.TabSelectIndex = 0; InvokeController("GetPayMentItem", iStaffId, iAccountId); } } } } }
/// <summary> /// 节点点击事件 /// </summary> /// <param name="sender">控件对象</param> /// <param name="e">事件参数</param> private void treMidDrug_NodeClick(object sender, TreeNodeMouseEventArgs e) { OPD_PresMouldHead delrHead = ListHead.Find((OPD_PresMouldHead head) => head.PresMouldHeadID == Convert.ToInt32(treMidDrug.SelectedNode.Name)); if ((treMidDrug.SelectedNode.AccessibleDescription == "1") && (delrHead.CreateEmpID == (InvokeController("this") as AbstractController).LoginUserInfo.EmpId)) { MidDrugPresControl.Enabled = true; MidTemplateName.Text = e.Node.Text; } else { MidDrugPresControl.Enabled = false; MidTemplateName.Text = string.Empty; } MidDrugPresControl.LoadPatData(Convert.ToInt32(e.Node.Name), 99999, "xxx", 99999, "xxxx"); }
/// <summary> /// 用户列表树节点单击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void advTreeUsers_NodeClick(object sender, TreeNodeMouseEventArgs e) { //在右侧详情面板中显示用户信息 if (advTreeUsers.SelectedNode != null) { User user = (User)advTreeUsers.SelectedNode.Tag; textBoxXUAUserName.Text = user.Name; textBoxXUAUserPassword.Text = user.Password; if (user.Authority.Equals(EUserAuthority.Administrator.ToString())) { radioButtonUAAdministrator.Checked = true; } else { radioButtonUAGeneralUser.Checked = true; } } }
private void treeSchemas_NodeClick(object sender, TreeNodeMouseEventArgs e) { try { var nodeSelect = treeSchemas.SelectedNode; if (nodeSelect != null) if (nodeSelect.Name.IndexOf("SCHEMA_") > -1) { var seleniumSchemaEntity = (SeleniumSchemaEntity) nodeSelect.Tag; LoadSchema(seleniumSchemaEntity); } } catch (Exception er) { MessageBox.Show(er.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void advTree_Station_NodeClick(object sender, TreeNodeMouseEventArgs e) { Node node = e.Node; StationList station = node.Tag as StationList; if (station == null) return; if (!station.Lat.HasValue || !station.Lon.HasValue) return; mapControl.Position = new PointLatLng(station.Lat.Value, station.Lon.Value); if (station.PStationID == null) { mapControl.Zoom = PStationLevel; } else { mapControl.Zoom = StationLevel; } }
private void advTree1_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { try { if (e.Node.Parent != null && !string.IsNullOrEmpty(e.Node.Parent.Text)) { //string str = e.Node.Text + "," + e.Node.Parent.Text; //MessageBox.Show(str); frmMaterialList MaterialList = new frmMaterialList(); MaterialList.DiscreteJobsId = e.Node.Text; MaterialList.GetMaterialTaskId = e.Node.Parent.Text; MaterialList.ShowDialog(); } } catch (Exception ex) { throw ex; } }
private void advTreePoints_NodeClick(object sender, TreeNodeMouseEventArgs e) { //if (e.Button == MouseButtons.Right) //{ // if (e.Node != null && !e.Node.HasChildNodes) // { // e.Node.Checked = true; // advTreePoints.SelectedNode = e.Node; // advTreePointsMenuStrip.Show(); // } // //Node node = advTreePoints.GetNodeAt(e.X, e.Y); // //if (null != node && !node.HasChildNodes) // //{ // // node.Checked = true; // // advTreePoints.SelectedNode = node; // //} //} }
private void dogListTree_NodeClick(object sender, TreeNodeMouseEventArgs e) { try { if (e.Node.Tag is DogClass) { DogClass dc = (DogClass)e.Node.Tag; long pin1, pin2, pin3, pin4; if (long.TryParse(tbPin1.Text.Trim(), out pin1) && long.TryParse(tbPin2.Text.Trim(), out pin2) && long.TryParse(tbPin3.Text.Trim(), out pin3) && long.TryParse(tbPin4.Text.Trim(), out pin4)) { long ret = NT158App.NT158Login(dc.keyHandle, pin1, pin2, pin3, pin4); if (ret != 0) { log.Error("登陆加密狗异常:" + GetError(ret)); MessageBox.Show("登陆加密狗异常:" + GetError(ret)); return; } panelPrivate.Enabled = true; _selectedDogClass = dc; lbDevNo.Text = _selectedDogClass.uid; DoReadPrivate(); } else { MessageBox.Show("密钥格式必须为long数据!"); } } else { panelPrivate.Enabled = false; } } catch (Exception ex) { log.Error("执行操作异常:", ex); MessageBox.Show("执行操作异常:" + ex.Message); } }
private void treeSchema_NodeClick(object sender, TreeNodeMouseEventArgs e) { try { Node nodeSelect = treeSchema.SelectedNode; if (nodeSelect != null) { if (nodeSelect.Name.IndexOf("SCHEMA_") > -1) { SqlSchemaEntity sqlSchemaEntity = (SqlSchemaEntity)nodeSelect.Tag; txtSqlSchemaID.Text = sqlSchemaEntity.ID; txtSqlSchemaName.Text = sqlSchemaEntity.Name; SqlConfig.LoadSchemaTables(txtSqlSchemaID.Text, dgvSelectTable); } } } catch (Exception er) { MessageBox.Show(er.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
/// <summary> /// 缴款树点击事件 /// </summary> /// <param name="sender">sender</param> /// <param name="e">e</param> private void TreeAccount_NodeClick(object sender, TreeNodeMouseEventArgs e) { InvokeController("ChangeValue", frmName); if (!e.Node.HasChildNodes && e.Node.Tag != null) { OP_Account curAccount = (OP_Account)e.Node.Tag; if (curAccount.AccountFlag == 0) { btnAccount.Enabled = true; btnPrint.Enabled = false; } else { btnAccount.Enabled = false; btnPrint.Enabled = true; } //tabControl1.SelectedTabIndex = curAccount.AccountType; CurAccount = curAccount; InvokeController("GetAccountData"); } }
private void treeProdef_NodeClick(object sender, TreeNodeMouseEventArgs e) { _e1 = e; _obj1 = sender; try { Node nodeSelect = treeProdef.SelectedNode; if (nodeSelect != null) { if (nodeSelect.CheckBoxVisible) { /*if (nodeSelect.Name.IndexOf("PROPACKAGE_") > -1) * { * bool IsChecked = !nodeSelect.Checked; * nodeSelect.Checked = IsChecked; * nodeSelect.Nodes.ToList<Node>().ForEach(p => * { * p.Checked = IsChecked; * }); * } * else if (nodeSelect.Name.IndexOf("PRODEF_") > -1) * { * bool IsChecked = !nodeSelect.Checked; * nodeSelect.Checked = IsChecked; * if (!nodeSelect.Checked) * { * nodeSelect.Parent.Checked = false; * } * }*/ } } } catch (Exception er) { MessageBox.Show(er.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void treeBizdef_NodeClick(object sender, TreeNodeMouseEventArgs e) { try { Node nodeSelect = treeBizdef.SelectedNode; if (nodeSelect == null) { return; } if (nodeSelect.Name.IndexOf("FORMS_") > -1) { if (BizdefIntserface != null) { BizdefFormEntity bizdefForm = (BizdefFormEntity)nodeSelect.Tag; txtURL.Text = bizdefForm.LinkUrl; } } } catch (Exception er) { MessageBox.Show(er.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void treeTables_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { try { Node nodeSelect = treeTables.SelectedNode; if (nodeSelect != null) { if (nodeSelect.Name.IndexOf("TABLESPACE_", StringComparison.Ordinal) > -1) { if (!nodeSelect.HasChildNodes) { SqlConfig.LoadTablesToTree(nodeSelect.Text, nodeSelect); } } //setSelectText(nodeSelect); } } catch (Exception er) { MessageBox.Show(er.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void treeProdef_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { try { Node nodeSelect = treeProdef.SelectedNode; if (nodeSelect != null) { if (nodeSelect.Name.IndexOf("PROPACKAGE_") > -1) { if (!nodeSelect.HasChildNodes) { PropackageEntity propackageEntity = (PropackageEntity)nodeSelect.Tag; ProTree.CreateProDef(nodeSelect, propackageEntity.Id, true); } } } } catch (Exception er) { MessageBox.Show(er.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void Tree_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { SetListPanel(e.Node as KeyNode); }
//双击关闭树状图下拉列表 private void AdvTree_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { comboTreeCity.IsPopupOpen = false; }
protected virtual void OnNodeClick(object sender, TreeNodeMouseEventArgs e) { EventHandler <TreeNodeMouseEventArgs> handler = NodeClick; handler?.Invoke(sender, e); }
/// <summary> /// 单击节点,跳转到设备所在的位置。 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void advTreeMeshList_NodeClick(object sender, TreeNodeMouseEventArgs e) { DevComponents.AdvTree.Node selectNode = advTreeMeshList.SelectedNode; //设备不在线,不执行后续操作 if (selectNode == null || selectNode.Level != 1) { return; } Cell selectCell = selectNode.GetCellAt(e.X, e.Y); if (selectCell == null) { return; } if (selectNode.Level == 1 && selectCell.Images != null) { MeshAllInfo mai = (MeshAllInfo)selectNode.Tag; GPSInfo vp = mai.MeshGPSInfo; //GPS坐标为(0,0),不能执行定位操作 if (selectCell.Images.ImageIndex == 9 && BuddyBMapControl != null) {//点中了离线设备 BuddyBMapControl.SelectMeshDevice(null); } if (selectCell.Images.ImageIndex == 10 && vp.Lat != 0 && vp.Lon != 0 && BuddyBMapControl != null) { //地图上跳转到设备所在的位置 BuddyBMapControl.Center = new LatLngPoint(vp.Lon, vp.Lat); BuddyBMapControl.Locate(false); //选中目标Mesh设备 BuddyBMapControl.SelectMeshDevice(mai.BuddyBMeshPoint); } else if (selectCell.Images.ImageIndex == 11) { MessageBox.Show("设备不在线!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (selectCell.Images.ImageIndex == 12 && selectNode.Cells[1].Text.Equals("在线")) { if (BuddyBMapControl != null) { BuddyBMapControl_OnOpenVideo(mai.BuddyBMeshPoint); } else if (BuddyGrid != null) { VideoInject inject = new VideoInject(mFormMain.AllApplicationSetting[ApplicationSettingKey.VideoServerIPV4], mFormMain.AllApplicationSetting[ApplicationSettingKey.VideoServerUserName], mFormMain.AllApplicationSetting[ApplicationSettingKey.VideoServerPassword]); Panel panel = BuddyGrid.GetNextAvailablePanel(); Process process = inject.injectPanel(panel, mFormMain.GetVideoFullScreenLocation(), BuddyGrid.GetFullScreenPanel(), mai.PlanInfo.Model265ID, "0"); BuddyGrid.BindPanelProcess(panel, process); mFormMain.VideoProcesses.Add(process); logger.Info(string.Format("在第{0}个Panel中打开了视频。", panel.Tag.ToString())); } } else if (selectCell.Images.ImageIndex == 13 && BuddyBMapControl != null) { bool isDrawingRoute = (bool)selectCell.Tag; if (isDrawingRoute) {//已经绘制,再次点击的时候隐藏已绘制的轨迹 BuddyBMapControl.DeleteDeviceRoute(mai.PlanInfo.Model265ID); selectCell.Tag = false; } else { //在地图上绘制轨迹记录 FGPSTimeSelect fgpsts = new FGPSTimeSelect(); fgpsts.StartDateTime = DateTime.Today.Subtract(new TimeSpan(1, 0, 0, 0)); fgpsts.StopDateTime = DateTime.Today; if (DialogResult.OK == fgpsts.ShowDialog() && BuddyBMapControl != null) { BMeshRoute bmr = FileUtils.ReadMeshRouteFromGPSLogs( mai.PlanInfo.Model265ID, fgpsts.StartDateTime, fgpsts.StopDateTime); if (bmr.DeviceLocationList.Count > 0) { BuddyBMapControl.AddDeviceRoute(bmr); //地图上跳转到设备所在的位置 BuddyBMapControl.Center = bmr.DeviceLocationList[0]; BuddyBMapControl.Locate(false); BuddyBMapControl.Zoom = 16; selectCell.Tag = true; //标识已经绘制了路径 logger.Info(string.Format("查看{0}设备的GPS轨迹记录,供{1}条GPS记录。", mai.PlanInfo.Model265ID, bmr.DeviceLocationList.Count)); } else { MessageBox.Show("无历史轨迹记录。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } } } } }
private void BeComRulesNodeClick(object sender, TreeNodeMouseEventArgs e) { _selected = e.Node; _selectedTree = BeRotations; }
private void BeComRulesNodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { EditRule(e.Node); }
private void advTreeUnSel_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { SelectedNode(e.Node); }
private void treeDepartment_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { Select(); }
private void advTreeGroup_NodeClick(object sender, TreeNodeMouseEventArgs e) { e.Node.Checked = !e.Node.Checked; if (!string.IsNullOrEmpty(releaseHeaderIds)) { releaseHeaderIds += ","; } if (e.Node.Parent != null) { //Select discretejob to get data, and then excuted mark operation //if (e.Node.Parent.Tag as AscmWipDiscreteJobs != null) // this.taskId = ((AscmWipDiscreteJobs)e.Node.Parent.Tag).wipEntityId.ToString(); if (e.Node.Tag as AscmWipRequirementOperations != null) { this.jobId = ((AscmWipRequirementOperations)e.Node.Tag).id.ToString(); } //Confirmed tasks Id or discrete jobs Id string getMaterialId = "[" + this.jobId + "]"; if (e.Node.Checked) { releaseHeaderIds += getMaterialId; } else { if (!string.IsNullOrEmpty(releaseHeaderIds)) { releaseHeaderIds = releaseHeaderIds.Replace(getMaterialId, ""); } } } else { //Select task's details if (e.Node.Tag as AscmWipDiscreteJobs != null) { this.taskDetails = (AscmWipDiscreteJobs)e.Node.Tag; } //Select the job associated with the selected task if (e.Node.Expanded) { foreach (Node node in e.Node.Nodes) { node.Checked = e.Node.Checked; } } //Confirmed tasks Id or discrete jobs Id string getMaterialId = this.taskDetails.wipEntityId.ToString(); if (!string.IsNullOrEmpty(this.taskDetails.mtlCategoryStatus)) { getMaterialId = getMaterialId + ":" + this.taskDetails.mtlCategoryStatus; } if (e.Node.Checked) { releaseHeaderIds += getMaterialId; } else { if (!string.IsNullOrEmpty(releaseHeaderIds)) { string[] arr = releaseHeaderIds.Split(','); releaseHeaderIds = ""; foreach (string s in arr) { if (s != getMaterialId && !string.IsNullOrEmpty(s)) { if (!string.IsNullOrEmpty(releaseHeaderIds)) { releaseHeaderIds += ","; } releaseHeaderIds += s; } } //releaseHeaderIds = releaseHeaderIds.Replace(getMaterialId, ""); } } } }
private void treePara_NodeClick(object sender, TreeNodeMouseEventArgs e) { AutoCheck(); }