Esempio n. 1
0
        /// <summary>
        /// <para>***********************</para>
        /// 設定狀態列數值
        /// <para>***********************</para>
        /// </summary>
        /// <param name="type">狀態列 Label 類型</param>
        /// <param name="dispText">顯示文字</param>
        public void SetStatus(SystemStatusType type, string dispText)
        {
            switch (type)
            {
            case SystemStatusType.ConnectionStatus:
                this.ConnectionStatus.Text = dispText;
                break;

            case SystemStatusType.ControlMode:
                this.ControlModeStatus.Text = dispText;
                break;

            case SystemStatusType.ZoomFactor:
                this.ZoomFactor.Text = dispText;
                break;

            case SystemStatusType.Coordinate:
                this.ImageCoordinate.Text = dispText;
                break;

            case SystemStatusType.GrayLevel:
                this.GrayLevelLabel.Text = dispText;
                break;

            case SystemStatusType.SystemMsg:
                this.MsgStatus.Text = dispText;
                break;
            }
        }
        public async Task <string> GetAsync(string id)
        {
            SystemStatus     systemStatus     = new SystemStatus();
            SystemStatusType systemStatysType = (SystemStatusType)Enum.Parse(typeof(SystemStatusType), id);
            string           statusValue      = await systemStatus.GetCurrentSystemStatusAsync(systemStatysType);

            return(statusValue);
        }
Esempio n. 3
0
        public Response SystemStatus(SystemStatusType status)
        {
            m_log.Info("System status called");

            Response response = new Response();

            response.response = responseType.Success;
            return(response);
        }
Esempio n. 4
0
        public async Task <string> GetCurrentSystemStatusAsync(SystemStatusType systemStatusType)
        {
            TableOperation retrieveOperation = TableOperation.Retrieve <SystemStatusEntity>(
                SystemStatusEntity.PartitionKeyValue,
                Enum.GetName(typeof(SystemStatusType), systemStatusType).ToLower());

            TableResult retrievedResult = await systemStatusTable.ExecuteAsync(retrieveOperation);

            SystemStatusEntity retrivedEntity = (SystemStatusEntity)retrievedResult.Result;

            return(retrivedEntity.Status);
        }
Esempio n. 5
0
        public Response SystemStatus(SystemStatusType SystemStatus1)
        {
            log.Info("New System Status message arrived");
            validateSchemaVersion(SystemStatus1.schemaVersion);

            //Create message and enqueue it
            Message msg = new Message(SystemStatus1);

            msg.Label = "systemStatus";

            EnqueueMessageInQueue(msg);

            //Build response
            Response response = new Response();

            response.response = responseType.Success;
            log.Info("System Status Message first validation OK, enqueued");
            return(response);
        }
Esempio n. 6
0
        public Response SystemStatus(SystemStatusType systemStatus)
        {
            string msg = string.Format(@"DDPVersionNum:{0},Message:{1},MessageId:{2},
                    Originator:{3},schemaVersion:{4},test:{5},TimeStamp:{6}",
                                       systemStatus.DDPVersionNum,
                                       systemStatus.Message,
                                       systemStatus.MessageId,
                                       systemStatus.Originator,
                                       systemStatus.schemaVersion,
                                       systemStatus.test,
                                       systemStatus.TimeStamp);

            m_log.Info(msg);

            Response response = new Response();

            response.response = responseType.Success;
            return(response);
        }
 /// <summary>
 /// <para>***********************</para>
 /// 設定狀態列數值
 /// <para>***********************</para>
 /// </summary>
 /// <param name="type">狀態列 Label 類型</param>
 /// <param name="dispText">顯示文字</param>
 public void SetStatus(SystemStatusType type, string dispText)
 {
     switch (type)
     {
         case SystemStatusType.ConnectionStatus:
             this.ConnectionStatus.Text = dispText;
             break;
         case SystemStatusType.ControlMode:
             this.ControlModeStatus.Text = dispText;
             break;
         case SystemStatusType.ZoomFactor:
             this.ZoomFactor.Text = dispText;
             break;
         case SystemStatusType.Coordinate:
             this.ImageCoordinate.Text = dispText;
             break;
         case SystemStatusType.GrayLevel:
             this.GrayLevelLabel.Text = dispText;
             break;
         case SystemStatusType.SystemMsg:
             this.MsgStatus.Text = dispText;
             break;
     }
 }