aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Graphs/RealTimeGraph.cs
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-06-27 13:16:21 +0300
committerRoy <Roy.mail.net@gmail.com>2023-06-27 13:16:21 +0300
commitc267a46b14ebb3babe8a0378bd403346ca182354 (patch)
treea7d69a29c00c9b2976168bf42d7ad228e1f91680 /Software/Visual_Studio/PPC/Tango.PPC.UI/Graphs/RealTimeGraph.cs
parent0f150c98978332377ee6aad3eac8c8a08553a8e7 (diff)
parenta5de87ea9863c6e7053e09ed1c2eabf58285af48 (diff)
downloadTango-c267a46b14ebb3babe8a0378bd403346ca182354.tar.gz
Tango-c267a46b14ebb3babe8a0378bd403346ca182354.zip
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Graphs/RealTimeGraph.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Graphs/RealTimeGraph.cs149
1 files changed, 149 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Graphs/RealTimeGraph.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Graphs/RealTimeGraph.cs
new file mode 100644
index 000000000..303b18892
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Graphs/RealTimeGraph.cs
@@ -0,0 +1,149 @@
+using RealTimeGraphX;
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Media;
+
+namespace Tango.PPC.UI.Graphs
+{
+ public class RealTimeGraph : Control
+ {
+ /// <summary>
+ /// Gets or sets the graph controller.
+ /// </summary>
+ public IGraphController Controller
+ {
+ get { return (IGraphController)GetValue(ControllerProperty); }
+ set { SetValue(ControllerProperty, value); }
+ }
+ public static readonly DependencyProperty ControllerProperty =
+ DependencyProperty.Register("Controller", typeof(IGraphController), typeof(RealTimeGraph), new PropertyMetadata(null));
+
+
+ /// <summary>
+ /// Gets or sets the string format of the y-axis.
+ /// </summary>
+ public String StringFormat
+ {
+ get { return (String)GetValue(StringFormatProperty); }
+ set { SetValue(StringFormatProperty, value); }
+ }
+ public static readonly DependencyProperty StringFormatProperty =
+ DependencyProperty.Register("StringFormat", typeof(String), typeof(RealTimeGraph), new PropertyMetadata("0.0"));
+
+
+ /// <summary>
+ /// Gets or sets the display name.
+ /// </summary>
+ public String DisplayName
+ {
+ get { return (String)GetValue(DisplayNameProperty); }
+ set { SetValue(DisplayNameProperty, value); }
+ }
+ public static readonly DependencyProperty DisplayNameProperty =
+ DependencyProperty.Register("DisplayName", typeof(String), typeof(RealTimeGraph), new PropertyMetadata(null));
+
+
+ /// <summary>
+ /// Gets or sets the display units.
+ /// </summary>
+ public String DisplayUnits
+ {
+ get { return (String)GetValue(DisplayUnitsProperty); }
+ set { SetValue(DisplayUnitsProperty, value); }
+ }
+ public static readonly DependencyProperty DisplayUnitsProperty =
+ DependencyProperty.Register("DisplayUnits", typeof(String), typeof(RealTimeGraph), new PropertyMetadata(null));
+
+ /// <summary>
+ /// Gets or sets the graph label visibility.
+ /// </summary>
+ public Visibility GraphLabelVisibility
+ {
+ get { return (Visibility)GetValue(GraphLabelVisibilityProperty); }
+ set { SetValue(GraphLabelVisibilityProperty, value); }
+ }
+ public static readonly DependencyProperty GraphLabelVisibilityProperty =
+ DependencyProperty.Register("GraphLabelVisibility", typeof(Visibility), typeof(RealTimeGraph), new PropertyMetadata(Visibility.Visible));
+
+
+ /// <summary>
+ /// Gets or sets the vertical ticks.
+ /// </summary>
+ public int VerticalTicks
+ {
+ get { return (int)GetValue(VerticalTicksProperty); }
+ set { SetValue(VerticalTicksProperty, value); }
+ }
+ public static readonly DependencyProperty VerticalTicksProperty =
+ DependencyProperty.Register("VerticalTicks", typeof(int), typeof(RealTimeGraph), new PropertyMetadata(10));
+
+
+ /// <summary>
+ /// Gets or sets the horizontal ticks.
+ /// </summary>
+ public int HorizontalTicks
+ {
+ get { return (int)GetValue(HorizontalTicksProperty); }
+ set { SetValue(HorizontalTicksProperty, value); }
+ }
+ public static readonly DependencyProperty HorizontalTicksProperty =
+ DependencyProperty.Register("HorizontalTicks", typeof(int), typeof(RealTimeGraph), new PropertyMetadata(10));
+
+ public Brush GridLinesBrush
+ {
+ get { return (Brush)GetValue(GridLinesBrushProperty); }
+ set { SetValue(GridLinesBrushProperty, value); }
+ }
+ public static readonly DependencyProperty GridLinesBrushProperty =
+ DependencyProperty.Register("GridLinesBrush", typeof(Brush), typeof(RealTimeGraph), new PropertyMetadata(null));
+
+ public Visibility HorizontalAxisVisibility
+ {
+ get { return (Visibility)GetValue(HorizontalAxisVisibilityProperty); }
+ set { SetValue(HorizontalAxisVisibilityProperty, value); }
+ }
+ public static readonly DependencyProperty HorizontalAxisVisibilityProperty =
+ DependencyProperty.Register("HorizontalAxisVisibility", typeof(Visibility), typeof(RealTimeGraph), new PropertyMetadata(Visibility.Visible));
+
+ public Visibility VerticalAxisVisibility
+ {
+ get { return (Visibility)GetValue(VerticalAxisVisibilityProperty); }
+ set { SetValue(VerticalAxisVisibilityProperty, value); }
+ }
+ public static readonly DependencyProperty VerticalAxisVisibilityProperty =
+ DependencyProperty.Register("VerticalAxisVisibility", typeof(Visibility), typeof(RealTimeGraph), new PropertyMetadata(Visibility.Visible));
+
+ public Visibility CurrentValueVisibility
+ {
+ get { return (Visibility)GetValue(CurrentValueVisibilityProperty); }
+ set { SetValue(CurrentValueVisibilityProperty, value); }
+ }
+ public static readonly DependencyProperty CurrentValueVisibilityProperty =
+ DependencyProperty.Register("CurrentValueVisibility", typeof(Visibility), typeof(RealTimeGraph), new PropertyMetadata(Visibility.Collapsed));
+
+ public double CurrentValueFontSize
+ {
+ get { return (double)GetValue(CurrentValueFontSizeProperty); }
+ set { SetValue(CurrentValueFontSizeProperty, value); }
+ }
+ public static readonly DependencyProperty CurrentValueFontSizeProperty =
+ DependencyProperty.Register("CurrentValueFontSize", typeof(double), typeof(RealTimeGraph), new PropertyMetadata(25.0));
+
+ public Thickness CurrentValueMargin
+ {
+ get { return (Thickness)GetValue(CurrentValueMarginProperty); }
+ set { SetValue(CurrentValueMarginProperty, value); }
+ }
+ public static readonly DependencyProperty CurrentValueMarginProperty =
+ DependencyProperty.Register("CurrentValueMargin", typeof(Thickness), typeof(RealTimeGraph), new PropertyMetadata(new Thickness(20)));
+
+ /// <summary>
+ /// Initializes the <see cref="RealTimeGraph"/> class.
+ /// </summary>
+ static RealTimeGraph()
+ {
+ DefaultStyleKeyProperty.OverrideMetadata(typeof(RealTimeGraph), new FrameworkPropertyMetadata(typeof(RealTimeGraph)));
+ }
+ }
+}