예제 #1
0
 /// <summary>
 ///  切换选中行事件——通讯
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tlCommunication_RowClick(object sender, DevExpress.XtraTreeList.RowClickEventArgs e)
 {
     try
     {
         DeviceClickEventArgs args = new DeviceClickEventArgs();
         args.Key   = e.Node.Tag == null ? "" : e.Node.Tag.ToString().Trim();
         args.Param = e.Node.GetDisplayText(tlCommunication.Columns[0]);
         SelectedNodeChanged(args, true);
     }
     catch (Exception ex)
     {
         ErrorLog.Error(ex.StackTrace.ToString());
     }
 }
예제 #2
0
        private void Account_TreeList_RowClick(object sender, DevExpress.XtraTreeList.RowClickEventArgs e)
        {
            if (e.Button == MouseButtons.Right && ClientCommon.HasAuthority(UserInfo.UserRole, BSRole.QuanLyBSG))
            {
                TreeList        tl      = (TreeList)sender;
                TreeListHitInfo hitInfo = tl.CalcHitInfo(e.Location);
                if (hitInfo.Node != null)
                {
                    tl.FocusedNode = hitInfo.Node;
                }

                Point point = Cursor.Position;
                popupMenu.ShowPopup(point);
            }
        }
예제 #3
0
 /// <summary>
 /// 切换选中行事件——设备
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void tlDevice_RowClick(object sender, DevExpress.XtraTreeList.RowClickEventArgs e)
 {
     try
     {
         DeviceClickEventArgs args = new DeviceClickEventArgs();
         args.Key = e.Node.Tag == null ? "" : e.Node.Tag.ToString().Split('|')[0];
         if (args.Key.Contains("Analysis"))
         {
             args.Param = e.Node.Tag.ToString().Split('|')[1];
             SelectedNodeChanged(args, true);
             return;
         }
         PluginInfo p = Program.devicePluginManager.GetPlugin(args.Key);
         args.SetupUI = p != null ? p.SetupUI : null;
         if (DeviceClick != null)
         {
             DeviceClick(this, args);
         }
     }
     catch (Exception ex)
     {
         ErrorLog.Error(ex.StackTrace.ToString());
     }
 }