Ejemplo n.º 1
0
 public CalculatorIndicator(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _summarycompare = (CompareValue)info.GetValue("SummaryCompare", typeof(CompareValue));
 }
Ejemplo n.º 2
0
 public CalculatorIndicator(CalculatorIndicator indicator)
     : base(indicator)
 {
     _summarycompare = indicator.SummaryCompare == null?null:indicator.SummaryCompare.Clone();
 }
Ejemplo n.º 3
0
 public CalculatorIndicator(CalculateIndicator indicator)
     : base(indicator)
 {
     _summarycompare = indicator.SummaryCompare;
 }
Ejemplo n.º 4
0
 public CalculateIndicator(CalculateIndicator indicator) : base(indicator)
 {
     _totalcompare   = indicator.TotalCompare == null ? null : indicator.TotalCompare.Clone();
     _summarycompare = indicator.SummaryCompare == null ? null : indicator.SummaryCompare.Clone();
     _detailcompare  = indicator.DetailCompare == null ? null : indicator.DetailCompare.Clone();
 }
Ejemplo n.º 5
0
 public CalculateIndicator(Indicator indicator) : base(indicator)
 {
     _totalcompare   = indicator.TotalCompare;
     _summarycompare = indicator.SummaryCompare;
     _detailcompare  = indicator.DetailCompare;
 }
Ejemplo n.º 6
0
        public void Init(Cell cell, CompareValue cv)
        {
            _cv   = cv;
            _cell = cell;
            if (cv == null)
            {
                return;
            }
            if (_cv.bPeriodOnPeriod)
            {
                rbpop.Checked         = true;
                this.expression1.Text = "";
            }
            else
            {
                expression1.Text = _cv.Expression1;
            }
            expression2.Text = _cv.Expression2;

            rbstatic1.Checked    = !expression1.Text.Trim().EndsWith(";");
            rbalgorithm1.Checked = expression1.Text.Trim().EndsWith(";");
            rbstatic2.Checked    = !expression2.Text.Trim().EndsWith(";");
            rbalgorithm2.Checked = expression2.Text.Trim().EndsWith(";");

            #region value option
            greaterbetter.Checked   = false;
            lessbetter.Checked      = false;
            amidbetter.Checked      = false;
            bothsidesbetter.Checked = false;
            switch (_cv.Performance)
            {
            case IndicatorPerformance.GreaterBetter:
                greaterbetter.Checked = true;
                break;

            case IndicatorPerformance.LessBetter:
                lessbetter.Checked = true;
                break;

            case IndicatorPerformance.AmidBetter:
                amidbetter.Checked = true;
                break;

            case IndicatorPerformance.BothSidesBetter:
                bothsidesbetter.Checked = true;
                break;
            }
            #endregion

            #region show option
            backcolor.Checked = false;
            fontcolor.Checked = false;
            rgblight.Checked  = false;
            smilecry.Checked  = false;
            updown.Checked    = false;
            switch (_cv.ViewStyle)
            {
            case IndicatorViewType.BackColor:
                backcolor.Checked = true;
                break;

            case IndicatorViewType.FontColor:
                fontcolor.Checked = true;
                break;

            case IndicatorViewType.RGBLight:
                rgblight.Checked = true;
                break;

            case IndicatorViewType.SmileCry:
                smilecry.Checked = true;
                break;

            case IndicatorViewType.UpDown:
                updown.Checked = true;
                break;
            }
            flagonbadonly.Checked = cv.FlagOnBadOnly;
            #endregion
        }