Beispiel #1
0
        public static void CurrentSelectedGrpIdChanged(TreeNodeBaseNode info)
        {
            int xg = xyrdsfd(info);

            if (xg == 0)
            {
                return;
            }
            if (CurrentSelectedGrpId == xg)
            {
                return;
            }
            CurrentSelectedGrpId = xg;

            TreeTabRtuSet.TabRtuHolding.GetRtuLstByIdx(CurrentSelectedGrpId);

            var ins = new PublishEventArgs()
            {
                EventType = PublishEventType.Core,
                EventId   =
                    Wlst.Sr.EquipmentInfoHolding.Services.EventIdAssign.RtuGroupSelectdWantedMapUp
            };

            ins.AddParams(TreeTabRtuSet.TabRtuHolding.GetRtuLstByIdx(CurrentSelectedGrpId));

            lastsndeventtime = DateTime.Now.Ticks;
            EventPublisher.EventPublish(ins);
        }
 /// <summary>
 /// 删除所有分组信息;
 /// </summary>
 /// <param name="publishEvent"> 是否发布事件 事件参数为-1</param>
 /// <param name="synchronousDatabase"> 是否同步删除数据库数据</param>
 private void DeleteAllGroupInfoPro(bool publishEvent, bool synchronousDatabase)
 {
     try
     {
         DicGrpInfo.Clear();
     }
     catch (Exception ex)
     {
         Wlst.Cr.Core.UtilityFunction.WriteLog.WriteLogError("Error:" + ex);
     }
     if (publishEvent)
     {
         //发布事件  
         var args = new PublishEventArgs()
                        {
                            EventType = PublishEventType.Core,
                            EventId = EventIdAssign.MulitInfoGroupAllNeedUpdate,
                        };
         EventPublisher.EventPublish(args);
     }
     if (synchronousDatabase)
     {
         WriteDbDeleteAllGrpInfomation();
     }
 }
        /// <summary>
        /// 当选择的终端发送变化时,如果
        /// </summary>
        public override void OnNodeSelectActive()
        {
            //base.OnNodeSelect();
            //发布事件  选中当前节点
            var args = new PublishEventArgs
            {
                EventType = PublishEventType.Core,
                EventId   = EventIdAssign.EquipmentSelected,
            };

            args.AddParams(NodeId);
            EventPublisher.EventPublish(args);


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

            TreeNodeItemTmlViewModel.CurrentSelectedTreeNode = this;

            //ResetContextMenu();
        }
 public static void PublishResetMenuEvent()
 {
     EventPublisher.EventPublish(new PublishEventArgs()
     {
         EventType = PublishEventType.Core,
         EventId   =
             Wlst.Sr.Menu.Services.EventIdAssign.MenuInstanceRelationLoadUpdate
     });
 }
        private void ExCmdCancel()
        {
            var ar = new PublishEventArgs
            {
                EventId   = EquipemntLightFault.Services.EventIdAssign.EventCancelDefineSettingAnimationId,
                EventType = PublishEventType.None
            };

            EventPublisher.EventPublish(ar);
        }
        private void ExCmdSave()
        {
            var ar = new PublishEventArgs
            {
                EventId   = EquipemntLightFault.Services.EventIdAssign.EventSaveAddFaultSettingRecordId,
                EventType = PublishEventType.Core
            };

            EventPublisher.EventPublish(ar);
        }
Beispiel #7
0
        private void ExPublishAnimationEvent()
        {
            //发布事件,返回原界面
            var ar = new PublishEventArgs
            {
                EventId   = TimeTableSystem.Services.EventIdAssign.EventSaveOrCancelTimeTableAnimationId,
                EventType = PublishEventType.None
            };

            EventPublisher.EventPublish(ar);
        }
        public override void OnNodeSelectActive()
        {
            var args = new PublishEventArgs
            {
                EventType = PublishEventType.Core,
                EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
            };

            args.AddParams(NodeId);

            EventPublisher.EventPublish(args);
            ResetContextMenu();
        }
Beispiel #9
0
        private void ExCmdSaveTimeTable()
        {
            _dtSaveTimeTable = DateTime.Now;
            ExPublishAnimationEvent();

            var ar = new PublishEventArgs
            {
                EventId   = TimeTableSystem.Services.EventIdAssign.EventSaveTimeTableData,
                EventType = PublishEventType.Core
            };

            EventPublisher.EventPublish(ar);
        }
Beispiel #10
0
        /// <summary>
        /// 当选择的终端发送变化时,如果
        /// </summary>
        public override void OnNodeSelectActive()
        {
            //base.OnNodeSelect();
            //发布事件  选中当前节点
            var args = new PublishEventArgs
            {
                EventType = PublishEventType.Core,
                EventId   = EventIdAssign.EquipmentSelected,
            };

            args.AddParams(NodeId);
            EventPublisher.EventPublish(args);
        }
        /// <summary>
        /// 当选择的终端发送变化时,如果
        /// </summary>
        public override void OnNodeSelectActive()
        {
            //ResetContextMenu();
            var ar = new PublishEventArgs()
            {
                EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
                EventType = PublishEventType.Core
            };

            ar.AddParams(this.Father.Father.NodeId); //终端地址
            ar.AddParams(this.Father.NodeId);        //集中器地址
            ar.AddParams(this.NodeId);               //线路ID
            EventPublisher.EventPublish(ar);
        }
Beispiel #12
0
        /// <summary>
        /// 当节点被选中的时候调用,实现了刷新右键菜单;
        /// 是否需要发送事件需要在此实现;以及其他的需要处理的事件;
        /// 动态加载子节点
        /// </summary>
        public void OnEquipmentSelected()
        {
            IsCanRefreshMenu = true;
            this.RaisePropertyChanged(() => this.Cm);
            IsCanRefreshMenu = false;
            //发布事件  选中当前节点
            var args = new PublishEventArgs
            {
                EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
                EventType = PublishEventType.Core,
            };

            args.AddParams(EquipmentRtuId);
            EventPublisher.EventPublish(args);
        }
Beispiel #13
0
        /// <summary>
        /// 当选择的终端发送变化时,如果
        /// </summary>
        public override void OnNodeSelectActive()
        {
            //base.OnNodeSelect();
            //发布事件  选中当前节点
            var args = new PublishEventArgs
            {
                EventType = PublishEventType.Core,
                EventId   = EventIdAssign.GroupSelected,
            };

            args.AddParams(NodeId);

            EventPublisher.EventPublish(args);

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

            // ResetContextMenu();
        }
Beispiel #14
0
        public override void OnNodeSelectActive()
        {
            if (CollectionWj1090.Count > 0)
            {
                CollectionWj1090.Clear();
            }
            ThisNodeAddPartsNode();
            IsExpanded        = true;
            CurrentSelectNode = this;

            var args = new PublishEventArgs
            {
                EventType = PublishEventType.Core,
                EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
            };

            args.AddParams(NodeId);

            EventPublisher.EventPublish(args);
        }
Beispiel #15
0
        /// <summary>
        /// 当选择的终端发送变化时,如果
        /// </summary>
        public override void OnNodeSelectActive()
        {
            ////base.OnNodeSelect();
            ////发布事件  选中当前节点
            //var args = new PublishEventArgs
            //{
            //    EventType = PublishEventType.Core,
            //    EventId = Sr.EquipmentGroupInfoHolding.Services.EventIdAssign.MainSingleTreeNodeActive,
            //};
            //args.AddParams(NodeId);
            //args.AddParams(2);
            //EventPublisher.EventPublish(args);


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

            TreeNodeConcentratorViewModel.CurrentSelectedTreeNode = this;
            //ResetContextMenu();

            var ar = new PublishEventArgs()
            {
                EventId   = Sr.EquipmentInfoHolding.Services.EventIdAssign.EquipmentSelected,
                EventType = PublishEventType.Core
            };

            ar.AddParams(this.Father.NodeId); //终端地址
            ar.AddParams(this.NodeId);        //集中器地址
            ar.AddParams(0);                  //线路ID,0表示全部线路
            EventPublisher.EventPublish(ar);
        }