Ejemplo n.º 1
0
        /// <summary>
        /// Sets the default values.
        /// </summary>
        /// <param name="model">The model.</param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            if (this.MaximumFillColor.IsAutomatic())
            {
                this.defaultMaximumFillColor = model.GetDefaultColor();
            }

            if (this.MinimumFillColor.IsAutomatic())
            {
                this.defaultMinimumFillColor = model.GetDefaultColor();
            }
        }
Ejemplo n.º 2
0
 protected override void SetDefaultValues(PlotModel model)
 {
     if (this.Color.IsAutomatic())
     {
         this.defaultColor = model.GetDefaultColor();
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the default values.
 /// </summary>
 /// <param name="model">
 /// The model.
 /// </param>
 protected internal override void SetDefaultValues(PlotModel model)
 {
     if (this.FillColor == null)
     {
         this.defaultFillColor = model.GetDefaultColor();
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets the default values.
 /// </summary>
 /// <param name="model">The model.</param>
 protected internal override void SetDefaultValues(PlotModel model)
 {
     if (this.Color.IsAutomatic())
     {
         this.LineStyle    = model.GetDefaultLineStyle();
         this.defaultColor = model.GetDefaultColor();
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// The set default values.
 /// </summary>
 /// <param name="model">
 /// The model.
 /// </param>
 protected internal override void SetDefaultValues(PlotModel model)
 {
     if (this.Color2 == null)
     {
         this.LineStyle2    = model.GetDefaultLineStyle();
         this.defaultColor2 = model.GetDefaultColor();
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Sets the default values.
 /// </summary>
 /// <param name="model">The model.</param>
 protected internal override void SetDefaultValues(PlotModel model)
 {
     foreach (var slice in this.Slices)
     {
         if (slice.Fill.IsAutomatic())
         {
             slice.DefaultFillColor = model.GetDefaultColor();
         }
     }
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Sets the default values.
        /// </summary>
        /// <param name="model">The model.</param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            base.SetDefaultValues(model);

            if (this.Color2.IsAutomatic())
            {
                this.defaultColor2 = model.GetDefaultColor();
            }

            if (this.LineStyle2 == LineStyle.Automatic)
            {
                this.LineStyle2 = model.GetDefaultLineStyle();
            }
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Sets default values from the plot model.
        /// </summary>
        /// <param name="model">The plot model.</param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            if (this.LineStyle == LineStyle.Automatic)
            {
                this.defaultLineStyle = model.GetDefaultLineStyle();
            }

            if (this.Color.IsAutomatic())
            {
                this.defaultColor = model.GetDefaultColor();

                if (this.MarkerFill.IsAutomatic())
                {
                    this.defaultMarkerFill = this.defaultColor;
                }
            }
        }
        /// <summary>
        /// The set default values.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            // todo: should use ActualLineStyle
            if (this.Color == null)
            {
                if (this.LineStyle == LineStyle.Undefined)
                {
                    this.LineStyle = model.GetDefaultLineStyle();
                }

                this.defaultColor = model.GetDefaultColor();

                // And MarkerFill will be overridden if not set to null
                if (this.MarkerFill == null)
                {
                    this.MarkerFill = this.defaultColor;
                }
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Sets default values from the plot model.
        /// </summary>
        /// <param name="model">The plot model.</param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            if (this.LineStyle == LineStyle.Automatic)
            {
                this.defaultLineStyle = model.GetDefaultLineStyle();
            }

            if (this.Color.IsAutomatic())
            {
                this.defaultColor = model.GetDefaultColor();

                if (this.MarkerFill.IsAutomatic())
                {
                    this.defaultMarkerFill = this.defaultColor;
                }
            }
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Sets the default values.
        /// </summary>
        /// <param name="model">The model.</param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            base.SetDefaultValues(model);

            if (this.ColorLo.IsAutomatic())
            {
                this.defaultColorLo = model.GetDefaultColor();
            }

            if (this.LineStyleLo == LineStyle.Automatic)
            {
                this.LineStyleLo = model.GetDefaultLineStyle();
            }

            if (this.ColorHi.IsAutomatic())
            {
                this.defaultColorHi = model.GetDefaultColor();
            }

            if (this.LineStyleHi == LineStyle.Automatic)
            {
                this.LineStyleHi = model.GetDefaultLineStyle();
            }
        }
Ejemplo n.º 12
0
 /// <summary>
 /// The set default values.
 /// </summary>
 /// <param name="model">
 /// The model.
 /// </param>
 protected internal override void SetDefaultValues(PlotModel model)
 {
     if (this.Color2 == null)
     {
         this.LineStyle2 = model.GetDefaultLineStyle();
         this.defaultColor2 = model.GetDefaultColor();
     }
 }
Ejemplo n.º 13
0
        /// <summary>
        /// The set default values.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            // todo: should use ActualLineStyle
            if (this.Color == null)
            {
                if (this.LineStyle == LineStyle.Undefined)
                {
                    this.LineStyle = model.GetDefaultLineStyle();
                }

                this.defaultColor = model.GetDefaultColor();

                // And MarkerFill will be overridden if not set to null
                if (this.MarkerFill == null)
                {
                    this.MarkerFill = this.defaultColor;
                }
            }
        }
Ejemplo n.º 14
0
        public PlotModel DrawOxyPlotGraph(int a)
        {
            flag  = a;
            Model = new PlotModel
            {
                LegendTitle         = "Графики",
                LegendOrientation   = LegendOrientation.Horizontal,
                LegendPlacement     = LegendPlacement.Outside,
                LegendPosition      = LegendPosition.TopRight,
                LegendTextColor     = OxyColors.White,
                LegendTitleColor    = OxyColors.White,
                PlotAreaBorderColor = OxyColors.White,
                SubtitleColor       = OxyColors.White,
                SelectionColor      = OxyColors.White,
                TextColor           = OxyColors.White,
                TitleColor          = OxyColors.White
            };



            if (Model.Axes.Count > 0)
            {
                Model.Axes.Clear();
            }
            Model.GetDefaultColor();
            if (RangeOfDrawingSecond == -1)
            {
                Model = SettingDrawDefaultPosition(Model);
            }

            else if (RangeOfDrawingSecond == -2)
            {
                try
                {
                    Model = SettingDrawSavePosition(Model);
                }
                catch (NullReferenceException)
                {
                    Model = SettingDrawDefaultPosition(Model);
                }
            }
            else
            {
                Model = SettingDrawLastSeconds(Model);
            }

            Model.Series.Clear();
            for (int i = 0; i < 2; i++)
            {
                var lineSerie = new LineSeries()
                {
                    StrokeThickness             = 3,
                    MarkerSize                  = 3,
                    MarkerStrokeThickness       = 1,
                    MarkerStroke                = OxyColors.White,
                    MarkerFill                  = OxyColors.White,
                    MarkerType                  = BufferDataGraph.MarkerType,
                    CanTrackerInterpolatePoints = false,
                    Title  = string.Format("Detector {0}", i),
                    Smooth = false,
                };
                if (flag == 1)
                {
                    if (i == 0)
                    {
                        lineSerie.Color = OxyColors.Yellow;
                        lineSerie.Title = "Момент (кН*м)";
                        int j = 0;
                        foreach (var item in BufferDataGraph.PointFirstGraph1)
                        {
                            lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(BufferDataGraph.DateFirstGraph1[j]), item));
                            j++;
                        }
                    }
                    if (i == 1)
                    {
                        lineSerie.Color = OxyColors.Green;
                        lineSerie.Title = "Позиция (обор.)";
                        int j = 0;
                        foreach (var item in BufferDataGraph.PointTwoGraph1)
                        {
                            lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(BufferDataGraph.DateTwoGraph1[j]), item));
                            j++;
                        }
                    }
                }
                if (flag == 2)
                {
                    if (i == 0)
                    {
                        lineSerie.Color = OxyColors.Yellow;
                        lineSerie.Title = "Момент (кН*м)";
                        int j = 0;
                        foreach (var item in BufferDataGraph.PointFirstGraph1)
                        {
                            lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(BufferDataGraph.TimeFirstGraph[j]), item));
                            j++;
                        }
                    }
                    if (i == 1)
                    {
                        lineSerie.Color = OxyColors.Green;
                        lineSerie.Title = "Позиция (обор.)";
                        int j = 0;
                        foreach (var item in BufferDataGraph.PointTwoGraph1)
                        {
                            lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(BufferDataGraph.TimeSecondGraph[j]), item));
                            j++;
                        }
                    }
                }
                Model.Series.Add(lineSerie);
            }
            return(Model);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// The set default values.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            if (this.MaximumFillColor == null)
            {
                this.defaultMaximumFillColor = model.GetDefaultColor();
            }

            if (this.MinimumFillColor == null)
            {
                this.defaultMinimumFillColor = model.GetDefaultColor();
            }
        }
Ejemplo n.º 16
0
 /// <summary>
 /// Sets the default values.
 /// </summary>
 /// <param name="model">The model.</param>
 protected internal override void SetDefaultValues(PlotModel model)
 {
     foreach (var slice in this.Slices)
     {
         if (slice.Fill.IsAutomatic())
         {
             slice.DefaultFillColor = model.GetDefaultColor();
         }
     }
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Sets default values from the plot model.
 /// </summary>
 /// <param name="model">The plot model.</param>
 protected internal override void SetDefaultValues(PlotModel model)
 {
     if (this.Color.IsAutomatic())
     {
         this.LineStyle = model.GetDefaultLineStyle();
         this.defaultColor = model.GetDefaultColor();
     }
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Sets the default values.
 /// </summary>
 /// <param name="model">The model.</param>
 protected internal override void SetDefaultValues(PlotModel model)
 {
     if (this.FillColor.IsAutomatic())
     {
         this.defaultFillColor = model.GetDefaultColor();
     }
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Sets the default values.
        /// </summary>
        /// <param name="model">The model.</param>
        protected internal override void SetDefaultValues(PlotModel model)
        {
            base.SetDefaultValues(model);

            if (this.Color2.IsAutomatic())
            {
                this.defaultColor2 = model.GetDefaultColor();
            }

            if (this.LineStyle2 == LineStyle.Undefined)
            {
                this.LineStyle2 = model.GetDefaultLineStyle();
            }
        }