示例#1
0
 public GaugeTickMark(GaugeScale scale, GaugeTickMarkRank rank,
     GaugeMarkerStyle style, float width, float length, double interval)
     : base(scale, rank, style, width, length)
 {
     _Interval = interval;
     _DefaultInterval = interval;
 }
示例#2
0
        /// <inheritdoc/>
        public override void Assign(GaugeScale src)
        {
            base.Assign(src);

            LinearScale s = src as LinearScale;

            MajorTicks.Assign(s.MajorTicks);
            MinorTicks.Assign(s.MinorTicks);
        }
示例#3
0
        /// <inheritdoc/>
        public override void Assign(GaugeScale src)
        {
            base.Assign(src);

            RadialScale s = src as RadialScale;

            MajorTicks.Assign(s.MajorTicks);
            MinorTicks.Assign(s.MinorTicks);
        }
示例#4
0
        /// <inheritdoc/>
        public override void Serialize(FRWriter writer, string prefix, GaugeScale diff)
        {
            base.Serialize(writer, prefix, diff);

            RadialScale dc = diff as RadialScale;

            MajorTicks.Serialize(writer, prefix + ".MajorTicks", dc.MajorTicks);
            MinorTicks.Serialize(writer, prefix + ".MinorTicks", dc.MinorTicks);
        }
示例#5
0
        public GaugeTickMarkBase(GaugeScale scale, GaugeTickMarkRank rank, TickMarkLayout layout)
        {
            _Scale = scale;
            _Rank = rank;

            _Layout = layout;
            _GaugeMarker = new GaugeMarker();

            HookEvents(true);
        }
示例#6
0
        public GaugeIntervalLabel(GaugeScale scale)
        {
            Scale = scale;

            _Interval = double.NaN;
            _IntervalOffset = double.NaN;

            _ShowMinLabel = true;
            _ShowMaxLabel = true;
        }
示例#7
0
        /// <inheritdoc/>
        public override void Assign(GaugeScale src)
        {
            base.Assign(src);

            SimpleScale s = src as SimpleScale;

            MajorTicks.Assign(s.MajorTicks);
            MinorTicks.Assign(s.MinorTicks);
            FirstSubScale.Assign(s.FirstSubScale);
            SecondSubScale.Assign(s.SecondSubScale);
        }
示例#8
0
        /// <inheritdoc/>
        public override void Serialize(FRWriter writer, string prefix, GaugeScale diff)
        {
            base.Serialize(writer, prefix, diff);

            SimpleScale dc = diff as SimpleScale;

            MajorTicks.Serialize(writer, prefix + ".MajorTicks", dc.MajorTicks);
            MinorTicks.Serialize(writer, prefix + ".MinorTicks", dc.MinorTicks);
            FirstSubScale.Serialize(writer, prefix + ".FirstSubScale", dc.FirstSubScale);
            SecondSubScale.Serialize(writer, prefix + ".SecondSubScale", dc.SecondSubScale);
        }
示例#9
0
        public GaugePin(GaugeScale scale, bool isMmaxPin, string name)
        {
            _Scale = scale;
            _IsMaxPin = isMmaxPin;

            Name = name;

            _GaugeMarker = new GaugeMarker();
            _Label = new GaugePinLabel(this);

            FillColor = new GradientFillColor(Color.WhiteSmoke);
            FillColor.BorderColor = Color.DimGray;
            FillColor.BorderWidth = 1;

            Length = .06f;
            Width = .06f;

            _EndOffset = .02f;

            HookEvents(true);
        }
示例#10
0
 public GaugeTickMarkBase(GaugeScale scale,
     GaugeTickMarkRank rank, GaugeMarkerStyle style, float width, float length)
     : this(scale, rank, new TickMarkLayout(style, width, length))
 {
 }
示例#11
0
 public GaugeStrip(GaugeScale scale)
     : this()
 {
     _Scale = scale;
 }
示例#12
0
 internal void OnScaleEnter(GaugePointer pointer, GaugeScale scale)
 {
     if (ScaleEnter != null)
         ScaleEnter(this, new ScaleEnterEventArgs(pointer, scale));
 }
示例#13
0
 internal void OnScaleExit(GaugePointer pointer, GaugeScale scale)
 {
     if (ScaleLeave != null)
         ScaleLeave(this, new ScaleLeaveEventArgs(pointer, scale));
 }
 internal GaugeScaleInstance(GaugeScale defObject)
     : base(defObject.GaugePanelDef)
 {
     m_defObject = defObject;
 }
示例#15
0
 public PreRenderScaleEventArgs(Graphics graphics, GaugeScale scale)
     : base(graphics, scale)
 {
 }
示例#16
0
        private string GetPointerName(GaugeScale scale)
        {
            for (int i = 1; i < 100; i++)
            {
                string s = "Pointer" + i.ToString();

                if (scale.Pointers[s] == null)
                    return (s);
            }

            return (null);
        }
示例#17
0
        private string GetLabelName(GaugeScale scale)
        {
            for (int i = 1; i < 100; i++)
            {
                string s = "Label" + i.ToString();

                if (scale.CustomLabels[s] == null)
                    return (s);
            }

            return (null);
        }
示例#18
0
        private string GetRangeName(GaugeScale scale)
        {
            for (int i = 1; i < 100; i++)
            {
                string s = "Range" + i.ToString();

                if (scale.Ranges[s] == null)
                    return (s);
            }

            return (null);
        }
示例#19
0
        private string GetSectionName(GaugeScale scale)
        {
            for (int i = 1; i < 100; i++)
            {
                string s = "Section" + i.ToString();

                if (scale.Sections[s] == null)
                    return (s);
            }

            return (null);
        }
示例#20
0
 public PostRenderScaleEventArgs(Graphics graphics, GaugeScale scale)
 {
     _Graphics = graphics;
     _Scale = scale;
 }
示例#21
0
 public ScaleEnterEventArgs(GaugePointer pointer, GaugeScale scale)
 {
     _Pointer = pointer;
     _Scale = scale;
 }
示例#22
0
        internal void OnPostRenderScale(PaintEventArgs e, GaugeScale scale)
        {
            if (PostRenderScale != null)
            {
                PostRenderScaleEventArgs args =
                    new PostRenderScaleEventArgs(e.Graphics, scale);

                PostRenderScale(this, args);
            }
        }
示例#23
0
        internal bool OnPreRenderScale(PaintEventArgs e, GaugeScale scale)
        {
            if (PreRenderScale != null)
            {
                PreRenderScaleEventArgs args =
                    new PreRenderScaleEventArgs(e.Graphics, scale);

                PreRenderScale(this, args);

                if (args.Cancel == true)
                    return (true);
            }

            return (false);
        }
示例#24
0
 public ScaleLeaveEventArgs(GaugePointer pointer, GaugeScale scale)
     : base(pointer, scale)
 {
 }
 public GaugeScaleInstance(GaugeScale defObject)
     : base(defObject.GaugePanelDef)
 {
     this.m_defObject = defObject;
 }
示例#26
0
        private GaugePointer GetLinearPointer(GaugeControl gauge, string sname, string pname)
        {
            GaugeScale scale = gauge.LinearScales[sname];

            return (scale != null ? scale.Pointers[pname] : null);
        }