예제 #1
0
        protected override void ApplyThreshold(IThreshold threshold)
        {
            if (threshold as ComponentDirectiveThreshold == null)
            {
                MessageBox.Show(
                    "тип переданного порогового значения не соответстует типу порогового значения данного ЭУ",
                    "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            ComponentDirectiveThreshold detDirThresh = threshold as ComponentDirectiveThreshold;

            lifelengthViewer_FirstPerformance.Lifelength = detDirThresh.FirstPerformanceSinceNew;
            lifelengthViewer_FirstNotify.Lifelength      = detDirThresh.FirstNotification;
            lifelengthViewerRptInterval.Lifelength       = detDirThresh.RepeatInterval;
            lifelengthViewerRptNotify.Lifelength         = detDirThresh.RepeatNotification;
            lifelengthViewerWarranty.Lifelength          = detDirThresh.Warranty;
            lifelengthViewerWarrantyNotify.Lifelength    = detDirThresh.WarrantyNotification;

            if (detDirThresh.FirstPerformanceConditionType == ThresholdConditionType.WhicheverFirst)
            {
                radio_WhicheverFirst.Checked = true;
            }
            else
            {
                radio_WhicheverLater.Checked = true;
            }
        }
예제 #2
0
        protected override void ApplyThreshold(IThreshold threshold)
        {
            if (threshold as DirectiveThreshold == null)
            {
                MessageBox.Show(
                    "тип переданного порогового значения не соответстует типу порогового значения данного ЭУ",
                    "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            DirectiveThreshold dirThresh = threshold as DirectiveThreshold;

            // First Performance
            radio_FirstWhicheverLast.Checked =
                dirThresh.FirstPerformanceConditionType == ThresholdConditionType.WhicheverFirst ? false : true;

            if (dirThresh.FirstPerformanceSinceNew != null)
            {
                lifelengthViewer_SinceNew.Lifelength = dirThresh.FirstPerformanceSinceNew;
            }

            if (dirThresh.FirstPerformanceSinceEffectiveDate != null)
            {
                lifelengthViewer_SinceEffDate.Lifelength = dirThresh.FirstPerformanceSinceEffectiveDate;
            }

            if (dirThresh.FirstNotification != null)
            {
                lifelengthViewer_FirstNotify.Lifelength = dirThresh.FirstNotification;
            }

            // Repeat Interval
            radio_RepeatWhicheverLast.Checked =
                dirThresh.RepeatPerformanceConditionType == ThresholdConditionType.WhicheverFirst ? false : true;
            // Выбираем способ повторения директивы
            if (threshold.PerformRepeatedly)
            {
                checkBoxRepeat.Checked = true;
            }
            else
            {
                checkBoxRepeat.Checked = false;
            }

            radio_RepeatWhicheverFirst.Enabled  = radio_RepeatWhicheverLast.Enabled =
                lifelengthViewer_Repeat.Enabled = lifelengthViewer_RepeatNotify.Enabled = checkBoxRepeat.Checked;

            if (dirThresh.RepeatInterval != null)
            {
                lifelengthViewer_Repeat.Lifelength = dirThresh.RepeatInterval;
            }

            if (dirThresh.RepeatNotification != null)
            {
                lifelengthViewer_RepeatNotify.Lifelength = dirThresh.RepeatNotification;
            }
        }
예제 #3
0
 public void AddThressHolds(IThreshold thresshold)
 {
     lstIThreshold.Add(thresshold);
 }
예제 #4
0
 public Engine(ILerp lerp, IThreshold threshold)
 {
     Lerp      = lerp;
     Threshold = threshold;
 }
예제 #5
0
 /// <summary>
 /// Заполняет все контролы в связи с заданным Threshold
 /// </summary>
 protected virtual void ApplyThreshold(IThreshold threshold)
 {
 }
예제 #6
0
파일: Engine.cs 프로젝트: soywiz/cspspemu
 public Engine(ILerp lerp, IThreshold threshold)
 {
     Lerp = lerp;
     Threshold = threshold;
 }
예제 #7
0
 public AlertMonitor(IHandleMessage <Message> handler, IThreshold threshold, IAppBus bus)
 {
     _bus       = bus;
     _threshold = threshold;
     _handler   = handler;
 }