aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Views/MainView.xaml
blob: e935b22ec6c5bd8cd114ca2f6ed57db9b8f13902 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<UserControl x:Class="Tango.PPC.Synchronization.Views.MainView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vm="clr-namespace:Tango.PPC.Synchronization.ViewModels"
             xmlns:global="clr-namespace:Tango.PPC.Synchronization"
             xmlns:local="clr-namespace:Tango.PPC.Synchronization.Views"
             mc:Ignorable="d" 
             d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
    <Grid>
        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}">TEST MODULE</TextBlock>
    </Grid>
</UserControl>
ute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace RealTimeGraphX.WPF
{
    /// <summary>
    /// Represents a WPF <see cref="IGraphDataSeries">data series</see>.
    /// </summary>
    /// <seealso cref="RealTimeGraphX.GraphObject" />
    /// <seealso cref="RealTimeGraphX.IGraphDataSeries" />
    public class WpfGraphDataSeries : GraphObject, IGraphDataSeries
    {
        #region Internal Properties

        /// <summary>
        /// Gets the GDI stroke color.
        /// </summary>
        internal System.Drawing.Color GdiStroke { get; private set; }

        /// <summary>
        /// Gets the GDI fill brush.
        /// </summary>
        internal System.Drawing.Brush GdiFill { get; private set; }

        /// <summary>
        /// Gets or sets the GDI pen.
        /// </summary>
        internal System.Drawing.Pen GdiPen { get; set; }

        #endregion

        private String _name;
        /// <summary>
        /// Gets or sets the series name.
        /// </summary>
        public String Name
        {
            get { return _name; }
            set { _name = value; RaisePropertyChangedAuto(); }
        }

        private float _strokeThickness;
        /// <summary>
        /// Gets or sets the stroke thickness.
        /// </summary>
        public float StrokeThickness
        {
            get
            {
                return _strokeThickness;
            }
            set
            {
                _strokeThickness = value;
                GdiPen = new System.Drawing.Pen(GdiStroke, _strokeThickness);
                RaisePropertyChangedAuto();
            }
        }

        private bool _isVisible;
        /// <summary>
        /// Gets or sets a value indicating whether this series should be visible.
        /// </summary>
        public bool IsVisible
        {
            get { return _isVisible; }
            set { _isVisible = value; RaisePropertyChangedAuto(); }
        }

        private Color _stroke;
        /// <summary>
        /// Gets or sets the series stroke color.
        /// </summary>
        public Color Stroke
        {
            get { return _stroke; }
            set
            {
                _stroke = value;
                RaisePropertyChangedAuto();

                if (_stroke != null)
                {
                    GdiStroke = _stroke.ToGdiColor();
                    GdiPen = new System.Drawing.Pen(GdiStroke, StrokeThickness);
                }
                else
                {
                    GdiStroke = System.Drawing.Color.Transparent;
                }
            }
        }

        private Brush _fill;
        /// <summary>
        /// Gets or sets the series fill brush.
        /// </summary>
        public Brush Fill
        {
            get { return _fill; }
            set
            {
                _fill = value;
                RaisePropertyChangedAuto();

                if (_fill != null)
                {
                    GdiFill = _fill.ToGdiBrush();
                }
                else
                {
                    GdiFill = null;
                }
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="WpfGraphDataSeries"/> class.
        /// </summary>
        public WpfGraphDataSeries()
        {
            StrokeThickness = 1;
            IsVisible = true;
            Stroke = Colors.DodgerBlue;
        }

        /// <summary>
        /// Gets or sets a value indicating whether to fill the series.
        /// </summary>
        public bool UseFill
        {
            get { return Fill != null; }
        }

        private object _currentValue;
        /// <summary>
        /// Gets the current value.
        /// </summary>
        public object CurrentValue
        {
            get { return _currentValue; }
            set { _currentValue = value; RaisePropertyChangedAuto(); }
        }
    }
}