Beispiel #1
0
        /*
         * public void CreatRule(string name, string decription, RuleType type)
         * {
         *  switch (type)
         *  {
         *      case RuleType.Timer:
         *          CreateTimerRule(name, decription);
         *          break;
         *      case RuleType.Сongruence:
         *          CreateСongruenceRule(name, decription);
         *          break;
         *      case RuleType.All:
         *          CreateTimerRule(name, decription);
         *          CreateСongruenceRule(name, decription);
         *          break;
         *      default:
         *          return;
         *  }
         * }
         */
        public void CreateTimerRule(string name, string decription, DateTime criticalEventDate, TimerRuleType type)
        {
            var rule = new TimerRule(name, decription, criticalEventDate, type);

            timerRules.Add(rule);
        }
Beispiel #2
0
 public TimerRule(BaseRule baseRule, DateTime criticalEventDate, TimerRuleType type) : base(baseRule.Name, baseRule.Decription)
 {
     SetDateTime(criticalEventDate, type);
 }
Beispiel #3
0
        public void ChangeTimerRules(DateTime criticalEventDate, TimerRuleType ruleType)
        {
            var rule = timerRules.Find((r) => r.RuleType == ruleType);

            rule.MainParametr = criticalEventDate;
        }
Beispiel #4
0
 public TimerRule(string name, string decription, DateTime criticalEventDate, TimerRuleType type) : base(name, decription)
 {
     SetDateTime(criticalEventDate, type);
 }