Browse Source

EventItem default construction parameter id is 1029;
fiexed System.Memory.dll conflict

chenkui 1 year ago
parent
commit
c49311bc46

+ 2 - 1
Venus/Framework/Common/Event/EventItem.cs

@@ -4,6 +4,7 @@ using System.Linq;
 using System.Text;
 using System.Runtime.Serialization;
 using Aitex.Core.Util;
+using Aitex.Core.RT.Log;
 
 namespace Aitex.Core.RT.Event
 {
@@ -175,7 +176,7 @@ namespace Aitex.Core.RT.Event
         }
 
         public EventItem(string source, string name, string description)
-        :this(0, source,name,description, EventLevel.Information, EventType.EventUI_Notify)
+        :this((int)eEvent.INFO_FA, source,name,description, EventLevel.Information, EventType.EventUI_Notify)
         {
         }
 

BIN
Venus/ThirdParty/CommunityToolkit.HighPerformance.dll


BIN
Venus/ThirdParty/System.Memory.dll


BIN
Venus/ThirdParty/System.Runtime.CompilerServices.Unsafe.dll


+ 47 - 26
Venus/Venus_MainPages/ViewModels/FaViewModel.cs

@@ -118,7 +118,7 @@ namespace Venus_MainPages.ViewModels
                     if (!_subscribedKeys.Contains(key))
                         _subscribedKeys.Add(key);
                 });
-            _timer = new PeriodicJob(1000, this.OnTimer, "UIUpdaterThread - " + GetType().Name, true);
+            _timer = new PeriodicJob(200, this.OnTimer, "UIUpdaterThread - " + GetType().Name, true);
 
             ConfigSetPoint.Update(QueryDataClient.Instance.Service.PollConfig(ConfigSetPoint.GetKeys()));
         }
@@ -128,12 +128,10 @@ namespace Venus_MainPages.ViewModels
         public bool IsSpoolingEnable
         {
             get { return _isSpoolingEnable; }
-            set { 
-                if(_isSpoolingEnable!=value)
-                {
-                    RaisePropertyChanged("IsEnableSpoolingEnableButton");
-                    RaisePropertyChanged("IsEnableSpoolingDisableButton");
-                }
+            set 
+            { 
+                IsEnableSpoolingEnableButton = !value;
+                IsEnableSpoolingDisableButton = value;
                 _isSpoolingEnable = value;
             }
         }
@@ -176,13 +174,10 @@ namespace Venus_MainPages.ViewModels
             get { return _hostControlStatus; }
             set 
             {
-                if(_hostControlStatus!=value)
-                {
-                    RaisePropertyChanged("IsEnableOnlineButton");
-                    RaisePropertyChanged("IsEnableOfflineButton");
-                    RaisePropertyChanged("IsEnableLocalButton");
-                    RaisePropertyChanged("IsEnableRemoteButton");
-                }
+                IsEnableOnlineButton = FACommunicationState == FACommunicationState.EnabledCommunicating && (value == FAControlState.Unknown.ToString() || value == FAControlState.EquipmentOffline.ToString()); 
+                IsEnableOfflineButton = FACommunicationState == FACommunicationState.EnabledCommunicating && (value == FAControlState.Unknown.ToString() || value != FAControlState.EquipmentOffline.ToString());
+                IsEnableRemoteButton = FACommunicationState == FACommunicationState.EnabledCommunicating&&value==FAControlState.OnlineLocal.ToString();
+                IsEnableLocalButton = FACommunicationState == FACommunicationState.EnabledCommunicating && value == FAControlState.OnlineRemote.ToString();
                 _hostControlStatus = value; 
             }
         }
@@ -194,10 +189,15 @@ namespace Venus_MainPages.ViewModels
             get { return _hostCommunicationStatus; }
             set 
             {
-                if (_hostCommunicationStatus != value)
+                if(_hostCommunicationStatus == FACommunicationState.Disabled.ToString())
                 {
-                    RaisePropertyChanged("IsEnableEnableButton");
-                    RaisePropertyChanged("IsEnableDisableButton");
+                    IsEnableEnableButton = true;
+                    IsEnableDisableButton = false;
+                }
+                else
+                {
+                    IsEnableEnableButton = false;
+                    IsEnableDisableButton = true;
                 }
                 _hostCommunicationStatus = value;
             }
@@ -236,14 +236,17 @@ namespace Venus_MainPages.ViewModels
 
         public bool IsEnableEnableButton
         {
-            get { return FACommunicationState == FACommunicationState.Disabled; }
+            get { return _isEnableEnableButton; }
+            set { SetProperty(ref _isEnableEnableButton, value); }
         }
-        private bool _isEnable = false;
+        private bool _isEnableEnableButton = false;
 
         public bool IsEnableDisableButton
         {
-            get { return FACommunicationState != FACommunicationState.Disabled; }
+            get { return _isEnableDisableButton; }
+            set { SetProperty(ref _isEnableDisableButton, value); }
         }
+        private bool _isEnableDisableButton;
 
         //Unknown,
         //EquipmentOffline,
@@ -253,39 +256,57 @@ namespace Venus_MainPages.ViewModels
         //OnlineRemote,
         public bool IsEnableOnlineButton
         {
-            get { return FACommunicationState == FACommunicationState.EnabledCommunicating && (FAControlState == FAControlState.Unknown || FAControlState == FAControlState.EquipmentOffline); }
+            get { return _isEnableOnlineButton; }
+            set { SetProperty(ref _isEnableOnlineButton, value); }
         }
+        private bool _isEnableOnlineButton;
 
         public bool IsEnableOfflineButton
         {
-            get { return FACommunicationState == FACommunicationState.EnabledCommunicating && (FAControlState == FAControlState.Unknown || FAControlState != FAControlState.EquipmentOffline); }
+            get { return _isEnableOfflineButton; }
+            set { SetProperty(ref _isEnableOfflineButton, value); }
         }
+        private bool _isEnableOfflineButton;
 
         public bool IsEnableLocalButton
         {
-            get { return FACommunicationState == FACommunicationState.EnabledCommunicating && (FAControlState == FAControlState.OnlineRemote); }
+            get { return _isEnableLocalButton; }
+            set { SetProperty(ref _isEnableLocalButton, value); }
         }
+        private bool _isEnableLocalButton;
 
         public bool IsEnableRemoteButton
         {
-            get { return FACommunicationState == FACommunicationState.EnabledCommunicating && (FAControlState == FAControlState.OnlineLocal); }
+            get { return _isEnableRemoteButton; }
+            set { SetProperty(ref _isEnableRemoteButton,value); }
         }
+        private bool _isEnableRemoteButton;
 
         public bool IsEnableSpoolingEnableButton
         {
             get
             {
-                return !IsSpoolingEnable;//SpoolingState == FASpoolingState.Inactive.ToString();
+                return _isEnableSpoolingEnableButton;//SpoolingState == FASpoolingState.Inactive.ToString();
+            }
+            set
+            {
+                SetProperty(ref _isEnableSpoolingEnableButton, value);
             }
         }
+        private bool _isEnableSpoolingEnableButton;
 
         public bool IsEnableSpoolingDisableButton
         {
             get
             {
-                return IsSpoolingEnable;// SpoolingState == FASpoolingState.Active.ToString();
+                return _isEnableSpoolingDisableButton;// SpoolingState == FASpoolingState.Active.ToString();
+            }
+            set
+            {
+                SetProperty(ref _isEnableSpoolingDisableButton, value);
             }
         }
+        private bool _isEnableSpoolingDisableButton;