Ejemplo n.º 1
0
        /// <summary>
        /// 更新菜单基础部件 有则更新无则增加
        /// </summary>
        /// <param name="menuItem">基础部件</param>
        public void UpdateMenuItem(IIMenuItem menuItem)
        {
            if (_dictionaryMenuItems.ContainsKey(menuItem.Id))
            {
                _dictionaryMenuItems[menuItem.Id] = menuItem;

                var args = new PublishEventArgs()
                {
                    EventType = PublishEventType.Core,
                    EventId   = EventIdAssign.MenuComponentUpdate,
                };
                args.AddParams(menuItem.Id);
                EventPublish.PublishEvent(args);
            }
            else
            {
                _dictionaryMenuItems.Add(menuItem.Id, menuItem);
                var args = new PublishEventArgs()
                {
                    EventType = PublishEventType.Core,
                    EventId   = EventIdAssign.MenuComponentAdd,
                };
                args.AddParams(menuItem.Id);
                EventPublish.PublishEvent(args);
            }
        }
        /// <summary>
        /// 当选择的终端发送变化时,如果
        /// </summary>
        public override void OnNodeSelectActive()
        {
            if (NodeType != TypeOfTabTreeNode.IsGrp && NodeType != TypeOfTabTreeNode.IsAll)
            {
                return;
            }
            if (NodeType == TypeOfTabTreeNode.IsGrp)
            {
                var info = Wlst.Sr.EquipmentInfoHolding.Services.ServicesGrpSingleInfoHold.GetGroupInfomation(AreaId,
                                                                                                              NodeId);
                if (info == null)
                {
                    return;
                }
            }

            //base.OnNodeSelect();
            //发布事件  选中当前节点
            var args = new PublishEventArgs
            {
                EventType = PublishEventType.Core,
                EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.GroupSelected,
            };

            args.AddParams(new Wlst.Sr.EquipmentInfoHolding.Model.SelectedInfo(AreaId, NodeId,
                                                                               SelectedInfo.SelectType.SingleGrp));

            EventPublish.PublishEvent(args);

            //  base.OnNodeSelectActive();
            TreeNodeItemSingleGroupViewModel.CurrentSelectGroupNode = this;

            // ResetContextMenu();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 停止编辑名称,此时需要进行前台空间状态变换并回写数据
 /// </summary>
 public void StopEditName()
 {
     LabNameVisi = Visibility.Visible;
     TxbNameVisi = Visibility.Collapsed;
     if (NodeName != BackUpName && BackUpName != "")
     {
         if (NodeType == TreeNodeType.IsPartition)
         {
             //需要对所有标记本分组的终端宣布新分组信息
             var args = new PublishEventArgs()
             {
                 EventType = PublishEventTypeLocal.Name,
                 EventId   =
                     PublishEventTypeLocal.GrpAreaReloadTmlGroup
             };
             EventPublish.PublishEvent(args);
         }
         else
         {
             //不修改
             NodeName = BackUpName;
         }
         if (NodeName.Length > 15)
         {
             NodeName = NodeName.Substring(0, 14);
         }
         if (NodeName.Length < 1)
         {
             NodeName = BackUpName;
         }
         BackUpName = NodeName;
     }
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 当选择的终端发送变化时,如果
        /// </summary>
        public override void OnNodeSelectActive()
        {
            if (IsSelectedByCode == false)
            {
                //base.OnNodeSelect();
                //发布事件  选中当前节点
                var args = new PublishEventArgs
                {
                    EventType       = PublishEventType.Core,
                    EventId         = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
                    EventAttachInfo = NodeId != TreeSelectedOne ? "Tree" : "TreeSelf",//如果点击的是联动查询框中的节点则发送Treeaa,在事件接收处屏蔽相应操作。
                };
                args.AddParams(NodeId);

                EventPublish.PublishEvent(args);
                //lvf  2018年5月22日14:40:48  记录当前点击终端
                Wlst.Sr.EquipmentInfoHolding.Services.Others.CurrentSelectRtuId = NodeId;
            }

            if (this.ChildTreeItems.Count > 0)
            {
                this.ChildTreeItems.Clear();
            }

            if (UxTreeSetting.IsShowGrpInTreeModelShowTmlChildNode)
            {
                //  this.ThisNodeAddLoopsNode();
                this.ThisNodeAddPartsNode();
                this.IsExpanded = true;
            }

            TreeNodeItemTmlViewModel.CurrentSelectedTreeNode = this;

            //ResetContextMenu();
        }
Ejemplo n.º 5
0
        void Loadfromxml()
        {
            //Todo load data from db or xml txt
            var tmp   = FrLocalInst.LoadRtufromTxt();
            int index = 1;

            foreach (var f in tmp)
            {
                if (ItemsMultGrp.ContainsKey(f.Item1))
                {
                    continue;
                }
                var tmpr = new GroupInformation(new GroupItemsInfo.GroupItem()
                {
                    AreaId    = -1,
                    GroupName = f.Item2,
                    GroupId   = f.Item1,
                    LstTml    = f.Item3
                })
                {
                    Index = index++
                };
                ItemsMultGrp.Add(f.Item1, tmpr);
                ;
            }

            var arg = new PublishEventArgs()
            {
                EventId   = EventIdAssign.MulityInfoGroupAllNeedUpdate,
                EventType = PublishEventType.Core
            };

            EventPublish.PublishEvent(arg);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 更新快捷键信息,立即回写数据库并发布事件
        /// </summary>
        /// <param name="menuId">菜单部件唯一标示</param>
        /// <param name="shortcut"></param>
        public void UpdateShortCut(int menuId, string shortcut)
        {
            if (string.IsNullOrEmpty(shortcut))
            {
                if (DicClassic.ContainsKey(menuId))
                {
                    DicClassic.Remove(menuId);
                }
            }
            else
            {
                if (!DicClassic.ContainsKey(menuId))
                {
                    DicClassic.Add(menuId, shortcut);
                }
                else
                {
                    DicClassic[menuId] = shortcut;
                }
            }
            var args = new PublishEventArgs()
            {
                EventType = PublishEventType.Core,
                EventId   = EventIdAssign.MenuShourtCutsUpdate,
            };

            args.AddParams(menuId);
            EventPublish.PublishEvent(args);
            this.WriteUpdateDbByPrivate(menuId);
        }
 /// <summary>
 /// 更新基础部件 有则更新无则增加
 /// </summary>
 /// <param name="item">基础部件</param>
 public void UpdateEventSchduleTaskItem(IIEventSchduleTask item)
 {
     if (_dicItems.ContainsKey(item.EventSchduleClassId))
     {
         _dicItems[item.EventSchduleClassId] = item;
         var args = new PublishEventArgs()
         {
             EventType = PublishEventType.Core,
             EventId   = Services.EventIdAssign.EventSchduleTaskComponentUpdate,
         };
         args.AddParams(item.EventSchduleClassId);
         EventPublish.PublishEvent(args);
     }
     else
     {
         _dicItems.Add(item.EventSchduleClassId, item);
         var args = new PublishEventArgs()
         {
             EventType = PublishEventType.Core,
             EventId   = Services.EventIdAssign.EventSchduleTaskComponentAdd,
         };
         args.AddParams(item.EventSchduleClassId);
         EventPublish.PublishEvent(args);
     }
 }
        /// <summary>
        /// 从数据库中读取资源数据 ,在程序初始化的时候执行,模块内部会执行,其他地方不允许执行
        /// </summary>
        private void InnerLoad()
        {
            DicClassic.Clear();
            var ssss = Convert.ToInt32(SqlLiteHelper.ExecuteQuery(
                                           "SELECT COUNT(*) as count FROM sqlite_master WHERE type='table' and name= 'menu_classic'").
                                       Tables[0].Rows[0][0].ToString().Trim());


            if (ssss < 1)
            {
                SqlLiteHelper.ExecuteQuery(
                    "CREATE TABLE 'menu_classic' ('id' integer PRIMARY KEY,'name' text,'" +
                    "content' text)");
            }


            try
            {
                DataSet ds = SqlLiteHelper.ExecuteQuery("select * from menu_classic", null);
                if (ds == null)
                {
                    return;
                }
                int mCount = ds.Tables[0].Rows.Count;
                for (int i = 0; i < mCount; i++)
                {
                    try
                    {
                        // (id integer NOT NULL,tag text,name text NOT NULL,tooltips text)
                        int id = Convert.ToInt32(ds.Tables[0].Rows[i]["id"].ToString().Trim());
                        if (id >= MenuIdControlAssign.MenuClassicIdMin &&
                            id <= MenuIdControlAssign.MenuClassicIdMax)
                        {
                            string name    = ds.Tables[0].Rows[i]["name"].ToString().Trim();
                            string content = ds.Tables[0].Rows[i]["content"].ToString().Trim();
                            this.UpdateMneu(id, name, content);
                        }
                    }
                    catch (Exception ex)
                    {
                        WriteLog.WriteLogError(ex.ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                WriteLog.WriteLogError(
                    "Class SupperClassicDataHoldingExtend Function loadItem from SQLlite table menu_classic  Occer an Error:" +
                    ex.ToString());
            }

            var args = new PublishEventArgs()
            {
                EventId =
                    EventIdAssign.ClassicMenuLoadUpdate,
                EventType = PublishEventType.Core
            };

            EventPublish.PublishEvent(args);
        }
Ejemplo n.º 9
0
        //#endregion

        private void ExAsynTime(string session, Wlst.mobile.MsgWithMobile args)
        {
            if (args.WstRtuOrders == null || args.WstRtuOrders.Op != 21)
            {
                return;
            }

            var lst = args.WstRtuOrders.RtuIds;

            if (lst == null)
            {
                return;
            }

            var ar = new PublishEventArgs
            {
                EventId   = Cr.CoreOne.CoreIdAssign.EventIdAssign.AsyncTimeEventId,
                EventType = PublishEventType.Core
            };

            ar.AddParams(lst);
            EventPublish.PublishEvent(ar);

            foreach (var f in lst)
            {
                string tmlName = "Reserve";
                var    g       = Wlst.Sr.EquipmentInfoHolding.Services.EquipmentDataInfoHold.GetInfoById(f);
                if (g != null)
                {
                    tmlName = g.RtuName;
                }
                Wlst.Cr.CoreMims.ShowMsgInfo.ShowNewMsg.AddNewShowMsg(
                    f, tmlName, Wlst.Cr.CoreMims.ShowMsgInfo.OperatrType.ServerReply, "对时成功");
            }
        }
        /// <summary>
        /// 当选择的终端发送变化时,如果
        /// </summary>
        public override void OnNodeSelectActive()
        {
            if (IsSelectedByCode == false)
            {
                //base.OnNodeSelect();
                //发布事件  选中当前节点
                var args = new PublishEventArgs
                {
                    EventType = PublishEventType.Core,
                    EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
                };
                args.AddParams(NodeId);
                EventPublish.PublishEvent(args);
            }

            if (this.ChildTreeItems.Count > 0)
            {
                this.ChildTreeItems.Clear();
            }
            if (UxTreeSetting.IsShowGrpInTreeModelShowTmlChildNode)
            {
                //  this.ThisNodeAddLoopsNode();
                this.ThisNodeAddPartsNode();
                this.IsExpanded = true;
            }

            TreeNodeItemTmlViewModel.CurrentSelectedTreeNode = this;

            //ResetContextMenu();
        }
Ejemplo n.º 11
0
        private void ExDeleteFolderFolder()
        {
            if (NodeType == TreeNodeType.IsGrp)
            {
                if (RootChilds != null && RootChilds.Contains(this))
                {
                    RootChilds.Remove(this);
                }
            }
            else if (NodeType == TreeNodeType.IsTml)
            {
                if (NodeId != 0 && _father != null)
                {
                    var    father  = this._father;
                    string pathArg = "" + NodeId;
                    while (father != null)
                    {
                        pathArg = father.NodeId + "-" + father.NodeName + "/" + pathArg;
                        father  = father._father;
                    }

                    var args = new PublishEventArgs()
                    {
                        EventType = PublishEventTypeLocal.Name,
                        EventId   =
                            PublishEventTypeLocal.DeleteGrpPathByCommandBasicShowGroupManage
                    };
                    args.AddParams(NodeId, pathArg);
                    EventPublish.PublishEvent(args);
                }
            }

            // if (_father != null) _father.AddChild();
        }
        /// <summary>
        /// 更新菜单实例信息
        /// </summary>
        /// <param name="instanceId">菜单实例地址 </param>
        /// <param name="instanceKey">该实例菜单关键字 </param>
        /// <param name="lst">所有菜单实例信息的集合,必须包含一个节点信息为 fatherId=0的根节点</param>
        public void UpdateMenuInstanceRelation(int instanceId, string instanceKey, IEnumerable <Wlst.Sr.Menu.Models.MenuInstancesRelation> lst)
        {
            if (DicInstanceRelation.ContainsKey(instanceId))
            {
                DicInstanceRelation[instanceId].Clear();
            }
            else
            {
                DicInstanceRelation.Add(instanceId, new Dictionary <Tuple <int, int>, Wlst.Sr.Menu.Models.MenuInstancesRelation>());
            }
            foreach (var t in lst)
            {
                this.AddMenuInstanceRelation(t.FatherId, t.Id, t.SortIndex, t.Name, t.InstancesId);
            }
            var args = new PublishEventArgs()
            {
                EventType = PublishEventType.Core,
                EventId   = EventIdAssign.MenuInstanceRelationUpdate
            };

            args.AddParams(instanceId);
            args.AddParams(instanceKey);
            EventPublish.PublishEvent(args);

            WriteUpdateDbByPrivate(instanceId);
        }
Ejemplo n.º 13
0
        private void InitEvent(int i)
        {
            var args = new PublishEventArgs()
            {
                EventType = "Wlst.Ux.Nr6005Module.Wj3005TmlInfoSetViewModel.ViewModel.RtuLoopInfoVm",
                EventId   = 20161012
            };

            args.AddParams(i, this);
            EventPublish.PublishEvent(args);
        }
Ejemplo n.º 14
0
        private void ExDelete()
        {
            var args = new PublishEventArgs()
            {
                EventType = PublishEventTypeLocal.Name,
                EventId   = PublishEventTypeLocal.DeleteGrpPathByCommandBasicShowGroupManage
            };

            args.AddParams(Id, GrpId, GrpName, AreaId);
            EventPublish.PublishEvent(args);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// 从数据库中读取资源数据
        /// 在程序初始化的时候执行
        /// </summary>
        private void InnerLoad()
        {
            var ssss = Convert.ToInt32(SqlLiteHelper.ExecuteQuery(
                                           "SELECT COUNT(*) as count FROM sqlite_master WHERE type='table' and name= 'menu_shortcuts'").
                                       Tables[0].Rows[0][0].ToString().Trim());


            if (ssss < 1)
            {
                SqlLiteHelper.ExecuteQuery(
                    "CREATE TABLE 'menu_shortcuts' ('id' integer PRIMARY KEY,'shortcut' text)");
            }


            try
            {
                DataSet ds = SqlLiteHelper.ExecuteQuery("select * from menu_shortcuts", null);
                if (ds == null)
                {
                    return;
                }
                int mCount = ds.Tables[0].Rows.Count;
                for (int i = 0; i < mCount; i++)
                {
                    try
                    {
                        // (id integer NOT NULL,tag text,name text NOT NULL,tooltips text)
                        int    id       = Convert.ToInt32(ds.Tables[0].Rows[i]["id"].ToString().Trim());
                        string shortcut = ds.Tables[0].Rows[i]["shortcut"].ToString().Trim();
                        this.AddShortCut(id, shortcut);
                    }
                    catch (Exception ex)
                    {
                        WriteLog.WriteLogError(ex.ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                WriteLog.WriteLogError(
                    "Class MenuShortCutsHoldingExtend Function loadItem from SQLlite table menu_shortcuts  Occer an Error:" +
                    ex.ToString());
            }
            var args = new PublishEventArgs()
            {
                EventId =
                    EventIdAssign.MenuShourtCutsLoadUpdate,
                EventType = PublishEventType.Core
            };

            EventPublish.PublishEvent(args);
        }
Ejemplo n.º 16
0
        public override void OnNodeSelectActive()
        {
            var args = new PublishEventArgs
            {
                EventType = PublishEventType.Core,
                EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
            };

            args.AddParams(NodeId);

            EventPublish.PublishEvent(args);
            ResetContextMenu();
        }
 /// <summary>
 /// 删除部件
 /// </summary>
 /// <param name="menuItem">需要删除的部件</param>
 public void DeleteMenuItem(IISetting menuItem)
 {
     if (_dictionaryMenuItems.ContainsKey(menuItem.Id))
     {
         _dictionaryMenuItems.Remove(menuItem.Id);
         var args = new PublishEventArgs()
         {
             EventType = PublishEventType.Core,
             EventId   = Services.EventIdAssign.SettingModuleComponentDelete,
         };
         args.AddParams(menuItem.Id);
         EventPublish.PublishEvent(args);
     }
 }
Ejemplo n.º 18
0
        private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var args = new PublishEventArgs()
            {
                EventType = "TabControlChanged",
                EventId   = 3333
            };

            args.AddParams(openorclose.IsSelected, this);
            args.AddParams(fault.IsSelected, this);
            args.AddParams(energy.IsSelected, this);
            args.AddParams(online.IsSelected, this);
            EventPublish.PublishEvent(args);
        }
Ejemplo n.º 19
0
        private void ExDeleteFolderFolder()
        {
            int nodid = this.NodeId;

            if (NodeId != 0 && _father != null)//todo  youhua
            {
                if (NodeType == TreeNodeType.IsGrp)
                {
                    //int fatherId = _father.NodeId;
                    //getGrpsInfoForUse.DeleteGrpInfo(NodeId, fatherId);
                    if (_father != null)
                    {
                        _father._ChildTreeItems.Remove(this);

                        var args = new PublishEventArgs()
                        {
                            EventType = PublishEventTypeLocal.Name,
                            EventId   =
                                PublishEventTypeLocal.GrpSingleReloadTmlGroup
                        };
                        args.AddParams(nodid);
                        args.AddParams(0);
                        EventPublish.PublishEvent(args);
                    }
                }
                else if (NodeType == TreeNodeType.IsTml)
                {
                    //if (getGrpsInfoForUse.GrpInfoDictionary.ContainsKey(this.Father.NodeId))
                    //{
                    //    if (getGrpsInfoForUse.GrpInfoDictionary[this.Father.NodeId].LstTml.Contains(this.NodeId))
                    //    {
                    //        getGrpsInfoForUse.GrpInfoDictionary[this.Father.NodeId].LstTml.Remove(this.NodeId);
                    //    }
                    //}
                    this._father.ChildTreeItems.Remove(this);

                    var args = new PublishEventArgs()
                    {
                        EventType = PublishEventTypeLocal.Name,
                        EventId   =
                            PublishEventTypeLocal.GrpSingleReloadTmlGroup
                    };
                    args.AddParams(nodid);
                    args.AddParams(1);
                    EventPublish.PublishEvent(args);
                }
            }

            // if (_father != null) _father.AddChild();
        }
Ejemplo n.º 20
0
 /// <summary>
 /// 当节点被选中的时候调用,实现了刷新右键菜单;
 /// 是否需要发送事件需要在此实现;以及其他的需要处理的事件;
 /// 动态加载子节点
 /// </summary>
 public void OnNodeSelect()
 {
     if (ViewId > 1000)
     {
         //发布事件  选中当前节点
         var args = new PublishEventArgs
         {
             EventType = SettingViewModel.EventType,
             EventId   = SettingViewModel.EventId,
         };
         args.AddParams(ViewId);
         EventPublish.PublishEvent(args);
     }
 }
Ejemplo n.º 21
0
 /// <summary>
 /// 删除部件
 /// </summary>
 /// <param name="id">需要删除的部件id</param>
 public void DeleteMenuItem(int id)
 {
     if (_dictionaryMenuItems.ContainsKey(id))
     {
         _dictionaryMenuItems.Remove(id);
         var args = new PublishEventArgs()
         {
             EventType = PublishEventType.Core,
             EventId   = EventIdAssign.MenuComponentDelete,
         };
         args.AddParams(id);
         EventPublish.PublishEvent(args);
     }
 }
        public override void OnDoubleClick()
        {
            base.OnDoubleClick();

            //发布事件  选中当前节点
            var args = new PublishEventArgs
            {
                EventType = PublishEventType.Core,
                EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
            };

            args.AddParams(NodeId);
            EventPublish.PublishEvent(args);
        }
 /// <summary>
 /// 删除部件
 /// </summary>
 /// <param name="id">需要删除的部件id</param>
 public void DeleteEventSchduleTaskItem(int id)
 {
     if (_dicItems.ContainsKey(id))
     {
         _dicItems.Remove(id);
         var args = new PublishEventArgs()
         {
             EventType = PublishEventType.Core,
             EventId   = Services.EventIdAssign.EventSchduleTaskComponentDelete,
         };
         args.AddParams(id);
         EventPublish.PublishEvent(args);
     }
 }
 /// <summary>
 /// 删除实例关系,立即回写数据库并发布事件
 /// </summary>
 /// <param name="instancesId"></param>
 public void DeleteMenuInstanceRelation(int instancesId)
 {
     if (DicInstanceRelation.ContainsKey(instancesId))
     {
         DicInstanceRelation.Remove(instancesId);
         var args = new PublishEventArgs()
         {
             EventType = PublishEventType.Core,
             EventId   = EventIdAssign.MenuInstanceRelationUpdate
         };
         args.AddParams(instancesId);
         EventPublish.PublishEvent(args);
     }
     WriteDeleteDbByPrivate(instancesId);
 }
Ejemplo n.º 25
0
        public void UpdateCurrentSet()
        {
            if (MainWindow.MySelf != null)
            {
                MainWindow.MySelf.UpdateAreaSet();
                this.Save();

                EventPublish.PublishEvent(new PublishEventArgs()
                {
                    EventAttachInfo = Area45Height,
                    EventId         = 0,
                    EventType       = "newdateheight"
                });
            }
        }
Ejemplo n.º 26
0
 /// <summary>
 /// 删除快捷键信息,立即回写数据库并发布事件
 /// </summary>
 /// <param name="menuId"></param>
 public void DeleteShortCut(int menuId)
 {
     if (DicClassic.ContainsKey(menuId))
     {
         DicClassic.Remove(menuId);
         var args = new PublishEventArgs()
         {
             EventType = PublishEventType.Core,
             EventId   = EventIdAssign.MenuShourtCutsUpdate,
         };
         args.AddParams(menuId);
         EventPublish.PublishEvent(args);
         this.WriteDeleteDbByPrivate(menuId);
     }
 }
        /// <summary>
        /// 删除模板菜单,并删除数据库中保留的模板菜单
        /// </summary>
        /// <param name="keyId"></param>
        public void DeleteMneu(int keyId)
        {
            if (DicClassic.ContainsKey(keyId))
            {
                DicClassic.Remove(keyId);
                WriteDeleteDbByPrivate(keyId);

                var args = new PublishEventArgs()
                {
                    EventId =
                        EventIdAssign.ClassicMenuUpdate,
                    EventType = PublishEventType.Core
                };
                args.AddParams(keyId);
                EventPublish.PublishEvent(args);
            }
        }
Ejemplo n.º 28
0
        private void OnCmdWatchDetailInfo(object sender, EventArgs e)
        {
            var oneRecord = sender as RtuItem;

            if (oneRecord == null)
            {
                return;
            }
            DetailInfo = oneRecord.PathItemsforthistml;
            var ar = new PublishEventArgs()
            {
                EventId   = EquipmentGroupManage.Services.EventIdAssign.AnimationGrpMulitManange,
                EventType = PublishEventType.None
            };

            EventPublish.PublishEvent(ar);
        }
Ejemplo n.º 29
0
        public void CurrentSelectItemDoubleClicked()
        {
            try
            {
                if (DateTime.Now.Ticks - dtLast.Ticks < 50000000)
                {
                    count++;
                }
                else
                {
                    count = 0;
                }
                if (count > 3)
                {
                    _isfilter = true;
                }
                else
                {
                    _isfilter = false;
                }
                dtLast = DateTime.Now;

                if (CurrentItem == null)
                {
                    return;
                }
                if (CurrentItem.RtuId < 100)
                {
                    return;
                }
                if (CurrentItem.RtuId < 1000000)
                {
                    return;
                }
                //if (CurrentItem.RtuId > 1100000) return;
                //发布事件  选中当前节点
                var args = new PublishEventArgs
                {
                    EventType = PublishEventType.Core,
                    EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
                };
                args.AddParams(CurrentItem.RtuId);
                EventPublish.PublishEvent(args);
            }
            catch (Exception ex) {}
        }
Ejemplo n.º 30
0
        public override void OnDoubleClick()
        {
            base.OnDoubleClick();

            //发布事件  选中当前节点
            var args = new PublishEventArgs
            {
                EventType       = PublishEventType.Core,
                EventId         = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
                EventAttachInfo = "TreeSelf",
            };

            args.AddParams(NodeId);
            EventPublish.PublishEvent(args);
            //lvf  2018年5月22日14:40:48  记录当前点击终端
            Wlst.Sr.EquipmentInfoHolding.Services.Others.CurrentSelectRtuId = NodeId;
        }