コード例 #1
0
        public int GetCasePathWatcherDelay(EstimatorEnum est)
        {
            int index = (int)est;

            if (index >= Data.CaseConfig.CasePathWatcherDelay.Length)
            {
                throw new ArgumentException("index is greater then array length : " + index);
            }

            return(Data.CaseConfig.CasePathWatcherDelay[index]);
        }
コード例 #2
0
        public string GetEmsCasePath(EstimatorEnum est)
        {
            int index = (int)est;

            if (index >= Data.CaseConfig.EMSCasePath.Length)
            {
                throw new ArgumentException("index is greater then array length : " + index);
            }

            return(Data.CaseConfig.EMSCasePath[index]);
        }
コード例 #3
0
        public void SetCasePathWatcherDelay(EstimatorEnum est, int delay)
        {
            int index = (int)est;

            if (index >= Data.CaseConfig.CasePathWatcherDelay.Length)
            {
                throw new ArgumentException("index is greater then path array");
            }

            if (delay <= 0)
            {
                throw new ArgumentException("delay can not be zero or negative");
            }

            if (Data.CaseConfig.CasePathWatcherDelay[index] != delay)
            {
                Data.CaseConfig.CasePathWatcherDelay[index] = delay;
                _oasEvent.RaiseEvent(OasEventType.WatcherDelayChanged, est);
            }
        }
コード例 #4
0
        public void SetEmsCasePath(EstimatorEnum est, string path)
        {
            int index = (int)est;

            if (index >= Data.CaseConfig.EMSCasePath.Length)
            {
                throw new ArgumentException("index is greater then path array");
            }

            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentException("new path is empty");
            }

            if (!Data.CaseConfig.EMSCasePath[index].Equals(path, StringComparison.CurrentCultureIgnoreCase))
            {
                Data.CaseConfig.EMSCasePath[index] = path;
                CheckPath(Data.CaseConfig.EMSCasePath[index]);
                _oasEvent.RaiseEvent(OasEventType.CasePathCahnged);
            }
        }