diff --git a/WinNUT_V2/AGauge_mod/AGauge - FxCop.FxCop b/WinNUT_V2/AGauge_mod/AGauge - FxCop.FxCop
deleted file mode 100644
index 14e40f4..0000000
--- a/WinNUT_V2/AGauge_mod/AGauge - FxCop.FxCop
+++ /dev/null
@@ -1,382 +0,0 @@
-
-
-
- True
- c:\program files (x86)\microsoft fxcop 1.36\Xml\FxCopReport.xsl
-
-
-
-
-
- True
- True
- True
- 10
- 1
-
- False
-
- False
- 120
- False
-
-
-
- $(ProjectDir)/../AGaugeApp/bin/Debug/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'AGauge.dll'
-
-
-
-
- - 'AGauge.dll'
-
-
-
-
-
-
-
-
-
-
- - 'AGauge'
- - AGauge
-
-
-
-
-
-
-
-
- - 'AGauge.AllowDrop'
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'value'
- - 'AGauge.AllowDrop.set(bool)'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'AGauge.AutoSize'
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'value'
- - 'AGauge.AutoSize.set(bool)'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'AGauge.ForeColor'
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'value'
- - 'AGauge.ForeColor.set(bool)'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'AGauge.ImeMode'
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'value'
- - 'AGauge.ImeMode.set(bool)'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'float.ToString(string)'
- - 'AGauge.OnPaint(PaintEventArgs)'
- - 'float.ToString(string, IFormatProvider)'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 'AGaugeLabelCollection'
- - IList
-
-
-
-
- - 'AGaugeLabelCollection'
-
-
-
-
- - 'AGaugeLabelCollection'
- - 'CollectionBase'
-
-
-
-
-
-
-
-
- - 'int.ToString()'
- - 'AGaugeLabelCollection.GetUniqueName()'
- - 'int.ToString(IFormatProvider)'
-
-
- - 'int.ToString()'
- - 'AGaugeLabelCollection.GetUniqueName()'
- - 'int.ToString(IFormatProvider)'
-
-
- - 'int.ToString()'
- - 'AGaugeLabelCollection.GetUniqueName()'
- - 'int.ToString(IFormatProvider)'
-
-
-
-
-
-
-
-
- - 'value'
- - 'AGaugeLabel'
- - 'AGaugeLabelCollection.OnInsert(int, object)'
- - castclass
-
-
- - 'value'
- - 'AGaugeLabel'
- - 'AGaugeLabelCollection.OnInsert(int, object)'
- - castclass
-
-
-
-
-
-
-
-
-
-
- - 'AGaugeRangeCollection'
- - IList
-
-
-
-
- - 'AGaugeRangeCollection'
-
-
-
-
- - 'AGaugeRangeCollection'
- - 'CollectionBase'
-
-
-
-
-
-
-
-
- - 'int.ToString()'
- - 'AGaugeRangeCollection.GetUniqueName()'
- - 'int.ToString(IFormatProvider)'
-
-
- - 'int.ToString()'
- - 'AGaugeRangeCollection.GetUniqueName()'
- - 'int.ToString(IFormatProvider)'
-
-
-
-
-
-
-
-
- - 'value'
- - 'AGaugeRange'
- - 'AGaugeRangeCollection.OnInsert(int, object)'
- - castclass
-
-
- - 'value'
- - 'AGaugeRange'
- - 'AGaugeRangeCollection.OnInsert(int, object)'
- - castclass
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Hid inherited members
- Hide inherited members
- Variable used
-
-
-
-
- Sign {0} with a strong name key.
-
-
- {0} appears to be a non-generic, strongly typed collection. Add an implementation to the instance of {1}<T> where T is the underlying element type of {0}.
-
-
- {0}, a parameter, is cast to type {1} multiple times in method {2}. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant {3} instruction.
-
-
- {0} should provide a strongly typed implementation of ICollection.CopyTo.
-
-
- Mark {0} with CLSCompliant(true) because it exposes externally visible types.
-
-
- The 'this' parameter (or 'Me' in Visual Basic) of {0} is never used. Mark the member as static (or Shared in Visual Basic) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate.
-
-
- Parameter {0} of {1} is never used. Remove the parameter or use it in the method body.
-
-
- Because the behavior of {0} could vary based on the current user's locale settings, replace this call in {1} with a call to {2}. If the result of {2} will be displayed to the user, specify 'CultureInfo.CurrentCulture' as the 'IFormatProvider' parameter. Otherwise, if the result will be stored and accessed by software, such as when it is persisted to disk or to a database, specify 'CultureInfo.InvariantCulture'.
-
-
- The type name {0} conflicts in whole or in part with the namespace name '{1}'. Change either name to eliminate the conflict.
-
-
- Change the base type of {0} from {1} to its generic equivalent 'System.Collections.ObjectModel.Collection'.
-
-
-
-
diff --git a/WinNUT_V2/AGauge_mod/AGauge.Designer.cs b/WinNUT_V2/AGauge_mod/AGauge.Designer.cs
deleted file mode 100644
index 4bf503b..0000000
--- a/WinNUT_V2/AGauge_mod/AGauge.Designer.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-namespace System.Windows.Forms
-{
- partial class AGauge
- {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- if (null != gaugeBitmap)
- gaugeBitmap.Dispose();
-
- if (null != components)
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Component Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
- components = new System.ComponentModel.Container();
- }
-
- #endregion
- }
-}
diff --git a/WinNUT_V2/AGauge_mod/AGauge.bmp b/WinNUT_V2/AGauge_mod/AGauge.bmp
deleted file mode 100644
index 53018cb..0000000
Binary files a/WinNUT_V2/AGauge_mod/AGauge.bmp and /dev/null differ
diff --git a/WinNUT_V2/AGauge_mod/AGauge.cs b/WinNUT_V2/AGauge_mod/AGauge.cs
deleted file mode 100644
index 68f3b42..0000000
--- a/WinNUT_V2/AGauge_mod/AGauge.cs
+++ /dev/null
@@ -1,1916 +0,0 @@
-// Copyright (C) 2007 A.J.Bauer
-//
-// This software is provided as-is, without any express or implied
-// warranty. In no event will the authors be held liable for any damages
-// arising from the use of this software.
-
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it
-// freely, subject to the following restrictions:
-// 1. The origin of this software must not be misrepresented; you must not
-// claim that you wrote the original software. if you use this software
-// in a product, an acknowledgment in the product documentation would be
-// appreciated but is not required.
-// 2. Altered source versions must be plainly marked as such, and must not be
-// misrepresented as being the original software.
-// 3. This notice may not be removed or altered from any source distribution.
-//
-// -----------------------------------------------------------------------------------
-// Copyright (C) 2012 Code Artist
-//
-// Added several improvement to original code created by A.J.Bauer.
-// Visit: http://codearteng.blogspot.com for more information on change history.
-//
-// -----------------------------------------------------------------------------------
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using System.Drawing.Drawing2D;
-using System.Diagnostics;
-using System.Collections;
-
-namespace System.Windows.Forms
-{
- ///
- /// AGauge - Copyright (C) 2007 A.J.Bauer
- /// http://www.codeproject.com/Articles/17559/A-fast-and-performing-gauge
- ///
- [ToolboxBitmapAttribute(typeof(AGauge), "AGauge.AGauge.bmp"),
- DefaultEvent("ValueInRangeChanged"),
- Description("Displays a value on an analog gauge. Raises an event if the value enters one of the definable ranges.")]
- public partial class AGauge : Control
- {
- #region Private Fields
-
- private Single fontBoundY1;
- private Single fontBoundY2;
- private Bitmap gaugeBitmap;
- private Boolean drawGaugeBackground = true;
-
- //Modified by Gawindx
- //private Single m_value1;
- private Single m_value1;
- //Added By Gawindx
- private Single m_value2;
- //private Boolean m_AutoSize = false;
-
- //private Point m_Center = new Point(100, 100);
- //Modified by gawindx
- private Point m_Center = new Point(74, 70);
- private Single m_MinValue = 0;
- private Single m_MaxValue = 100;
-
- private Color m_BaseArcColor = Color.Gray;
- //Modified by Gawindx
- //private Int32 m_BaseArcRadius = 80;
- private Int32 m_BaseArcRadius = 45;
- private Int32 m_BaseArcStart = 135;
- private Int32 m_BaseArcSweep = 270;
- //Modified by Gawindx
- //private Int32 m_BaseArcStart = -135;
- //private Int32 m_BaseArcSweep = -45;
- private Int32 m_BaseArcWidth = 5;
-
- private Color m_ScaleLinesInterColor = Color.Black;
- //Modified by Gawindx
- //private Int32 m_ScaleLinesInterInnerRadius = 73;
- //private Int32 m_ScaleLinesInterOuterRadius = 80;
- private Int32 m_ScaleLinesInterInnerRadius = 40;
- private Int32 m_ScaleLinesInterOuterRadius = 48;
- private Int32 m_ScaleLinesInterWidth = 1;
-
-
- private Int32 m_ScaleLinesMinorTicks = 9;
- private Color m_ScaleLinesMinorColor = Color.Gray;
- //Modified by Gawindx
- //private Int32 m_ScaleLinesMinorInnerRadius = 75;
- //private Int32 m_ScaleLinesMinorOuterRadius = 80
- private Int32 m_ScaleLinesMinorInnerRadius = 42;
- private Int32 m_ScaleLinesMinorOuterRadius = 48;
- private Int32 m_ScaleLinesMinorWidth = 1;
-
- private Single m_ScaleLinesMajorStepValue = 50.0f;
- private Color m_ScaleLinesMajorColor = Color.Black;
- //Modified by Gawindx
- //private Int32 m_ScaleLinesMajorInnerRadius = 70;
- //private Int32 m_ScaleLinesMajorOuterRadius = 80;
- private Int32 m_ScaleLinesMajorInnerRadius = 40;
- private Int32 m_ScaleLinesMajorOuterRadius = 48;
- private Int32 m_ScaleLinesMajorWidth = 2;
-
- //Modified by Gawindx
- //private Int32 m_ScaleNumbersRadius = 95;
- private Int32 m_ScaleNumbersRadius = 60;
- private Color m_ScaleNumbersColor = Color.Black;
- private String m_ScaleNumbersFormat;
- private Int32 m_ScaleNumbersStartScaleLine;
- private Int32 m_ScaleNumbersStepScaleLines = 1;
- private Int32 m_ScaleNumbersRotation;
-
- private NeedleType m_NeedleType;
- //Modified by Gawindx
- //private Int32 m_NeedleRadius = 80;
- private Int32 m_NeedleRadius = 32;
- private AGaugeNeedleColor m_NeedleColor1 = AGaugeNeedleColor.Gray;
- private Color m_NeedleColor2 = Color.DimGray;
- private Int32 m_NeedleWidth = 2;
-
- //Added By Gawindx
- public enum GradientType
- {
- None,
- RedGreen
- }
- public enum GradientOrientation
- {
- UpToBottom,
- BottomToUp,
- RightToLeft,
- LeftToRight
- }
- public enum UnitValue
- {
- None,
- Hertz,
- Percent,
- Volts,
- Watts
- }
-
- private GradientType m_gradientType = GradientType.RedGreen;
- private GradientOrientation m_gradientOrientation = GradientOrientation.BottomToUp;
- private UnitValue m_unitvalue1 = UnitValue.Volts;
- private UnitValue m_unitvalue2 = UnitValue.None;
- #endregion
-
- #region EventHandler
-
- [Description("This event is raised when gauge value changed.")]
- public event EventHandler ValueChanged;
- private void OnValueChanged()
- {
- EventHandler e = ValueChanged;
- if (e != null) e(this, null);
- }
-
- [Description("This event is raised if the value is entering or leaving defined range.")]
- public event EventHandler ValueInRangeChanged;
- private void OnValueInRangeChanged(AGaugeRange range, Single value)
- {
- EventHandler e = ValueInRangeChanged;
- if (e != null) e(this, new ValueInRangeChangedEventArgs(range, value, range.InRange));
- }
-
- #endregion
-
- #region Hidden and overridden inherited properties
-
- public new Boolean AllowDrop { get { return false; } set { /*Do Nothing */ } }
- //public new Boolean AutoSize { get { return false; } set { /*Do Nothing */ } }
- public new Boolean ForeColor { get { return false; } set { /*Do Nothing */ } }
- public new Boolean ImeMode { get { return false; } set { /*Do Nothing */ } }
- public override System.Drawing.Color BackColor
- {
- get { return base.BackColor; }
- set
- {
- base.BackColor = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- public override System.Drawing.Font Font
- {
- get { return base.Font; }
- set
- {
- base.Font = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- public override System.Windows.Forms.ImageLayout BackgroundImageLayout
- {
- get { return base.BackgroundImageLayout; }
- set
- {
- base.BackgroundImageLayout = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- #endregion
-
- public AGauge()
- {
- InitializeComponent();
- SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
- _GaugeRanges = new AGaugeRangeCollection(this);
- _GaugeLabels = new AGaugeLabelCollection(this);
-
- //Default Values
- //Size = new Size(205, 180);
- //Modified by Gawindx
- Size = new Size(148, 130);
- }
-
- #region Properties
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- //Modified By Gawindx
- //System.ComponentModel.Description("Gauge value.")]
- System.ComponentModel.Description("Gauge value1.")]
- public Single Value1
- {
- get { return m_value1; }
- set
- {
- value = Math.Min(Math.Max(value, m_MinValue), m_MaxValue);
- if (m_value1 != value)
- {
- m_value1 = value;
- OnValueChanged();
-
- if (this.DesignMode) drawGaugeBackground = true;
-
- foreach (AGaugeRange ptrRange in _GaugeRanges)
- {
- if ((m_value1 >= ptrRange.StartValue)
- && (m_value1 <= ptrRange.EndValue))
- {
- //Entering Range
- if (!ptrRange.InRange)
- {
- ptrRange.InRange = true;
- OnValueInRangeChanged(ptrRange, m_value1);
- }
- }
- else
- {
- //Leaving Range
- if (ptrRange.InRange)
- {
- ptrRange.InRange = false;
- OnValueInRangeChanged(ptrRange, m_value1);
- }
- }
- }
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("Auto size Mode of the gauge.")]
- public Boolean GaugeAutoSize
- {
- get
- {
- return base.AutoSize;
- }
- set
- {
- base.AutoSize = value;
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("Gauge Ranges.")]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
- public AGaugeRangeCollection GaugeRanges { get { return _GaugeRanges; } }
- private AGaugeRangeCollection _GaugeRanges;
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("Gauge Labels.")]
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
- public AGaugeLabelCollection GaugeLabels { get { return _GaugeLabels; } }
- private AGaugeLabelCollection _GaugeLabels;
-
- #region << Gauge Base >>
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The center of the gauge (in the control's client area)."),
- //Modified By Gawindx
- //System.ComponentModel.DefaultValue(typeof(Point), "100, 100")]
- System.ComponentModel.DefaultValue(typeof(Point), "148, 130")]
- public Point Center
- {
- get { return m_Center; }
- set
- {
- if (m_Center != value)
- {
- m_Center = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- //Added By Gawindx
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("UseColor For Arc Base Color.")]
- public GradientType GradientColor
- {
- get { return m_gradientType; }
- set
- {
- if (m_gradientType != value)
- {
- m_gradientType = value;
- Refresh();
- }
- }
- }
-
- //Added By Gawindx
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("Orientation Of Gradient Colors.")]
- public GradientOrientation GradientColorOrientation
- {
- get { return m_gradientOrientation; }
- set
- {
- if (m_gradientOrientation != value)
- {
- m_gradientOrientation = value;
- Refresh();
- }
- }
- }
-
- //Added By Gawindx
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("Units For Value 1")]
- public UnitValue UnitValue1
- {
- get { return m_unitvalue1; }
- set
- {
- if (m_unitvalue1 != value)
- {
- m_unitvalue1 = value;
- Refresh();
- }
- }
- }
-
- //Added By Gawindx
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("UseColor For Arc Base Color.")]
- public UnitValue UnitValue2
- {
- get { return m_unitvalue2; }
- set
- {
- if (m_unitvalue2 != value)
- {
- m_unitvalue2 = value;
- Refresh();
- }
- }
- }
-
- //Added By Gawindx
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("Second Value To Display.")]
- public Single Value2
- {
- get { return m_value2; }
- set
- {
- if (m_value2 != value)
- {
- m_value2 = value;
- OnValueChanged();
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The color of the base arc.")]
- public Color BaseArcColor
- {
- get { return m_BaseArcColor; }
- set
- {
- if (m_BaseArcColor != value)
- {
- m_BaseArcColor = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The radius of the base arc.")]
- public Int32 BaseArcRadius
- {
- get { return m_BaseArcRadius; }
- set
- {
- if (m_BaseArcRadius != value)
- {
- m_BaseArcRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The start angle of the base arc.")]
- public Int32 BaseArcStart
- {
- get { return m_BaseArcStart; }
- set
- {
- if (m_BaseArcStart != value)
- {
- m_BaseArcStart = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The sweep angle of the base arc.")]
- public Int32 BaseArcSweep
- {
- get { return m_BaseArcSweep; }
- set
- {
- if (m_BaseArcSweep != value)
- {
- m_BaseArcSweep = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The width of the base arc.")]
- public Int32 BaseArcWidth
- {
- get { return m_BaseArcWidth; }
- set
- {
- if (m_BaseArcWidth != value)
- {
- m_BaseArcWidth = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- #endregion
-
- #region << Gauge Scale >>
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The minimum value to show on the scale.")]
- public Single MinValue
- {
- get { return m_MinValue; }
- set
- {
- if ((m_MinValue != value) && (value < m_MaxValue))
- {
- m_MinValue = value;
- m_value1 = Math.Min(Math.Max(m_value1, m_MinValue), m_MaxValue);
- m_ScaleLinesMajorStepValue = Math.Min(m_ScaleLinesMajorStepValue, m_MaxValue - m_MinValue);
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The maximum value to show on the scale.")]
- public Single MaxValue
- {
- get { return m_MaxValue; }
- set
- {
- if ((m_MaxValue != value) && (value > m_MinValue))
- {
- m_MaxValue = value;
- m_value1 = Math.Min(Math.Max(m_value1, m_MinValue), m_MaxValue);
- m_ScaleLinesMajorStepValue = Math.Min(m_ScaleLinesMajorStepValue, m_MaxValue - m_MinValue);
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The color of the inter scale lines which are the middle scale lines for an uneven number of minor scale lines.")]
- public Color ScaleLinesInterColor
- {
- get { return m_ScaleLinesInterColor; }
- set
- {
- if (m_ScaleLinesInterColor != value)
- {
- m_ScaleLinesInterColor = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The inner radius of the inter scale lines which are the middle scale lines for an uneven number of minor scale lines.")]
- public Int32 ScaleLinesInterInnerRadius
- {
- get { return m_ScaleLinesInterInnerRadius; }
- set
- {
- if (m_ScaleLinesInterInnerRadius != value)
- {
- m_ScaleLinesInterInnerRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The outer radius of the inter scale lines which are the middle scale lines for an uneven number of minor scale lines.")]
- public Int32 ScaleLinesInterOuterRadius
- {
- get { return m_ScaleLinesInterOuterRadius; }
- set
- {
- if (m_ScaleLinesInterOuterRadius != value)
- {
- m_ScaleLinesInterOuterRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The width of the inter scale lines which are the middle scale lines for an uneven number of minor scale lines.")]
- public Int32 ScaleLinesInterWidth
- {
- get { return m_ScaleLinesInterWidth; }
- set
- {
- if (m_ScaleLinesInterWidth != value)
- {
- m_ScaleLinesInterWidth = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The number of minor scale lines.")]
- public Int32 ScaleLinesMinorTicks
- {
- get { return m_ScaleLinesMinorTicks; }
- set
- {
- if (m_ScaleLinesMinorTicks != value)
- {
- m_ScaleLinesMinorTicks = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The color of the minor scale lines.")]
- public Color ScaleLinesMinorColor
- {
- get { return m_ScaleLinesMinorColor; }
- set
- {
- if (m_ScaleLinesMinorColor != value)
- {
- m_ScaleLinesMinorColor = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The inner radius of the minor scale lines.")]
- public Int32 ScaleLinesMinorInnerRadius
- {
- get { return m_ScaleLinesMinorInnerRadius; }
- set
- {
- if (m_ScaleLinesMinorInnerRadius != value)
- {
- m_ScaleLinesMinorInnerRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The outer radius of the minor scale lines.")]
- public Int32 ScaleLinesMinorOuterRadius
- {
- get { return m_ScaleLinesMinorOuterRadius; }
- set
- {
- if (m_ScaleLinesMinorOuterRadius != value)
- {
- m_ScaleLinesMinorOuterRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The width of the minor scale lines.")]
- public Int32 ScaleLinesMinorWidth
- {
- get { return m_ScaleLinesMinorWidth; }
- set
- {
- if (m_ScaleLinesMinorWidth != value)
- {
- m_ScaleLinesMinorWidth = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The step value of the major scale lines.")]
- public Single ScaleLinesMajorStepValue
- {
- get { return m_ScaleLinesMajorStepValue; }
- set
- {
- if ((m_ScaleLinesMajorStepValue != value) && (value > 0))
- {
- m_ScaleLinesMajorStepValue = Math.Min(value, m_MaxValue - m_MinValue);
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The color of the major scale lines.")]
- public Color ScaleLinesMajorColor
- {
- get { return m_ScaleLinesMajorColor; }
- set
- {
- if (m_ScaleLinesMajorColor != value)
- {
- m_ScaleLinesMajorColor = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The inner radius of the major scale lines.")]
- public Int32 ScaleLinesMajorInnerRadius
- {
- get { return m_ScaleLinesMajorInnerRadius; }
- set
- {
- if (m_ScaleLinesMajorInnerRadius != value)
- {
- m_ScaleLinesMajorInnerRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The outer radius of the major scale lines.")]
- public Int32 ScaleLinesMajorOuterRadius
- {
- get { return m_ScaleLinesMajorOuterRadius; }
- set
- {
- if (m_ScaleLinesMajorOuterRadius != value)
- {
- m_ScaleLinesMajorOuterRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The width of the major scale lines.")]
- public Int32 ScaleLinesMajorWidth
- {
- get { return m_ScaleLinesMajorWidth; }
- set
- {
- if (m_ScaleLinesMajorWidth != value)
- {
- m_ScaleLinesMajorWidth = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- #endregion
-
- #region << Gauge Scale Numbers >>
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The radius of the scale numbers.")]
- public Int32 ScaleNumbersRadius
- {
- get { return m_ScaleNumbersRadius; }
- set
- {
- if (m_ScaleNumbersRadius != value)
- {
- m_ScaleNumbersRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The color of the scale numbers.")]
- public Color ScaleNumbersColor
- {
- get { return m_ScaleNumbersColor; }
- set
- {
- if (m_ScaleNumbersColor != value)
- {
- m_ScaleNumbersColor = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The format of the scale numbers.")]
- public String ScaleNumbersFormat
- {
- get { return m_ScaleNumbersFormat; }
- set
- {
- if (m_ScaleNumbersFormat != value)
- {
- m_ScaleNumbersFormat = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The number of the scale line to start writing numbers next to.")]
- public Int32 ScaleNumbersStartScaleLine
- {
- get { return m_ScaleNumbersStartScaleLine; }
- set
- {
- if (m_ScaleNumbersStartScaleLine != value)
- {
- m_ScaleNumbersStartScaleLine = Math.Max(value, 1);
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The number of scale line steps for writing numbers.")]
- public Int32 ScaleNumbersStepScaleLines
- {
- get { return m_ScaleNumbersStepScaleLines; }
- set
- {
- if (m_ScaleNumbersStepScaleLines != value)
- {
- m_ScaleNumbersStepScaleLines = Math.Max(value, 1);
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The angle relative to the tangent of the base arc at a scale line that is used to rotate numbers. set to 0 for no rotation or e.g. set to 90.")]
- public Int32 ScaleNumbersRotation
- {
- get { return m_ScaleNumbersRotation; }
- set
- {
- if (m_ScaleNumbersRotation != value)
- {
- m_ScaleNumbersRotation = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- #endregion
-
- #region << Gauge Needle >>
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The type of the needle, currently only type 0 and 1 are supported. Type 0 looks nicers but if you experience performance problems you might consider using type 1.")]
- public NeedleType NeedleType
- {
- get { return m_NeedleType; }
- set
- {
- if (m_NeedleType != value)
- {
- m_NeedleType = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The radius of the needle.")]
- public Int32 NeedleRadius
- {
- get { return m_NeedleRadius; }
- set
- {
- if (m_NeedleRadius != value)
- {
- m_NeedleRadius = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The first color of the needle.")]
- public AGaugeNeedleColor NeedleColor1
- {
- get { return m_NeedleColor1; }
- set
- {
- if (m_NeedleColor1 != value)
- {
- m_NeedleColor1 = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The second color of the needle.")]
- public Color NeedleColor2
- {
- get { return m_NeedleColor2; }
- set
- {
- if (m_NeedleColor2 != value)
- {
- m_NeedleColor2 = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("AGauge"),
- System.ComponentModel.Description("The width of the needle.")]
- public Int32 NeedleWidth
- {
- get { return m_NeedleWidth; }
- set
- {
- if (m_NeedleWidth != value)
- {
- m_NeedleWidth = value;
- drawGaugeBackground = true;
- Refresh();
- }
- }
- }
-
- #endregion
-
- #endregion
-
- #region Helper
-
- private void FindFontBounds()
- {
- //find upper and lower bounds for numeric characters
- Int32 c1;
- Int32 c2;
- Boolean boundfound;
- using (SolidBrush backBrush = new SolidBrush(Color.White))
- using (SolidBrush foreBrush = new SolidBrush(Color.Black))
- {
- using (Bitmap bmpMeasure = new Bitmap(5, 5))
- using (Graphics gMeasure = Graphics.FromImage(bmpMeasure))
- {
- SizeF boundingBox = gMeasure.MeasureString("0123456789", Font, -1, StringFormat.GenericTypographic);
- using (var b = new Bitmap((Int32)(boundingBox.Width), (Int32)(boundingBox.Height)))
- using (var g = Graphics.FromImage(b))
- {
- g.FillRectangle(backBrush, 0.0F, 0.0F, boundingBox.Width, boundingBox.Height);
- g.DrawString("0123456789", Font, foreBrush, 0.0F, 0.0F, StringFormat.GenericTypographic);
-
- fontBoundY1 = 0;
- fontBoundY2 = 0;
- c1 = 0;
- boundfound = false;
- while ((c1 < b.Height) && (!boundfound))
- {
- c2 = 0;
- while ((c2 < b.Width) && (!boundfound))
- {
- if (b.GetPixel(c2, c1) != backBrush.Color)
- {
- fontBoundY1 = c1;
- boundfound = true;
- }
- c2++;
- }
- c1++;
- }
-
- c1 = b.Height - 1;
- boundfound = false;
- while ((0 < c1) && (!boundfound))
- {
- c2 = 0;
- while ((c2 < b.Width) && (!boundfound))
- {
- if (b.GetPixel(c2, c1) != backBrush.Color)
- {
- fontBoundY2 = c1;
- boundfound = true;
- }
- c2++;
- }
- c1--;
- }
- }
- }
- }
- }
-
- [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- public void RepaintControl()
- {
- drawGaugeBackground = true;
- Refresh();
- }
-
- #endregion
-
- #region Base member overrides
-
- protected override void OnPaintBackground(PaintEventArgs pevent)
- {
- }
- protected override void OnPaint(PaintEventArgs e)
- {
- if ((Width < 10) || (Height < 10))
- {
- return;
- }
-
- #region AutoSize
- Single centerFactor = 1;
- var center = Center;
-
-
- if (AutoSize)
- {
- double widthFactor = ((1.0 / (double)(2 * Center.X)) * (double)Size.Width);
- double heightFactor = ((1.0 / (double)(2 * Center.Y)) * (double)Size.Height);
- centerFactor = (float)Math.Min(widthFactor, heightFactor);
- center = new Point((int)(Center.X * widthFactor), (int)(Center.Y * heightFactor));
- }
- #endregion
-
- #region drawGaugeBackground
- if (drawGaugeBackground)
- {
- drawGaugeBackground = false;
-
- FindFontBounds();
-
- if (gaugeBitmap != null)
- {
- gaugeBitmap.Dispose();
- gaugeBitmap = null;
- }
-
- gaugeBitmap = new Bitmap(Width, Height, e.Graphics);
- using (Graphics ggr = Graphics.FromImage(gaugeBitmap))
- using (GraphicsPath gp = new GraphicsPath())
- {
- using (var brBackground = new SolidBrush(BackColor))
- {
- ggr.FillRectangle(brBackground, ClientRectangle);
- }
-
- #region BackgroundImage
- if (BackgroundImage != null)
- {
- switch (BackgroundImageLayout)
- {
- case ImageLayout.Center:
- ggr.DrawImageUnscaled(BackgroundImage, Width / 2 - BackgroundImage.Width / 2, Height / 2 - BackgroundImage.Height / 2);
- break;
- case ImageLayout.None:
- ggr.DrawImageUnscaled(BackgroundImage, 0, 0);
- break;
- case ImageLayout.Stretch:
- ggr.DrawImage(BackgroundImage, 0, 0, Width, Height);
- break;
- case ImageLayout.Tile:
- Int32 pixelOffsetX = 0;
- Int32 pixelOffsetY = 0;
- while (pixelOffsetX < Width)
- {
- pixelOffsetY = 0;
- while (pixelOffsetY < Height)
- {
- ggr.DrawImageUnscaled(BackgroundImage, pixelOffsetX, pixelOffsetY);
- pixelOffsetY += BackgroundImage.Height;
- }
- pixelOffsetX += BackgroundImage.Width;
- }
- break;
- case ImageLayout.Zoom:
- if ((Single)(BackgroundImage.Width / Width) < (Single)(BackgroundImage.Height / Height))
- {
- ggr.DrawImage(BackgroundImage, 0, 0, Height, Height);
- }
- else
- {
- ggr.DrawImage(BackgroundImage, 0, 0, Width, Width);
- }
- break;
- }
- }
- #endregion
-
- ggr.SmoothingMode = SmoothingMode.HighQuality;
- ggr.PixelOffsetMode = PixelOffsetMode.HighQuality;
-
-
- #region _GaugeRanges
- Single rangeStartAngle;
- Single rangeSweepAngle;
- foreach (AGaugeRange ptrRange in _GaugeRanges)
- {
- if (ptrRange.EndValue > ptrRange.StartValue)
- {
- rangeStartAngle = m_BaseArcStart + (ptrRange.StartValue - m_MinValue) * m_BaseArcSweep / (m_MaxValue - m_MinValue);
- rangeSweepAngle = (ptrRange.EndValue - ptrRange.StartValue) * m_BaseArcSweep / (m_MaxValue - m_MinValue);
- gp.Reset();
- int outerRadius = (int)(ptrRange.OuterRadius * centerFactor);
- gp.AddPie(new Rectangle(center.X - outerRadius, center.Y - outerRadius,
- 2 * outerRadius, 2 * outerRadius), rangeStartAngle, rangeSweepAngle);
- gp.Reverse();
- int innerRadius = (int)(ptrRange.InnerRadius * centerFactor);
- gp.AddPie(new Rectangle(center.X - innerRadius, center.Y - innerRadius,
- 2 * innerRadius, 2 * innerRadius), rangeStartAngle, rangeSweepAngle);
- gp.Reverse();
- ggr.SetClip(gp);
- using (var brRange = new SolidBrush(ptrRange.Color))
- {
- ggr.FillPie(brRange, new Rectangle(center.X - outerRadius, center.Y - outerRadius, 2 * outerRadius, 2 * outerRadius), rangeStartAngle, rangeSweepAngle);
- }
- }
- }
- #endregion
-
- ggr.SetClip(ClientRectangle);
- if (m_BaseArcRadius > 0)
- {
- int baseArcRadius = (int)(m_BaseArcRadius * centerFactor);
- if (m_gradientType != GradientType.None)
- {
- Point GradientP1Brush = new Point(0, (Center.X + baseArcRadius + m_BaseArcWidth + 2));
- Point GradientP2Brush = new Point(0, (Center.X - baseArcRadius - m_BaseArcWidth - 2));
- switch (m_gradientOrientation)
- {
- case GradientOrientation.UpToBottom:
- GradientP1Brush = new Point(0, (Center.X - baseArcRadius - m_BaseArcWidth - 2));
- GradientP2Brush = new Point(0, (Center.X + baseArcRadius + m_BaseArcWidth + 2));
- break;
- case GradientOrientation.BottomToUp:
- GradientP1Brush = new Point(0, (Center.X + baseArcRadius + m_BaseArcWidth + 2));
- GradientP2Brush = new Point(0, (Center.X - baseArcRadius - m_BaseArcWidth - 2));
- break;
- case GradientOrientation.RightToLeft:
- GradientP1Brush = new Point((Center.Y + baseArcRadius + m_BaseArcWidth + 2), 0);
- GradientP2Brush = new Point((Center.Y - baseArcRadius - m_BaseArcWidth - 2), 0);
- break;
- case GradientOrientation.LeftToRight:
- GradientP1Brush = new Point((Center.Y - baseArcRadius - m_BaseArcWidth - 2), 0);
- GradientP2Brush = new Point((Center.Y + baseArcRadius + m_BaseArcWidth + 2), 0);
- break;
- }
- LinearGradientBrush myArc1Gradient = new LinearGradientBrush(GradientP1Brush, GradientP2Brush, Color.Red, Color.Green);
- using (var pnArc = new Pen(myArc1Gradient, (int)(m_BaseArcWidth * centerFactor)))
- {
- ggr.DrawArc(pnArc, new Rectangle(center.X - baseArcRadius, center.Y - baseArcRadius, 2 * baseArcRadius, 2 * baseArcRadius), m_BaseArcStart, m_BaseArcSweep);
- }
- } else {
- using (var pnArc = new Pen(m_BaseArcColor, (int)(m_BaseArcWidth * centerFactor)))
- {
- ggr.DrawArc(pnArc, new Rectangle(center.X - baseArcRadius, center.Y - baseArcRadius, 2 * baseArcRadius, 2 * baseArcRadius), m_BaseArcStart, m_BaseArcSweep);
- }
- }
- }
-
- #region ScaleNumbers
- String valueText = "";
- SizeF boundingBox;
- Single countValue = 0;
- Int32 counter1 = 0;
- var Format = StringFormat.GenericTypographic;
- Format.Alignment = StringAlignment.Near;
-
- using (var pnMajorScaleLines = new Pen(m_ScaleLinesMajorColor, (int)(m_ScaleLinesMajorWidth * centerFactor)))
- using (var brScaleNumbers = new SolidBrush(m_ScaleNumbersColor))
- {
- while (countValue <= (m_MaxValue - m_MinValue))
- {
- valueText = (m_MinValue + countValue).ToString(m_ScaleNumbersFormat);
- ggr.ResetTransform();
- boundingBox = ggr.MeasureString(valueText, Font, -1, StringFormat.GenericTypographic);
-
- gp.Reset();
- int scaleLinesMajorOuterRadius = (int)(m_ScaleLinesMajorOuterRadius * centerFactor);
- gp.AddEllipse(new Rectangle(center.X - scaleLinesMajorOuterRadius, center.Y - scaleLinesMajorOuterRadius, 2 * scaleLinesMajorOuterRadius, 2 * scaleLinesMajorOuterRadius));
- gp.Reverse();
- int scaleLinesMajorInnerRadius = (int)(m_ScaleLinesMajorInnerRadius * centerFactor);
- gp.AddEllipse(new Rectangle(center.X - scaleLinesMajorInnerRadius, center.Y - scaleLinesMajorInnerRadius, 2 * scaleLinesMajorInnerRadius, 2 * scaleLinesMajorInnerRadius));
- gp.Reverse();
- ggr.SetClip(gp);
-
- ggr.DrawLine(pnMajorScaleLines,
- (Single)(center.X),
- (Single)(center.Y),
- (Single)(center.X + 2 * scaleLinesMajorOuterRadius * Math.Cos((m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue)) * Math.PI / 180.0)),
- (Single)(center.Y + 2 * scaleLinesMajorOuterRadius * Math.Sin((m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue)) * Math.PI / 180.0)));
-
- gp.Reset();
- int scaleLinesMinorOuterRadius = (int)(m_ScaleLinesMinorOuterRadius * centerFactor);
- gp.AddEllipse(new Rectangle(center.X - scaleLinesMinorOuterRadius, center.Y - scaleLinesMinorOuterRadius, 2 * scaleLinesMinorOuterRadius, 2 * scaleLinesMinorOuterRadius));
- gp.Reverse();
- int scaleLinesMinorInnerRadius = (int)(m_ScaleLinesMinorInnerRadius * centerFactor);
- gp.AddEllipse(new Rectangle(center.X - scaleLinesMinorInnerRadius, center.Y - scaleLinesMinorInnerRadius, 2 * scaleLinesMinorInnerRadius, 2 * scaleLinesMinorInnerRadius));
- gp.Reverse();
- ggr.SetClip(gp);
-
- if (countValue < (m_MaxValue - m_MinValue))
- {
- using (var pnScaleLinesInter = new Pen(m_ScaleLinesInterColor, (int)(m_ScaleLinesInterWidth * centerFactor)))
- using (var pnScaleLinesMinorColor = new Pen(m_ScaleLinesMinorColor, (int)(m_ScaleLinesMinorWidth * centerFactor)))
- {
- for (Int32 counter2 = 1; counter2 <= m_ScaleLinesMinorTicks; counter2++)
- {
- if (((m_ScaleLinesMinorTicks % 2) == 1) && (m_ScaleLinesMinorTicks / 2) + 1 == counter2)
- {
- gp.Reset();
- int scaleLinesInterOuterRadius = (int)(m_ScaleLinesInterOuterRadius * centerFactor);
- gp.AddEllipse(new Rectangle(center.X - scaleLinesInterOuterRadius, center.Y - scaleLinesInterOuterRadius, 2 * scaleLinesInterOuterRadius, 2 * scaleLinesInterOuterRadius));
- gp.Reverse();
- int scaleLinesInterInnerRadius = (int)(m_ScaleLinesInterInnerRadius * centerFactor);
- gp.AddEllipse(new Rectangle(center.X - scaleLinesInterInnerRadius, center.Y - scaleLinesInterInnerRadius, 2 * scaleLinesInterInnerRadius, 2 * scaleLinesInterInnerRadius));
- gp.Reverse();
- ggr.SetClip(gp);
-
- ggr.DrawLine(pnScaleLinesInter,
- (Single)(center.X),
- (Single)(center.Y),
- (Single)(center.X + 2 * scaleLinesInterOuterRadius * Math.Cos((m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue) + counter2 * m_BaseArcSweep / (((Single)((m_MaxValue - m_MinValue) / m_ScaleLinesMajorStepValue)) * (m_ScaleLinesMinorTicks + 1))) * Math.PI / 180.0)),
- (Single)(center.Y + 2 * scaleLinesInterOuterRadius * Math.Sin((m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue) + counter2 * m_BaseArcSweep / (((Single)((m_MaxValue - m_MinValue) / m_ScaleLinesMajorStepValue)) * (m_ScaleLinesMinorTicks + 1))) * Math.PI / 180.0)));
-
- gp.Reset();
- gp.AddEllipse(new Rectangle(center.X - scaleLinesMinorOuterRadius, center.Y - scaleLinesMinorOuterRadius, 2 * scaleLinesMinorOuterRadius, 2 * scaleLinesMinorOuterRadius));
- gp.Reverse();
- gp.AddEllipse(new Rectangle(center.X - scaleLinesMinorInnerRadius, center.Y - scaleLinesMinorInnerRadius, 2 * scaleLinesMinorInnerRadius, 2 * scaleLinesMinorInnerRadius));
- gp.Reverse();
- ggr.SetClip(gp);
- }
- else
- {
- ggr.DrawLine(pnScaleLinesMinorColor,
- (Single)(center.X),
- (Single)(center.Y),
- (Single)(center.X + 2 * scaleLinesMinorOuterRadius * Math.Cos((m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue) + counter2 * m_BaseArcSweep / (((Single)((m_MaxValue - m_MinValue) / m_ScaleLinesMajorStepValue)) * (m_ScaleLinesMinorTicks + 1))) * Math.PI / 180.0)),
- (Single)(center.Y + 2 * scaleLinesMinorOuterRadius * Math.Sin((m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue) + counter2 * m_BaseArcSweep / (((Single)((m_MaxValue - m_MinValue) / m_ScaleLinesMajorStepValue)) * (m_ScaleLinesMinorTicks + 1))) * Math.PI / 180.0)));
- }
- }
- }
- }
-
- ggr.SetClip(ClientRectangle);
-
- if (m_ScaleNumbersRotation != 0)
- {
- ggr.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
- ggr.RotateTransform(90.0F + m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue));
- }
-
- ggr.TranslateTransform((Single)(center.X + (m_ScaleNumbersRadius * centerFactor) * Math.Cos((m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue)) * Math.PI / 180.0f)),
- (Single)(center.Y + (m_ScaleNumbersRadius * centerFactor) * Math.Sin((m_BaseArcStart + countValue * m_BaseArcSweep / (m_MaxValue - m_MinValue)) * Math.PI / 180.0f)),
- System.Drawing.Drawing2D.MatrixOrder.Append);
-
-
- if (counter1 >= ScaleNumbersStartScaleLine - 1)
- {
- var ptText = new PointF((-boundingBox.Width / 2f), (-fontBoundY1 - (fontBoundY2 - fontBoundY1 + 1f) / 2f));
- ggr.DrawString(valueText, Font, brScaleNumbers, ptText.X, ptText.Y, Format);
- }
-
- countValue += m_ScaleLinesMajorStepValue;
- counter1++;
- }
- }
- #endregion
-
- ggr.ResetTransform();
- ggr.SetClip(ClientRectangle);
-
- if (m_ScaleNumbersRotation != 0)
- {
- ggr.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault;
- }
-
- #region _GaugeLabels
- Format = StringFormat.GenericTypographic;
- Format.Alignment = StringAlignment.Center;
- foreach (AGaugeLabel ptrGaugeLabel in _GaugeLabels)
- {
- if (!String.IsNullOrEmpty(ptrGaugeLabel.Text))
- {
- using (var brGaugeLabel = new SolidBrush(ptrGaugeLabel.Color))
- {
- ggr.DrawString(ptrGaugeLabel.Text, ptrGaugeLabel.Font, brGaugeLabel,
- (ptrGaugeLabel.Position.X) * centerFactor + center.X,
- (ptrGaugeLabel.Position.Y) * centerFactor + center.Y, Format);
- }
- }
- }
- #endregion
- }
- }
- #endregion
-
- e.Graphics.DrawImageUnscaled(gaugeBitmap, 0, 0);
- e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
- e.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
-
- #region Needle
- Single brushAngle = (Int32)(m_BaseArcStart + (m_value1 - m_MinValue) * m_BaseArcSweep / (m_MaxValue - m_MinValue)) % 360;
- if (brushAngle < 0) brushAngle += 360;
- Double needleAngle = brushAngle * Math.PI / 180;
-
- int needleWidth = (int)(m_NeedleWidth * centerFactor);
- int needleRadius = (int)(m_NeedleRadius * centerFactor);
- switch (m_NeedleType)
- {
- case NeedleType.Advance:
- PointF[] points = new PointF[3];
-
- Int32 subcol = (Int32)(((brushAngle + 225) % 180) * 100 / 180);
- Int32 subcol2 = (Int32)(((brushAngle + 135) % 180) * 100 / 180);
-
- using (var brNeedle = new SolidBrush(m_NeedleColor2))
- {
- e.Graphics.FillEllipse(brNeedle, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- }
-
- Color clr1 = Color.White;
- Color clr2 = Color.White;
- Color clr3 = Color.White;
- Color clr4 = Color.White;
-
- switch (m_NeedleColor1)
- {
- case AGaugeNeedleColor.Gray:
- clr1 = Color.FromArgb(80 + subcol, 80 + subcol, 80 + subcol);
- clr2 = Color.FromArgb(180 - subcol, 180 - subcol, 180 - subcol);
- clr3 = Color.FromArgb(80 + subcol2, 80 + subcol2, 80 + subcol2);
- clr4 = Color.FromArgb(180 - subcol2, 180 - subcol2, 180 - subcol2);
- e.Graphics.DrawEllipse(Pens.Gray, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- break;
- case AGaugeNeedleColor.Red:
- clr1 = Color.FromArgb(145 + subcol, subcol, subcol);
- clr2 = Color.FromArgb(245 - subcol, 100 - subcol, 100 - subcol);
- clr3 = Color.FromArgb(145 + subcol2, subcol2, subcol2);
- clr4 = Color.FromArgb(245 - subcol2, 100 - subcol2, 100 - subcol2);
- e.Graphics.DrawEllipse(Pens.Red, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- break;
- case AGaugeNeedleColor.Green:
- clr1 = Color.FromArgb(subcol, 145 + subcol, subcol);
- clr2 = Color.FromArgb(100 - subcol, 245 - subcol, 100 - subcol);
- clr3 = Color.FromArgb(subcol2, 145 + subcol2, subcol2);
- clr4 = Color.FromArgb(100 - subcol2, 245 - subcol2, 100 - subcol2);
- e.Graphics.DrawEllipse(Pens.Green, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- break;
- case AGaugeNeedleColor.Blue:
- clr1 = Color.FromArgb(subcol, subcol, 145 + subcol);
- clr2 = Color.FromArgb(100 - subcol, 100 - subcol, 245 - subcol);
- clr3 = Color.FromArgb(subcol2, subcol2, 145 + subcol2);
- clr4 = Color.FromArgb(100 - subcol2, 100 - subcol2, 245 - subcol2);
- e.Graphics.DrawEllipse(Pens.Blue, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- break;
- case AGaugeNeedleColor.Magenta:
- clr1 = Color.FromArgb(subcol, 145 + subcol, 145 + subcol);
- clr2 = Color.FromArgb(100 - subcol, 245 - subcol, 245 - subcol);
- clr3 = Color.FromArgb(subcol2, 145 + subcol2, 145 + subcol2);
- clr4 = Color.FromArgb(100 - subcol2, 245 - subcol2, 245 - subcol2);
- e.Graphics.DrawEllipse(Pens.Magenta, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- break;
- case AGaugeNeedleColor.Violet:
- clr1 = Color.FromArgb(145 + subcol, subcol, 145 + subcol);
- clr2 = Color.FromArgb(245 - subcol, 100 - subcol, 245 - subcol);
- clr3 = Color.FromArgb(145 + subcol2, subcol2, 145 + subcol2);
- clr4 = Color.FromArgb(245 - subcol2, 100 - subcol2, 245 - subcol2);
- e.Graphics.DrawEllipse(Pens.Violet, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- break;
- case AGaugeNeedleColor.Yellow:
- clr1 = Color.FromArgb(145 + subcol, 145 + subcol, subcol);
- clr2 = Color.FromArgb(245 - subcol, 245 - subcol, 100 - subcol);
- clr3 = Color.FromArgb(145 + subcol2, 145 + subcol2, subcol2);
- clr4 = Color.FromArgb(245 - subcol2, 245 - subcol2, 100 - subcol2);
- e.Graphics.DrawEllipse(Pens.Violet, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- break;
- }
-
- if (Math.Floor((Single)(((brushAngle + 225) % 360) / 180.0)) == 0)
- {
- Color clrTemp = clr1;
- clr1 = clr2;
- clr2 = clrTemp;
- }
-
- if (Math.Floor((Single)(((brushAngle + 135) % 360) / 180.0)) == 0)
- {
- clr4 = clr3;
- }
-
- using (Brush brush1 = new SolidBrush(clr1))
- using (Brush brush2 = new SolidBrush(clr2))
- using (Brush brush3 = new SolidBrush(clr3))
- using (Brush brush4 = new SolidBrush(clr4))
- {
- points[0].X = (Single)(center.X + needleRadius * Math.Cos(needleAngle));
- points[0].Y = (Single)(center.Y + needleRadius * Math.Sin(needleAngle));
- points[1].X = (Single)(center.X - needleRadius / 20 * Math.Cos(needleAngle));
- points[1].Y = (Single)(center.Y - needleRadius / 20 * Math.Sin(needleAngle));
- points[2].X = (Single)(center.X - needleRadius / 5 * Math.Cos(needleAngle) + needleWidth * 2 * Math.Cos(needleAngle + Math.PI / 2));
- points[2].Y = (Single)(center.Y - needleRadius / 5 * Math.Sin(needleAngle) + needleWidth * 2 * Math.Sin(needleAngle + Math.PI / 2));
- e.Graphics.FillPolygon(brush1, points);
-
- points[2].X = (Single)(center.X - needleRadius / 5 * Math.Cos(needleAngle) + needleWidth * 2 * Math.Cos(needleAngle - Math.PI / 2));
- points[2].Y = (Single)(center.Y - needleRadius / 5 * Math.Sin(needleAngle) + needleWidth * 2 * Math.Sin(needleAngle - Math.PI / 2));
- e.Graphics.FillPolygon(brush2, points);
-
- points[0].X = (Single)(center.X - (needleRadius / 20 - 1) * Math.Cos(needleAngle));
- points[0].Y = (Single)(center.Y - (needleRadius / 20 - 1) * Math.Sin(needleAngle));
- points[1].X = (Single)(center.X - needleRadius / 5 * Math.Cos(needleAngle) + needleWidth * 2 * Math.Cos(needleAngle + Math.PI / 2));
- points[1].Y = (Single)(center.Y - needleRadius / 5 * Math.Sin(needleAngle) + needleWidth * 2 * Math.Sin(needleAngle + Math.PI / 2));
- points[2].X = (Single)(center.X - needleRadius / 5 * Math.Cos(needleAngle) + needleWidth * 2 * Math.Cos(needleAngle - Math.PI / 2));
- points[2].Y = (Single)(center.Y - needleRadius / 5 * Math.Sin(needleAngle) + needleWidth * 2 * Math.Sin(needleAngle - Math.PI / 2));
- e.Graphics.FillPolygon(brush4, points);
-
- points[0].X = (Single)(center.X - needleRadius / 20 * Math.Cos(needleAngle));
- points[0].Y = (Single)(center.Y - needleRadius / 20 * Math.Sin(needleAngle));
- points[1].X = (Single)(center.X + needleRadius * Math.Cos(needleAngle));
- points[1].Y = (Single)(center.Y + needleRadius * Math.Sin(needleAngle));
-
- using (var pnNeedle = new Pen(m_NeedleColor2))
- {
- e.Graphics.DrawLine(pnNeedle, center.X, center.Y, points[0].X, points[0].Y);
- e.Graphics.DrawLine(pnNeedle, center.X, center.Y, points[1].X, points[1].Y);
- }
- }
- break;
- case NeedleType.Simple:
- Point startPoint = new Point((Int32)(center.X - needleRadius / 8 * Math.Cos(needleAngle)),
- (Int32)(center.Y - needleRadius / 8 * Math.Sin(needleAngle)));
- Point endPoint = new Point((Int32)(center.X + needleRadius * Math.Cos(needleAngle)),
- (Int32)(center.Y + needleRadius * Math.Sin(needleAngle)));
-
- using (var brDisk = new SolidBrush(m_NeedleColor2))
- {
- e.Graphics.FillEllipse(brDisk, center.X - needleWidth * 3, center.Y - needleWidth * 3, needleWidth * 6, needleWidth * 6);
- }
-
- using (var pnLine = new Pen(GetColor(m_NeedleColor1), needleWidth))
- {
- e.Graphics.DrawLine(pnLine, center.X, center.Y, endPoint.X, endPoint.Y);
- e.Graphics.DrawLine(pnLine, center.X, center.Y, startPoint.X, startPoint.Y);
- }
- break;
- }
- #endregion
-
- #region DisplayValue
- var PenString = new Pen(Color.Black);
- Font PenFontV1 = new Font("Microsoft Sans Serif", 8, FontStyle.Bold);
- Font PenFontV2 = new Font("Microsoft Sans Serif", 7, FontStyle.Bold);
- SolidBrush StringPen = new SolidBrush(Color.Black);
- Int32 LineHeight = 15;
- PointF StrPos = Center;
- StrPos.Y = StrPos.Y + 5;
- if (UnitValue1 != UnitValue.None)
- {
- String StringToDraw = "";
- switch (UnitValue1)
- {
- case UnitValue.Hertz:
- StringToDraw = $"{Value1.ToString()} Hz";
- break;
- case UnitValue.Percent:
- StringToDraw = $"{Value1.ToString()} %";
- break;
- case UnitValue.Volts:
- StringToDraw = $"{Value1.ToString()} V";
- break;
- case UnitValue.Watts:
- StringToDraw = $"{Value1.ToString()} W";
- break;
- }
- Size StringSize = TextRenderer.MeasureText(StringToDraw, PenFontV1);
- StrPos.Y = StrPos.Y + LineHeight;
- e.Graphics.DrawString(StringToDraw, PenFontV1, StringPen, new PointF((StrPos.X - (StringSize.Width / 2) + 5 ), StrPos.Y));
- }
- if (UnitValue2 != UnitValue.None)
- {
- String StringToDraw = "";
- switch (UnitValue2)
- {
- case UnitValue.Hertz:
- StringToDraw = $"{Value2.ToString()} Hz";
- break;
- case UnitValue.Percent:
- StringToDraw = $"{Value2.ToString()} %";
- break;
- case UnitValue.Volts:
- StringToDraw = $"{Value2.ToString()} V";
- break;
- case UnitValue.Watts:
- StringToDraw = $"{Value2.ToString()} W";
- break;
- }
- Size StringSize = TextRenderer.MeasureText(StringToDraw, PenFontV2);
- StrPos.Y = StrPos.Y + LineHeight;
- e.Graphics.DrawString(StringToDraw, PenFontV2, StringPen, new PointF((StrPos.X - (StringSize.Width / 2) + 7), StrPos.Y));
- }
-
- #endregion
- }
-
- private Color GetColor(AGaugeNeedleColor clr)
- {
- switch (clr)
- {
- case AGaugeNeedleColor.Gray:
- return Color.DarkGray;
- case AGaugeNeedleColor.Red:
- return Color.Red;
- case AGaugeNeedleColor.Green:
- return Color.Green;
- case AGaugeNeedleColor.Blue:
- return Color.Blue;
- case AGaugeNeedleColor.Yellow:
- return Color.Yellow;
- case AGaugeNeedleColor.Violet:
- return Color.Violet;
- case AGaugeNeedleColor.Magenta:
- return Color.Magenta;
- default:
- Debug.Fail("Missing enumeration");
- return Color.DarkGray;
- }
- }
-
- protected override void OnResize(EventArgs e)
- {
- drawGaugeBackground = true;
- Refresh();
- }
- #endregion
- }
-
- #region[ Gauge Range ]
- public class AGaugeRangeCollection : CollectionBase
- {
- private AGauge Owner;
- public AGaugeRangeCollection(AGauge sender) { Owner = sender; }
-
- public AGaugeRange this[int index] { get { return (AGaugeRange)List[index]; } }
- public bool Contains(AGaugeRange itemType) { return List.Contains(itemType); }
- public int Add(AGaugeRange itemType)
- {
- itemType.SetOwner(Owner);
- if (string.IsNullOrEmpty(itemType.Name)) itemType.Name = GetUniqueName();
- var ret = List.Add(itemType);
- if (Owner != null) Owner.RepaintControl();
- return ret;
- }
- public void Remove(AGaugeRange itemType)
- {
- List.Remove(itemType);
- if (Owner != null) Owner.RepaintControl();
- }
- public void Insert(int index, AGaugeRange itemType)
- {
- itemType.SetOwner(Owner);
- if (string.IsNullOrEmpty(itemType.Name)) itemType.Name = GetUniqueName();
- List.Insert(index, itemType);
- if (Owner != null) Owner.RepaintControl();
- }
- public int IndexOf(AGaugeRange itemType) { return List.IndexOf(itemType); }
- public AGaugeRange FindByName(string name)
- {
- foreach (AGaugeRange ptrRange in List)
- {
- if (ptrRange.Name == name) return ptrRange;
- }
- return null;
- }
-
- protected override void OnInsert(int index, object value)
- {
- if (string.IsNullOrEmpty(((AGaugeRange)value).Name)) ((AGaugeRange)value).Name = GetUniqueName();
- base.OnInsert(index, value);
- ((AGaugeRange)value).SetOwner(Owner);
- }
- protected override void OnRemove(int index, object value)
- {
- if (Owner != null) Owner.RepaintControl();
- }
- protected override void OnClear()
- {
- if (Owner != null) Owner.RepaintControl();
- }
-
- private string GetUniqueName()
- {
- const string Prefix = "GaugeRange";
- int index = 1;
- bool valid;
- while (this.Count != 0)
- {
- valid = true;
- for (int x = 0; x < this.Count; x++)
- {
- if (this[x].Name == (Prefix + index.ToString()))
- {
- valid = false;
- break;
- }
- }
- if (valid) break;
- index++;
- };
- return Prefix + index.ToString();
- }
- }
- public class AGaugeRange
- {
- public AGaugeRange() { }
-
- public AGaugeRange(Color color, Single startValue, Single endValue)
- {
- Color = color;
- _StartValue = startValue;
- _EndValue = endValue;
- }
-
- public AGaugeRange(Color color, Single startValue, Single endValue, Int32 innerRadius, Int32 outerRadius)
- {
- Color = color;
- _StartValue = startValue;
- _EndValue = endValue;
- InnerRadius = innerRadius;
- OuterRadius = outerRadius;
- }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Design"),
- System.ComponentModel.DisplayName("(Name)"),
- System.ComponentModel.Description("Instance Name.")]
- public string Name { get; set; }
-
- [System.ComponentModel.Browsable(false)]
- public Boolean InRange { get; set; }
-
- private AGauge Owner;
- [System.ComponentModel.Browsable(false)]
- public void SetOwner(AGauge value) { Owner = value; }
- private void NotifyOwner() { if (Owner != null) Owner.RepaintControl(); }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Appearance"),
- System.ComponentModel.Description("The color of the range.")]
- public Color Color { get { return _Color; } set { _Color = value; NotifyOwner(); } }
- private Color _Color;
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Limits"),
- System.ComponentModel.Description("The start value of the range, must be less than RangeEndValue.")]
- public Single StartValue
- {
- get { return _StartValue; }
- set
- {
- if (Owner != null)
- {
- if (value < Owner.MinValue) value = Owner.MinValue;
- if (value > Owner.MaxValue) value = Owner.MaxValue;
- }
- _StartValue = value; NotifyOwner();
- }
- }
- private Single _StartValue;
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Limits"),
- System.ComponentModel.Description("The end value of the range. Must be greater than RangeStartValue.")]
- public Single EndValue
- {
- get { return _EndValue; }
- set
- {
- if (Owner != null)
- {
- if (value < Owner.MinValue) value = Owner.MinValue;
- if (value > Owner.MaxValue) value = Owner.MaxValue;
- }
- _EndValue = value; NotifyOwner();
- }
- }
- private Single _EndValue;
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Appearance"),
- System.ComponentModel.Description("The inner radius of the range.")]
- public Int32 InnerRadius
- {
- get { return _InnerRadius; }
- set { if (value > 0) { _InnerRadius = value; NotifyOwner(); } }
- }
- private Int32 _InnerRadius = 70;
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Appearance"),
- System.ComponentModel.Description("The outer radius of the range.")]
- public Int32 OuterRadius
- {
- get { return _OuterRadius; }
- set { if (value > 0) { _OuterRadius = value; NotifyOwner(); } }
- }
- private Int32 _OuterRadius = 80;
- }
- #endregion
-
- #region [ Gauge Label ]
- public class AGaugeLabelCollection : CollectionBase
- {
- private AGauge Owner;
- public AGaugeLabelCollection(AGauge sender) { Owner = sender; }
-
- public AGaugeLabel this[int index] { get { return (AGaugeLabel)List[index]; } }
- public bool Contains(AGaugeLabel itemType) { return List.Contains(itemType); }
- public int Add(AGaugeLabel itemType)
- {
- itemType.SetOwner(Owner);
- if (string.IsNullOrEmpty(itemType.Name)) itemType.Name = GetUniqueName();
- var ret = List.Add(itemType);
- if (Owner != null) Owner.RepaintControl();
- return ret;
- }
- public void Remove(AGaugeLabel itemType)
- {
- List.Remove(itemType);
- if (Owner != null) Owner.RepaintControl();
- }
- public void Insert(int index, AGaugeLabel itemType)
- {
- itemType.SetOwner(Owner);
- if (string.IsNullOrEmpty(itemType.Name)) itemType.Name = GetUniqueName();
- List.Insert(index, itemType);
- if (Owner != null) Owner.RepaintControl();
- }
- public int IndexOf(AGaugeLabel itemType) { return List.IndexOf(itemType); }
- public AGaugeLabel FindByName(string name)
- {
- foreach (AGaugeLabel ptrRange in List)
- {
- if (ptrRange.Name == name) return ptrRange;
- }
- return null;
- }
-
- protected override void OnInsert(int index, object value)
- {
- if (string.IsNullOrEmpty(((AGaugeLabel)value).Name)) ((AGaugeLabel)value).Name = GetUniqueName();
- base.OnInsert(index, value);
- ((AGaugeLabel)value).SetOwner(Owner);
- }
- protected override void OnRemove(int index, object value)
- {
- if (Owner != null) Owner.RepaintControl();
- }
- protected override void OnClear()
- {
- if (Owner != null) Owner.RepaintControl();
- }
-
- private string GetUniqueName()
- {
- const string Prefix = "GaugeLabel";
- int index = 1;
- while (this.Count != 0)
- {
- for (int x = 0; x < this.Count; x++)
- {
- if (this[x].Name == (Prefix + index.ToString()))
- continue;
- else
- return Prefix + index.ToString();
- }
- index++;
- };
- return Prefix + index.ToString();
- }
- }
-
- public class AGaugeLabel
- {
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Design"),
- System.ComponentModel.DisplayName("(Name)"),
- System.ComponentModel.Description("Instance Name.")]
- public string Name { get; set; }
-
- private AGauge Owner;
- [System.ComponentModel.Browsable(false)]
- public void SetOwner(AGauge value) { Owner = value; }
- private void NotifyOwner() { if (Owner != null) Owner.RepaintControl(); }
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Appearance"),
- System.ComponentModel.Description("The color of the caption text.")]
- public Color Color { get { return _Color; } set { _Color = value; NotifyOwner(); } }
- private Color _Color = Color.FromKnownColor(KnownColor.WindowText);
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Appearance"),
- System.ComponentModel.Description("The text of the caption.")]
- public String Text { get { return _Text; } set { _Text = value; NotifyOwner(); } }
- private String _Text;
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Appearance"),
- System.ComponentModel.Description("The position of the caption.")]
- public Point Position { get { return _Position; } set { _Position = value; NotifyOwner(); } }
- private Point _Position;
-
- [System.ComponentModel.Browsable(true),
- System.ComponentModel.Category("Appearance"),
- System.ComponentModel.Description("Font of Text.")]
- public Font Font { get { return _Font; } set { _Font = value; NotifyOwner(); } }
- private Font _Font = DefaultFont;
-
- public void ResetFont() { _Font = DefaultFont; }
- private Boolean ShouldSerializeFont() { return (_Font != DefaultFont); }
- private static Font DefaultFont = System.Windows.Forms.Control.DefaultFont;
- }
- #endregion
-
- #region [ Gauge Enum ]
-
- ///
- /// First needle color
- ///
- public enum AGaugeNeedleColor
- {
- Gray = 0,
- Red = 1,
- Green = 2,
- Blue = 3,
- Yellow = 4,
- Violet = 5,
- Magenta = 6
- };
-
- public enum NeedleType
- {
- Advance,
- Simple
- }
-
- #endregion
-
- #region [ EventArgs ]
- ///
- /// Event argument for event.
- ///
- public class ValueInRangeChangedEventArgs : EventArgs
- {
- ///
- /// Affected GaugeRange
- ///
- public AGaugeRange Range { get; private set; }
- ///
- /// Gauge Value
- ///
- public Single Value { get; private set; }
- ///
- /// True if value is within current range.
- ///
- public bool InRange { get; private set; }
- public ValueInRangeChangedEventArgs(AGaugeRange range, Single value, bool inRange)
- {
- this.Range = range;
- this.Value = value;
- this.InRange = inRange;
- }
- }
- #endregion
-
- [System.Runtime.CompilerServices.CompilerGenerated]
- class NamespaceDoc { } //Namespace Documentation
-}
\ No newline at end of file
diff --git a/WinNUT_V2/AGauge_mod/AGauge.csproj b/WinNUT_V2/AGauge_mod/AGauge.csproj
deleted file mode 100644
index e44ed1b..0000000
--- a/WinNUT_V2/AGauge_mod/AGauge.csproj
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}
- Library
- Properties
- System.Windows.Forms
- AGauge
- v4.8
- 512
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
- false
-
-
- none
- true
- bin\Release\
-
-
- prompt
- 4
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Component
-
-
- AGauge.cs
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/WinNUT_V2/AGauge_mod/AGauge.csproj.user b/WinNUT_V2/AGauge_mod/AGauge.csproj.user
deleted file mode 100644
index c10e84b..0000000
--- a/WinNUT_V2/AGauge_mod/AGauge.csproj.user
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
- ProjectFiles
-
-
\ No newline at end of file
diff --git a/WinNUT_V2/AGauge_mod/AGauge.sln b/WinNUT_V2/AGauge_mod/AGauge.sln
deleted file mode 100644
index c6b9885..0000000
--- a/WinNUT_V2/AGauge_mod/AGauge.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30204.135
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGauge", "AGauge.csproj", "{CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {1586E473-36E5-4EDA-8ADA-4217772EEF1F}
- EndGlobalSection
-EndGlobal
diff --git a/WinNUT_V2/AGauge_mod/Properties/AssemblyInfo.cs b/WinNUT_V2/AGauge_mod/Properties/AssemblyInfo.cs
deleted file mode 100644
index 35fe8e4..0000000
--- a/WinNUT_V2/AGauge_mod/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("AGauge")]
-[assembly: AssemblyDescription("AGauge Component by A.J.Bauer - Modified for WinNUT")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCulture("")]
-[assembly: AssemblyCompany("Gawindx")]
-[assembly: AssemblyProduct("WinNUT-Client")]
-[assembly: AssemblyCopyright("Copyright Gawinx (Decaux Nicolas) © 2019-2021")]
-[assembly: AssemblyTrademark("https://github.com/gawindx/WinNUT-Client")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
- [assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("cddfb4ae-46c7-4151-98dd-cbd9e7c1d04d")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.1.*")]
diff --git a/WinNUT_V2/Setup/Setup.vdproj b/WinNUT_V2/Setup/Setup.vdproj
index b620209..1b087f4 100644
--- a/WinNUT_V2/Setup/Setup.vdproj
+++ b/WinNUT_V2/Setup/Setup.vdproj
@@ -51,12 +51,6 @@
}
"Entry"
{
- "MsmKey" = "8:_0418C0A68EC444EE896C1D543C8AFD63"
- "OwnerKey" = "8:_D20AE0448FA041DB8F5DD65C05E507C1"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
"MsmKey" = "8:_04BC2107644AB3257DDD15248220E634"
"OwnerKey" = "8:_CAA83D70E80C09C89E42A34FA8F23665"
"MsmSig" = "8:_UNDEFINED"
@@ -123,6 +117,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_125AAFC5ACA769ECF8F8850600756DC0"
+ "OwnerKey" = "8:_D20AE0448FA041DB8F5DD65C05E507C1"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_13A50E0B7226F53EDD2CF77F7D306D9D"
"OwnerKey" = "8:_D20AE0448FA041DB8F5DD65C05E507C1"
"MsmSig" = "8:_UNDEFINED"
@@ -471,12 +471,6 @@
}
"Entry"
{
- "MsmKey" = "8:_4F81608AEF82517B403CCE166E5C9E7B"
- "OwnerKey" = "8:_D20AE0448FA041DB8F5DD65C05E507C1"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
"MsmKey" = "8:_4FBF49FC0C81EBB2568861BC1E029FD1"
"OwnerKey" = "8:_D20AE0448FA041DB8F5DD65C05E507C1"
"MsmSig" = "8:_UNDEFINED"
@@ -2169,12 +2163,6 @@
}
"Entry"
{
- "MsmKey" = "8:_7FE7C9EF6031437790AEEA6C19A00C84"
- "OwnerKey" = "8:_UNDEFINED"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
"MsmKey" = "8:_80A388CC5A35D01CD59DA199DC9DC4A0"
"OwnerKey" = "8:_D20AE0448FA041DB8F5DD65C05E507C1"
"MsmSig" = "8:_UNDEFINED"
@@ -3093,6 +3081,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_CB7240238DDFA669FCF3046E48D0A447"
+ "OwnerKey" = "8:_D20AE0448FA041DB8F5DD65C05E507C1"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_CEF0BD4A629B7E0FEAB50EBA269DE5AE"
"OwnerKey" = "8:_CAA83D70E80C09C89E42A34FA8F23665"
"MsmSig" = "8:_UNDEFINED"
@@ -4930,13 +4924,7 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
- "OwnerKey" = "8:_4F81608AEF82517B403CCE166E5C9E7B"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
- "MsmKey" = "8:_UNDEFINED"
- "OwnerKey" = "8:_0418C0A68EC444EE896C1D543C8AFD63"
+ "OwnerKey" = "8:_CB7240238DDFA669FCF3046E48D0A447"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@@ -5488,6 +5476,12 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
+ "OwnerKey" = "8:_125AAFC5ACA769ECF8F8850600756DC0"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_D6E439F8F358953CF705B4AFF62D3C03"
"MsmSig" = "8:_UNDEFINED"
}
@@ -6136,12 +6130,6 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
- "OwnerKey" = "8:_7FE7C9EF6031437790AEEA6C19A00C84"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
- "MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_36B595BD31DB4EADBA77A31877C02F2F"
"MsmSig" = "8:_UNDEFINED"
}
@@ -6401,37 +6389,6 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
- "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_0418C0A68EC444EE896C1D543C8AFD63"
- {
- "AssemblyRegister" = "3:1"
- "AssemblyIsInGAC" = "11:FALSE"
- "AssemblyAsmDisplayName" = "8:AGauge, Version=2.1.8880.30391, Culture=neutral, processorArchitecture=MSIL"
- "ScatterAssemblies"
- {
- "_0418C0A68EC444EE896C1D543C8AFD63"
- {
- "Name" = "8:AGauge.dll"
- "Attributes" = "3:512"
- }
- }
- "SourcePath" = "8:AGauge.dll"
- "TargetName" = "8:"
- "Tag" = "8:"
- "Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
- "Condition" = "8:"
- "Transitive" = "11:FALSE"
- "Vital" = "11:TRUE"
- "ReadOnly" = "11:FALSE"
- "Hidden" = "11:FALSE"
- "System" = "11:FALSE"
- "Permanent" = "11:FALSE"
- "SharedLegacy" = "11:FALSE"
- "PackageAs" = "3:1"
- "Register" = "3:1"
- "Exclude" = "11:TRUE"
- "IsDependency" = "11:TRUE"
- "IsolateTo" = "8:"
- }
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_04BC2107644AB3257DDD15248220E634"
{
"AssemblyRegister" = "3:1"
@@ -6711,6 +6668,37 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
+ "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_125AAFC5ACA769ECF8F8850600756DC0"
+ {
+ "AssemblyRegister" = "3:1"
+ "AssemblyIsInGAC" = "11:FALSE"
+ "AssemblyAsmDisplayName" = "8:AGauge, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL"
+ "ScatterAssemblies"
+ {
+ "_125AAFC5ACA769ECF8F8850600756DC0"
+ {
+ "Name" = "8:AGauge.dll"
+ "Attributes" = "3:512"
+ }
+ }
+ "SourcePath" = "8:AGauge.dll"
+ "TargetName" = "8:"
+ "Tag" = "8:"
+ "Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:TRUE"
+ "IsolateTo" = "8:"
+ }
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_13A50E0B7226F53EDD2CF77F7D306D9D"
{
"AssemblyRegister" = "3:1"
@@ -8208,37 +8196,6 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
- "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4F81608AEF82517B403CCE166E5C9E7B"
- {
- "AssemblyRegister" = "3:1"
- "AssemblyIsInGAC" = "11:FALSE"
- "AssemblyAsmDisplayName" = "8:WinNUT-Client_Common, Version=2.3.8892.19684, Culture=neutral, processorArchitecture=MSIL"
- "ScatterAssemblies"
- {
- "_4F81608AEF82517B403CCE166E5C9E7B"
- {
- "Name" = "8:WinNUT-Client_Common.dll"
- "Attributes" = "3:512"
- }
- }
- "SourcePath" = "8:WinNUT-Client_Common.dll"
- "TargetName" = "8:"
- "Tag" = "8:"
- "Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
- "Condition" = "8:"
- "Transitive" = "11:FALSE"
- "Vital" = "11:TRUE"
- "ReadOnly" = "11:FALSE"
- "Hidden" = "11:FALSE"
- "System" = "11:FALSE"
- "Permanent" = "11:FALSE"
- "SharedLegacy" = "11:FALSE"
- "PackageAs" = "3:1"
- "Register" = "3:1"
- "Exclude" = "11:TRUE"
- "IsDependency" = "11:TRUE"
- "IsolateTo" = "8:"
- }
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4FBF49FC0C81EBB2568861BC1E029FD1"
{
"AssemblyRegister" = "3:1"
@@ -11461,6 +11418,37 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
+ "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CB7240238DDFA669FCF3046E48D0A447"
+ {
+ "AssemblyRegister" = "3:1"
+ "AssemblyIsInGAC" = "11:FALSE"
+ "AssemblyAsmDisplayName" = "8:WinNUT-Client_Common, Version=2.3.8892.28503, Culture=neutral, processorArchitecture=MSIL"
+ "ScatterAssemblies"
+ {
+ "_CB7240238DDFA669FCF3046E48D0A447"
+ {
+ "Name" = "8:WinNUT-Client_Common.dll"
+ "Attributes" = "3:512"
+ }
+ }
+ "SourcePath" = "8:WinNUT-Client_Common.dll"
+ "TargetName" = "8:"
+ "Tag" = "8:"
+ "Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
+ "Condition" = "8:"
+ "Transitive" = "11:FALSE"
+ "Vital" = "11:TRUE"
+ "ReadOnly" = "11:FALSE"
+ "Hidden" = "11:FALSE"
+ "System" = "11:FALSE"
+ "Permanent" = "11:FALSE"
+ "SharedLegacy" = "11:FALSE"
+ "PackageAs" = "3:1"
+ "Register" = "3:1"
+ "Exclude" = "11:TRUE"
+ "IsDependency" = "11:TRUE"
+ "IsolateTo" = "8:"
+ }
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CEF0BD4A629B7E0FEAB50EBA269DE5AE"
{
"AssemblyRegister" = "3:1"
@@ -13458,34 +13446,6 @@
{
}
}
- "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_7FE7C9EF6031437790AEEA6C19A00C84"
- {
- "SourcePath" = "8:..\\AGauge_mod\\obj\\Release\\AGauge.dll"
- "TargetName" = "8:"
- "Tag" = "8:"
- "Folder" = "8:_7A1917372AF14D75845D775AAEB7CD48"
- "Condition" = "8:"
- "Transitive" = "11:FALSE"
- "Vital" = "11:TRUE"
- "ReadOnly" = "11:FALSE"
- "Hidden" = "11:FALSE"
- "System" = "11:FALSE"
- "Permanent" = "11:FALSE"
- "SharedLegacy" = "11:FALSE"
- "PackageAs" = "3:1"
- "Register" = "3:1"
- "Exclude" = "11:FALSE"
- "IsDependency" = "11:FALSE"
- "IsolateTo" = "8:"
- "ProjectOutputGroupRegister" = "3:1"
- "OutputConfiguration" = "8:"
- "OutputGroupCanonicalName" = "8:Built"
- "OutputProjectGuid" = "8:{CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}"
- "ShowKeyOutput" = "11:TRUE"
- "ExcludeFilters"
- {
- }
- }
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D20AE0448FA041DB8F5DD65C05E507C1"
{
"SourcePath" = "8:..\\WinNUT-Client\\obj\\PreRelease\\WinNUT-Client.exe"
diff --git a/WinNUT_V2/WinNUT-Client/CProgressBar.vb b/WinNUT_V2/WinNUT-Client/Controls/CProgressBar.vb
similarity index 100%
rename from WinNUT_V2/WinNUT-Client/CProgressBar.vb
rename to WinNUT_V2/WinNUT-Client/Controls/CProgressBar.vb
diff --git a/WinNUT_V2/WinNUT-Client/Controls/UPSVarGauge.Designer.vb b/WinNUT_V2/WinNUT-Client/Controls/UPSVarGauge.Designer.vb
new file mode 100644
index 0000000..50c2b7f
--- /dev/null
+++ b/WinNUT_V2/WinNUT-Client/Controls/UPSVarGauge.Designer.vb
@@ -0,0 +1,41 @@
+' WinNUT-Client is a NUT windows client for monitoring your ups hooked up to your favorite linux server.
+' Copyright (C) 2019-2021 Gawindx (Decaux Nicolas)
+'
+' This program is free software: you can redistribute it and/or modify it under the terms of the
+' GNU General Public License as published by the Free Software Foundation, either version 3 of the
+' License, or any later version.
+'
+' This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY
+
+Namespace Controls
+
+
+ Partial Class UPSVarGauge
+ Inherits AGauge
+
+ 'Control overrides dispose to clean up the component list.
+
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
+
+ 'Required by the Control Designer
+ Private components As System.ComponentModel.IContainer
+
+ ' NOTE: The following procedure is required by the Component Designer
+ ' It can be modified using the Component Designer. Do not modify it
+ ' using the code editor.
+
+ Private Sub InitializeComponent()
+ components = New System.ComponentModel.Container()
+ End Sub
+
+ End Class
+
+End Namespace
diff --git a/WinNUT_V2/WinNUT-Client/Controls/UPSVarGauge.vb b/WinNUT_V2/WinNUT-Client/Controls/UPSVarGauge.vb
new file mode 100644
index 0000000..a4acd7c
--- /dev/null
+++ b/WinNUT_V2/WinNUT-Client/Controls/UPSVarGauge.vb
@@ -0,0 +1,277 @@
+' WinNUT-Client is a NUT windows client for monitoring your ups hooked up to your favorite linux server.
+' Copyright (C) 2019-2021 Gawindx (Decaux Nicolas)
+'
+' This program is free software: you can redistribute it and/or modify it under the terms of the
+' GNU General Public License as published by the Free Software Foundation, either version 3 of the
+' License, or any later version.
+'
+' This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY
+
+Imports System.ComponentModel
+Imports System.Drawing.Drawing2D
+
+Namespace Controls
+
+ Friend Class UPSVarGauge
+ Inherits AGauge
+
+#Region "Private Fields"
+
+ Private ReadOnly m_value1 As Single
+ Private m_value2 As Single
+
+ Private ReadOnly m_MinValue As Single = 0
+ Private ReadOnly m_MaxValue As Single = 100
+
+ Private ReadOnly m_BaseArcRadius = 45
+ Private ReadOnly m_BaseArcStart = 135
+ Private ReadOnly m_BaseArcSweep = 270
+ Private ReadOnly m_BaseArcWidth = 5
+
+ ' Private ReadOnly m_ScaleLinesMinorTicks = 9
+ Private ReadOnly m_ScaleLinesMinorInnerRadius = 42
+ Private ReadOnly m_ScaleLinesMinorOuterRadius = 48
+ Private ReadOnly m_ScaleLinesMinorWidth = 1
+
+ Private ReadOnly m_ScaleLinesInterInnerRadius = 40
+ Private ReadOnly m_ScaleLinesInterOuterRadius = 48
+ Private ReadOnly m_ScaleLinesInterWidth = 1
+
+ ' Private ReadOnly m_ScaleLinesMajorStepValue = 50.0F
+ Private ReadOnly m_ScaleLinesMajorInnerRadius = 40
+ Private ReadOnly m_ScaleLinesMajorOuterRadius = 48
+ Private ReadOnly m_ScaleLinesMajorWidth = 2
+
+ Private ReadOnly m_ScaleNumbersRadius = 60
+ Private ReadOnly m_ScaleNumbersFormat As String
+ Private ReadOnly m_ScaleNumbersStartScaleLine As Integer
+ Private ReadOnly m_ScaleNumbersStepScaleLines = 1
+ Private ReadOnly m_ScaleNumbersRotation As Integer
+
+ Private ReadOnly m_NeedleType As NeedleType
+ Private ReadOnly m_NeedleRadius = 32
+ Private ReadOnly m_NeedleColor1 = AGaugeNeedleColor.Gray
+ Private ReadOnly m_NeedleColor2 = Color.DimGray
+ Private ReadOnly m_NeedleWidth = 2
+
+ Private m_gradientType = GradientTypeEnum.RedGreen
+ Private m_gradientOrientation = GradientOrientationEnum.BottomToTop
+ Private m_unitvalue1 = UnitValueEnum.Volts
+ Private m_unitvalue2 = UnitValueEnum.None
+
+#End Region
+
+#Region "Properties"
+
+ ' Map Value1 onto Value
+
+ Public Property Value1 As Single
+ Get
+ Return Value
+ End Get
+ Set(value As Single)
+ MyBase.Value = value
+ End Set
+ End Property
+
+
+ Public Property Value2 As Single
+ Get
+ Return m_value2
+ End Get
+ Set(value As Single)
+ If m_value2 <> value Then
+ m_value2 = value
+ OnValueChanged(Me, Nothing)
+ Refresh()
+ End If
+ End Set
+ End Property
+
+
+ Public Property GradientType As GradientTypeEnum
+ Get
+ Return m_gradientType
+ End Get
+ Set(value As GradientTypeEnum)
+ m_gradientType = value
+ Refresh()
+ End Set
+ End Property
+
+
+ Public Property GradientOrientation As GradientOrientationEnum
+ Get
+ Return m_gradientOrientation
+ End Get
+ Set(value As GradientOrientationEnum)
+
+ If m_gradientOrientation <> value Then
+ m_gradientOrientation = value
+ Refresh()
+ End If
+ End Set
+ End Property
+
+
+ Public Property UnitValue1 As UnitValueEnum
+ Get
+ Return m_unitvalue1
+ End Get
+ Set(value As UnitValueEnum)
+
+ If m_unitvalue1 <> value Then
+ m_unitvalue1 = value
+ Refresh()
+ End If
+ End Set
+ End Property
+
+
+ Public Property UnitValue2 As UnitValueEnum
+ Get
+ Return m_unitvalue2
+ End Get
+ Set(value As UnitValueEnum)
+
+ If m_unitvalue2 <> value Then
+ m_unitvalue2 = value
+ Refresh()
+ End If
+ End Set
+ End Property
+
+#End Region
+
+ Public Enum GradientTypeEnum
+ None
+ RedGreen
+ End Enum
+
+ Public Enum GradientOrientationEnum
+ TopToBottom
+ BottomToTop
+ RightToLeft
+ LeftToRight
+ End Enum
+
+ Public Enum UnitValueEnum
+ None
+ Hertz
+ Percent
+ Volts
+ Watts
+ End Enum
+
+ Public Sub New()
+ MyBase.New()
+ InitializeComponent()
+
+ Size = New Size(148, 130)
+ End Sub
+
+ Overrides Sub RenderDefaultArc(graphics As Graphics)
+ If m_BaseArcRadius > 0 Then
+ Dim baseArcRadius As Integer = m_BaseArcRadius * centerFactor
+
+ If m_gradientType = GradientTypeEnum.None Then
+ Using pnArc = New Pen(BaseArcColor, m_BaseArcWidth * centerFactor)
+ graphics.DrawArc(pnArc, New Rectangle(Center.X - baseArcRadius,
+ Center.Y - baseArcRadius,
+ 2 * baseArcRadius,
+ 2 * baseArcRadius),
+ m_BaseArcStart, m_BaseArcSweep)
+ End Using
+
+ Else
+ Dim GradientP1Brush = New Point(0, (Center.X + baseArcRadius + m_BaseArcWidth + 2))
+ Dim GradientP2Brush = New Point(0, (Center.X - baseArcRadius - m_BaseArcWidth - 2))
+
+ Select Case m_gradientOrientation
+ Case GradientOrientationEnum.TopToBottom
+ GradientP1Brush = New Point(0, (Center.Y - baseArcRadius - m_BaseArcWidth - 2))
+ GradientP2Brush = New Point(0, (Center.Y + baseArcRadius + m_BaseArcWidth + 2))
+ Case GradientOrientationEnum.BottomToTop
+ GradientP1Brush = New Point(0, (Center.Y + baseArcRadius + m_BaseArcWidth + 2))
+ GradientP2Brush = New Point(0, (Center.Y - baseArcRadius - m_BaseArcWidth - 2))
+ Case GradientOrientationEnum.RightToLeft
+ GradientP1Brush = New Point((Center.X + baseArcRadius + m_BaseArcWidth + 2), 0)
+ GradientP2Brush = New Point((Center.X - baseArcRadius - m_BaseArcWidth - 2), 0)
+ Case GradientOrientationEnum.LeftToRight
+ GradientP1Brush = New Point((Center.X - baseArcRadius - m_BaseArcWidth - 2), 0)
+ GradientP2Brush = New Point((Center.X + baseArcRadius + m_BaseArcWidth + 2), 0)
+ End Select
+
+ Dim myArc1Gradient = New LinearGradientBrush(GradientP1Brush, GradientP2Brush, Color.Red, Color.Green)
+ Using pnArc = New Pen(myArc1Gradient, m_BaseArcWidth * centerFactor)
+ graphics.DrawArc(pnArc, New Rectangle(Center.X - baseArcRadius,
+ Center.Y - baseArcRadius,
+ 2 * baseArcRadius,
+ 2 * baseArcRadius),
+ m_BaseArcStart, m_BaseArcSweep)
+ End Using
+ End If
+ End If
+ End Sub
+
+ '''
+ ''' Override PostRender and render the value of the gauge with unit.
+ '''
+ Overrides Sub PostRender(graphics As Graphics)
+ Dim PenString = New Pen(Color.Black)
+ Dim PenFontV1 = New Font("Microsoft Sans Serif", 8, FontStyle.Bold)
+ Dim PenFontV2 = New Font("Microsoft Sans Serif", 7, FontStyle.Bold)
+ Dim StringPen = New SolidBrush(Color.Black)
+ Dim LineHeight = 15
+ Dim StrPos = Center
+ StrPos.Y += 5
+
+ If UnitValue1 <> UnitValueEnum.None Then
+ Dim StringToDraw = ApplyUnit(Value1, UnitValue1)
+ Dim StringSize = TextRenderer.MeasureText(StringToDraw, PenFontV1)
+ StrPos.Y += LineHeight
+ graphics.DrawString(StringToDraw, PenFontV1, StringPen,
+ New PointF((StrPos.X - (StringSize.Width / 2) + 5), StrPos.Y))
+ End If
+
+ If UnitValue2 <> UnitValueEnum.None Then
+ Dim StringToDraw = ApplyUnit(Value2, UnitValue2)
+ Dim StringSize = TextRenderer.MeasureText(StringToDraw, PenFontV2)
+ StrPos.Y += LineHeight
+ graphics.DrawString(StringToDraw, PenFontV2, StringPen,
+ New PointF((StrPos.X - (StringSize.Width / 2) + 7), StrPos.Y))
+ End If
+ End Sub
+
+ Private Function ApplyUnit(value As String, unit As UnitValueEnum)
+ Dim returnStr = value
+
+ Select Case unit
+ Case UnitValueEnum.Hertz
+ returnStr &= " Hz"
+ Case UnitValueEnum.Percent
+ returnStr &= " %"
+ Case UnitValueEnum.Volts
+ returnStr &= " V"
+ Case UnitValueEnum.Watts
+ returnStr &= " W"
+ End Select
+
+ Return returnStr
+ End Function
+
+ End Class
+
+End Namespace
diff --git a/WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj b/WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj
index bcb1654..153d853 100644
--- a/WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj
+++ b/WinNUT_V2/WinNUT-Client/WinNUT-client.vbproj
@@ -14,7 +14,8 @@
v4.8
false
- publish\
+
+
true
Disk
false
@@ -28,7 +29,7 @@
2.2.0.%2a
false
true
- true
+ false
10.0.18362
@@ -148,15 +149,21 @@
Form
+
+ Component
+
+
+ UPSVarGauge.vb
+
+
+ Component
+
True
True
Resources.resx
-
- Component
-
Update_Gui.vb
@@ -407,11 +414,6 @@
-
- False
- Microsoft .NET Framework 4.5.2 %28x86 and x64%29
- true
-
False
.NET Framework 3.5 SP1
@@ -426,16 +428,15 @@
-
- {cbdb1d25-5a95-43d4-a958-bf6ae65c6c3f}
- AGauge
-
{9074ce60-db9a-4bdf-b851-6eab8a81f366}
WinNUT-Client_Common
+
+ 2.1.0-prerelease.1
+
7.1.3
diff --git a/WinNUT_V2/WinNUT-Client/WinNUT.Designer.vb b/WinNUT_V2/WinNUT-Client/WinNUT.Designer.vb
index 39941bb..9870146 100644
--- a/WinNUT_V2/WinNUT-Client/WinNUT.Designer.vb
+++ b/WinNUT_V2/WinNUT-Client/WinNUT.Designer.vb
@@ -66,25 +66,25 @@ Partial Class WinNUT
Me.Lbl_OB = New System.Windows.Forms.Label()
Me.Lbl_OL = New System.Windows.Forms.Label()
Me.GB_InV_Dial = New System.Windows.Forms.GroupBox()
- Me.AG_InV = New System.Windows.Forms.AGauge()
Me.Lbl_InV_Dial = New System.Windows.Forms.Label()
Me.GB_OutV_Dial = New System.Windows.Forms.GroupBox()
- Me.AG_OutV = New System.Windows.Forms.AGauge()
Me.Lbl_OutV_Dial = New System.Windows.Forms.Label()
Me.GB_BattCh_Dial = New System.Windows.Forms.GroupBox()
Me.PBox_Battery_State = New System.Windows.Forms.PictureBox()
Me.Lbl_BattCh_Dial = New System.Windows.Forms.Label()
- Me.AG_BattCh = New System.Windows.Forms.AGauge()
Me.GB_Load_Dial = New System.Windows.Forms.GroupBox()
- Me.AG_Load = New System.Windows.Forms.AGauge()
Me.Lbl_Load_Dial = New System.Windows.Forms.Label()
Me.GB_BattV_Dial = New System.Windows.Forms.GroupBox()
- Me.AG_BattV = New System.Windows.Forms.AGauge()
Me.Lbl_BattV_Dial = New System.Windows.Forms.Label()
Me.GB_InF_Dial = New System.Windows.Forms.GroupBox()
- Me.AG_InF = New System.Windows.Forms.AGauge()
Me.Lbl_InF_Dial = New System.Windows.Forms.Label()
Me.CB_CurrentLog = New System.Windows.Forms.ComboBox()
+ Me.AG_InF = New WinNUT_Client.Controls.UPSVarGauge()
+ Me.AG_InV = New WinNUT_Client.Controls.UPSVarGauge()
+ Me.AG_BattV = New WinNUT_Client.Controls.UPSVarGauge()
+ Me.AG_Load = New WinNUT_Client.Controls.UPSVarGauge()
+ Me.AG_OutV = New WinNUT_Client.Controls.UPSVarGauge()
+ Me.AG_BattCh = New WinNUT_Client.Controls.UPSVarGauge()
Me.ContextMenu_Systray.SuspendLayout()
Me.Main_Menu.SuspendLayout()
Me.GB_Status.SuspendLayout()
@@ -363,6 +363,132 @@ Partial Class WinNUT
Me.GB_InV_Dial.Name = "GB_InV_Dial"
Me.GB_InV_Dial.TabStop = False
'
+ 'Lbl_InV_Dial
+ '
+ resources.ApplyResources(Me.Lbl_InV_Dial, "Lbl_InV_Dial")
+ Me.Lbl_InV_Dial.Name = "Lbl_InV_Dial"
+ '
+ 'GB_OutV_Dial
+ '
+ resources.ApplyResources(Me.GB_OutV_Dial, "GB_OutV_Dial")
+ Me.GB_OutV_Dial.Controls.Add(Me.AG_OutV)
+ Me.GB_OutV_Dial.Controls.Add(Me.Lbl_OutV_Dial)
+ Me.GB_OutV_Dial.Name = "GB_OutV_Dial"
+ Me.GB_OutV_Dial.TabStop = False
+ '
+ 'Lbl_OutV_Dial
+ '
+ resources.ApplyResources(Me.Lbl_OutV_Dial, "Lbl_OutV_Dial")
+ Me.Lbl_OutV_Dial.Name = "Lbl_OutV_Dial"
+ '
+ 'GB_BattCh_Dial
+ '
+ resources.ApplyResources(Me.GB_BattCh_Dial, "GB_BattCh_Dial")
+ Me.GB_BattCh_Dial.Controls.Add(Me.PBox_Battery_State)
+ Me.GB_BattCh_Dial.Controls.Add(Me.Lbl_BattCh_Dial)
+ Me.GB_BattCh_Dial.Controls.Add(Me.AG_BattCh)
+ Me.GB_BattCh_Dial.Name = "GB_BattCh_Dial"
+ Me.GB_BattCh_Dial.TabStop = False
+ '
+ 'PBox_Battery_State
+ '
+ resources.ApplyResources(Me.PBox_Battery_State, "PBox_Battery_State")
+ Me.PBox_Battery_State.Name = "PBox_Battery_State"
+ Me.PBox_Battery_State.TabStop = False
+ '
+ 'Lbl_BattCh_Dial
+ '
+ resources.ApplyResources(Me.Lbl_BattCh_Dial, "Lbl_BattCh_Dial")
+ Me.Lbl_BattCh_Dial.Name = "Lbl_BattCh_Dial"
+ '
+ 'GB_Load_Dial
+ '
+ resources.ApplyResources(Me.GB_Load_Dial, "GB_Load_Dial")
+ Me.GB_Load_Dial.Controls.Add(Me.AG_Load)
+ Me.GB_Load_Dial.Controls.Add(Me.Lbl_Load_Dial)
+ Me.GB_Load_Dial.Name = "GB_Load_Dial"
+ Me.GB_Load_Dial.TabStop = False
+ '
+ 'Lbl_Load_Dial
+ '
+ resources.ApplyResources(Me.Lbl_Load_Dial, "Lbl_Load_Dial")
+ Me.Lbl_Load_Dial.Name = "Lbl_Load_Dial"
+ '
+ 'GB_BattV_Dial
+ '
+ resources.ApplyResources(Me.GB_BattV_Dial, "GB_BattV_Dial")
+ Me.GB_BattV_Dial.Controls.Add(Me.AG_BattV)
+ Me.GB_BattV_Dial.Controls.Add(Me.Lbl_BattV_Dial)
+ Me.GB_BattV_Dial.Name = "GB_BattV_Dial"
+ Me.GB_BattV_Dial.TabStop = False
+ '
+ 'Lbl_BattV_Dial
+ '
+ resources.ApplyResources(Me.Lbl_BattV_Dial, "Lbl_BattV_Dial")
+ Me.Lbl_BattV_Dial.Name = "Lbl_BattV_Dial"
+ '
+ 'GB_InF_Dial
+ '
+ resources.ApplyResources(Me.GB_InF_Dial, "GB_InF_Dial")
+ Me.GB_InF_Dial.Controls.Add(Me.AG_InF)
+ Me.GB_InF_Dial.Controls.Add(Me.Lbl_InF_Dial)
+ Me.GB_InF_Dial.Name = "GB_InF_Dial"
+ Me.GB_InF_Dial.TabStop = False
+ '
+ 'Lbl_InF_Dial
+ '
+ resources.ApplyResources(Me.Lbl_InF_Dial, "Lbl_InF_Dial")
+ Me.Lbl_InF_Dial.Name = "Lbl_InF_Dial"
+ '
+ 'CB_CurrentLog
+ '
+ Me.CB_CurrentLog.FormattingEnabled = True
+ resources.ApplyResources(Me.CB_CurrentLog, "CB_CurrentLog")
+ Me.CB_CurrentLog.Name = "CB_CurrentLog"
+ '
+ 'AG_InF
+ '
+ Me.AG_InF.BaseArcColor = System.Drawing.Color.Gray
+ Me.AG_InF.BaseArcRadius = 45
+ Me.AG_InF.BaseArcStart = 135
+ Me.AG_InF.BaseArcSweep = 270
+ Me.AG_InF.BaseArcWidth = 5
+ Me.AG_InF.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen
+ Me.AG_InF.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.BottomToTop
+ resources.ApplyResources(Me.AG_InF, "AG_InF")
+ Me.AG_InF.MaxValue = 100.0!
+ Me.AG_InF.MinValue = 0!
+ Me.AG_InF.Name = "AG_InF"
+ Me.AG_InF.NeedleColor1 = AGaugeNeedleColor.Gray
+ Me.AG_InF.NeedleColor2 = System.Drawing.Color.DimGray
+ Me.AG_InF.NeedleRadius = 32
+ Me.AG_InF.NeedleType = System.Windows.Forms.NeedleType.Advance
+ Me.AG_InF.NeedleWidth = 2
+ Me.AG_InF.ScaleLinesInterColor = System.Drawing.Color.Black
+ Me.AG_InF.ScaleLinesInterInnerRadius = 40
+ Me.AG_InF.ScaleLinesInterOuterRadius = 48
+ Me.AG_InF.ScaleLinesInterWidth = 1
+ Me.AG_InF.ScaleLinesMajorColor = System.Drawing.Color.Black
+ Me.AG_InF.ScaleLinesMajorInnerRadius = 40
+ Me.AG_InF.ScaleLinesMajorOuterRadius = 48
+ Me.AG_InF.ScaleLinesMajorStepValue = 50.0!
+ Me.AG_InF.ScaleLinesMajorWidth = 2
+ Me.AG_InF.ScaleLinesMinorColor = System.Drawing.Color.Gray
+ Me.AG_InF.ScaleLinesMinorInnerRadius = 42
+ Me.AG_InF.ScaleLinesMinorOuterRadius = 48
+ Me.AG_InF.ScaleLinesMinorTicks = 9
+ Me.AG_InF.ScaleLinesMinorWidth = 1
+ Me.AG_InF.ScaleNumbersColor = System.Drawing.Color.Black
+ Me.AG_InF.ScaleNumbersFormat = Nothing
+ Me.AG_InF.ScaleNumbersRadius = 60
+ Me.AG_InF.ScaleNumbersRotation = 0
+ Me.AG_InF.ScaleNumbersStartScaleLine = 0
+ Me.AG_InF.ScaleNumbersStepScaleLines = 1
+ Me.AG_InF.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Hertz
+ Me.AG_InF.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None
+ Me.AG_InF.Value1 = 0!
+ Me.AG_InF.Value2 = 0!
+ '
'AG_InV
'
Me.AG_InV.BaseArcColor = System.Drawing.Color.Gray
@@ -370,15 +496,13 @@ Partial Class WinNUT
Me.AG_InV.BaseArcStart = 135
Me.AG_InV.BaseArcSweep = 270
Me.AG_InV.BaseArcWidth = 5
- Me.AG_InV.Center = New System.Drawing.Point(74, 70)
- Me.AG_InV.GaugeAutoSize = False
- Me.AG_InV.GradientColor = System.Windows.Forms.AGauge.GradientType.RedGreen
- Me.AG_InV.GradientColorOrientation = System.Windows.Forms.AGauge.GradientOrientation.BottomToUp
+ Me.AG_InV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen
+ Me.AG_InV.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.BottomToTop
resources.ApplyResources(Me.AG_InV, "AG_InV")
Me.AG_InV.MaxValue = 100.0!
Me.AG_InV.MinValue = 0!
Me.AG_InV.Name = "AG_InV"
- Me.AG_InV.NeedleColor1 = System.Windows.Forms.AGaugeNeedleColor.Gray
+ Me.AG_InV.NeedleColor1 = AGaugeNeedleColor.Gray
Me.AG_InV.NeedleColor2 = System.Drawing.Color.DimGray
Me.AG_InV.NeedleRadius = 32
Me.AG_InV.NeedleType = System.Windows.Forms.NeedleType.Advance
@@ -403,23 +527,96 @@ Partial Class WinNUT
Me.AG_InV.ScaleNumbersRotation = 0
Me.AG_InV.ScaleNumbersStartScaleLine = 0
Me.AG_InV.ScaleNumbersStepScaleLines = 1
- Me.AG_InV.UnitValue1 = System.Windows.Forms.AGauge.UnitValue.Volts
- Me.AG_InV.UnitValue2 = System.Windows.Forms.AGauge.UnitValue.None
+ Me.AG_InV.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Volts
+ Me.AG_InV.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None
Me.AG_InV.Value1 = 0!
Me.AG_InV.Value2 = 0!
'
- 'Lbl_InV_Dial
+ 'AG_BattV
'
- resources.ApplyResources(Me.Lbl_InV_Dial, "Lbl_InV_Dial")
- Me.Lbl_InV_Dial.Name = "Lbl_InV_Dial"
+ Me.AG_BattV.BaseArcColor = System.Drawing.Color.Gray
+ Me.AG_BattV.BaseArcRadius = 45
+ Me.AG_BattV.BaseArcStart = 135
+ Me.AG_BattV.BaseArcSweep = 270
+ Me.AG_BattV.BaseArcWidth = 5
+ Me.AG_BattV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen
+ Me.AG_BattV.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.BottomToTop
+ resources.ApplyResources(Me.AG_BattV, "AG_BattV")
+ Me.AG_BattV.MaxValue = 100.0!
+ Me.AG_BattV.MinValue = 0!
+ Me.AG_BattV.Name = "AG_BattV"
+ Me.AG_BattV.NeedleColor1 = AGaugeNeedleColor.Gray
+ Me.AG_BattV.NeedleColor2 = System.Drawing.Color.DimGray
+ Me.AG_BattV.NeedleRadius = 32
+ Me.AG_BattV.NeedleType = System.Windows.Forms.NeedleType.Advance
+ Me.AG_BattV.NeedleWidth = 2
+ Me.AG_BattV.ScaleLinesInterColor = System.Drawing.Color.Black
+ Me.AG_BattV.ScaleLinesInterInnerRadius = 40
+ Me.AG_BattV.ScaleLinesInterOuterRadius = 48
+ Me.AG_BattV.ScaleLinesInterWidth = 1
+ Me.AG_BattV.ScaleLinesMajorColor = System.Drawing.Color.Black
+ Me.AG_BattV.ScaleLinesMajorInnerRadius = 40
+ Me.AG_BattV.ScaleLinesMajorOuterRadius = 48
+ Me.AG_BattV.ScaleLinesMajorStepValue = 50.0!
+ Me.AG_BattV.ScaleLinesMajorWidth = 2
+ Me.AG_BattV.ScaleLinesMinorColor = System.Drawing.Color.Gray
+ Me.AG_BattV.ScaleLinesMinorInnerRadius = 42
+ Me.AG_BattV.ScaleLinesMinorOuterRadius = 48
+ Me.AG_BattV.ScaleLinesMinorTicks = 9
+ Me.AG_BattV.ScaleLinesMinorWidth = 1
+ Me.AG_BattV.ScaleNumbersColor = System.Drawing.Color.Black
+ Me.AG_BattV.ScaleNumbersFormat = Nothing
+ Me.AG_BattV.ScaleNumbersRadius = 60
+ Me.AG_BattV.ScaleNumbersRotation = 0
+ Me.AG_BattV.ScaleNumbersStartScaleLine = 0
+ Me.AG_BattV.ScaleNumbersStepScaleLines = 1
+ Me.AG_BattV.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Volts
+ Me.AG_BattV.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None
+ Me.AG_BattV.Value1 = 0!
+ Me.AG_BattV.Value2 = 0!
'
- 'GB_OutV_Dial
+ 'AG_Load
'
- resources.ApplyResources(Me.GB_OutV_Dial, "GB_OutV_Dial")
- Me.GB_OutV_Dial.Controls.Add(Me.AG_OutV)
- Me.GB_OutV_Dial.Controls.Add(Me.Lbl_OutV_Dial)
- Me.GB_OutV_Dial.Name = "GB_OutV_Dial"
- Me.GB_OutV_Dial.TabStop = False
+ Me.AG_Load.BaseArcColor = System.Drawing.Color.Gray
+ Me.AG_Load.BaseArcRadius = 45
+ Me.AG_Load.BaseArcStart = 135
+ Me.AG_Load.BaseArcSweep = 270
+ Me.AG_Load.BaseArcWidth = 5
+ Me.AG_Load.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen
+ Me.AG_Load.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.RightToLeft
+ resources.ApplyResources(Me.AG_Load, "AG_Load")
+ Me.AG_Load.MaxValue = 100.0!
+ Me.AG_Load.MinValue = 0!
+ Me.AG_Load.Name = "AG_Load"
+ Me.AG_Load.NeedleColor1 = AGaugeNeedleColor.Gray
+ Me.AG_Load.NeedleColor2 = System.Drawing.Color.DimGray
+ Me.AG_Load.NeedleRadius = 32
+ Me.AG_Load.NeedleType = System.Windows.Forms.NeedleType.Advance
+ Me.AG_Load.NeedleWidth = 2
+ Me.AG_Load.ScaleLinesInterColor = System.Drawing.Color.Black
+ Me.AG_Load.ScaleLinesInterInnerRadius = 40
+ Me.AG_Load.ScaleLinesInterOuterRadius = 48
+ Me.AG_Load.ScaleLinesInterWidth = 1
+ Me.AG_Load.ScaleLinesMajorColor = System.Drawing.Color.Black
+ Me.AG_Load.ScaleLinesMajorInnerRadius = 40
+ Me.AG_Load.ScaleLinesMajorOuterRadius = 48
+ Me.AG_Load.ScaleLinesMajorStepValue = 50.0!
+ Me.AG_Load.ScaleLinesMajorWidth = 2
+ Me.AG_Load.ScaleLinesMinorColor = System.Drawing.Color.Gray
+ Me.AG_Load.ScaleLinesMinorInnerRadius = 42
+ Me.AG_Load.ScaleLinesMinorOuterRadius = 48
+ Me.AG_Load.ScaleLinesMinorTicks = 9
+ Me.AG_Load.ScaleLinesMinorWidth = 1
+ Me.AG_Load.ScaleNumbersColor = System.Drawing.Color.Black
+ Me.AG_Load.ScaleNumbersFormat = Nothing
+ Me.AG_Load.ScaleNumbersRadius = 60
+ Me.AG_Load.ScaleNumbersRotation = 0
+ Me.AG_Load.ScaleNumbersStartScaleLine = 0
+ Me.AG_Load.ScaleNumbersStepScaleLines = 1
+ Me.AG_Load.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Percent
+ Me.AG_Load.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Watts
+ Me.AG_Load.Value1 = 0!
+ Me.AG_Load.Value2 = 0!
'
'AG_OutV
'
@@ -428,15 +625,13 @@ Partial Class WinNUT
Me.AG_OutV.BaseArcStart = 135
Me.AG_OutV.BaseArcSweep = 270
Me.AG_OutV.BaseArcWidth = 5
- Me.AG_OutV.Center = New System.Drawing.Point(74, 70)
- Me.AG_OutV.GaugeAutoSize = False
- Me.AG_OutV.GradientColor = System.Windows.Forms.AGauge.GradientType.RedGreen
- Me.AG_OutV.GradientColorOrientation = System.Windows.Forms.AGauge.GradientOrientation.BottomToUp
+ Me.AG_OutV.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen
+ Me.AG_OutV.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.BottomToTop
resources.ApplyResources(Me.AG_OutV, "AG_OutV")
Me.AG_OutV.MaxValue = 100.0!
Me.AG_OutV.MinValue = 0!
Me.AG_OutV.Name = "AG_OutV"
- Me.AG_OutV.NeedleColor1 = System.Windows.Forms.AGaugeNeedleColor.Gray
+ Me.AG_OutV.NeedleColor1 = AGaugeNeedleColor.Gray
Me.AG_OutV.NeedleColor2 = System.Drawing.Color.DimGray
Me.AG_OutV.NeedleRadius = 32
Me.AG_OutV.NeedleType = System.Windows.Forms.NeedleType.Advance
@@ -461,36 +656,11 @@ Partial Class WinNUT
Me.AG_OutV.ScaleNumbersRotation = 0
Me.AG_OutV.ScaleNumbersStartScaleLine = 0
Me.AG_OutV.ScaleNumbersStepScaleLines = 1
- Me.AG_OutV.UnitValue1 = System.Windows.Forms.AGauge.UnitValue.Volts
- Me.AG_OutV.UnitValue2 = System.Windows.Forms.AGauge.UnitValue.None
+ Me.AG_OutV.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Volts
+ Me.AG_OutV.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None
Me.AG_OutV.Value1 = 0!
Me.AG_OutV.Value2 = 0!
'
- 'Lbl_OutV_Dial
- '
- resources.ApplyResources(Me.Lbl_OutV_Dial, "Lbl_OutV_Dial")
- Me.Lbl_OutV_Dial.Name = "Lbl_OutV_Dial"
- '
- 'GB_BattCh_Dial
- '
- resources.ApplyResources(Me.GB_BattCh_Dial, "GB_BattCh_Dial")
- Me.GB_BattCh_Dial.Controls.Add(Me.PBox_Battery_State)
- Me.GB_BattCh_Dial.Controls.Add(Me.Lbl_BattCh_Dial)
- Me.GB_BattCh_Dial.Controls.Add(Me.AG_BattCh)
- Me.GB_BattCh_Dial.Name = "GB_BattCh_Dial"
- Me.GB_BattCh_Dial.TabStop = False
- '
- 'PBox_Battery_State
- '
- resources.ApplyResources(Me.PBox_Battery_State, "PBox_Battery_State")
- Me.PBox_Battery_State.Name = "PBox_Battery_State"
- Me.PBox_Battery_State.TabStop = False
- '
- 'Lbl_BattCh_Dial
- '
- resources.ApplyResources(Me.Lbl_BattCh_Dial, "Lbl_BattCh_Dial")
- Me.Lbl_BattCh_Dial.Name = "Lbl_BattCh_Dial"
- '
'AG_BattCh
'
Me.AG_BattCh.BaseArcColor = System.Drawing.Color.Gray
@@ -498,15 +668,13 @@ Partial Class WinNUT
Me.AG_BattCh.BaseArcStart = 135
Me.AG_BattCh.BaseArcSweep = 270
Me.AG_BattCh.BaseArcWidth = 5
- Me.AG_BattCh.Center = New System.Drawing.Point(74, 70)
- Me.AG_BattCh.GaugeAutoSize = False
- Me.AG_BattCh.GradientColor = System.Windows.Forms.AGauge.GradientType.RedGreen
- Me.AG_BattCh.GradientColorOrientation = System.Windows.Forms.AGauge.GradientOrientation.LeftToRight
+ Me.AG_BattCh.GradientType = WinNUT_Client.Controls.UPSVarGauge.GradientTypeEnum.RedGreen
+ Me.AG_BattCh.GradientOrientation = WinNUT_Client.Controls.UPSVarGauge.GradientOrientationEnum.LeftToRight
resources.ApplyResources(Me.AG_BattCh, "AG_BattCh")
Me.AG_BattCh.MaxValue = 100.0!
Me.AG_BattCh.MinValue = 0!
Me.AG_BattCh.Name = "AG_BattCh"
- Me.AG_BattCh.NeedleColor1 = System.Windows.Forms.AGaugeNeedleColor.Gray
+ Me.AG_BattCh.NeedleColor1 = AGaugeNeedleColor.Gray
Me.AG_BattCh.NeedleColor2 = System.Drawing.Color.DimGray
Me.AG_BattCh.NeedleRadius = 32
Me.AG_BattCh.NeedleType = System.Windows.Forms.NeedleType.Advance
@@ -531,191 +699,11 @@ Partial Class WinNUT
Me.AG_BattCh.ScaleNumbersRotation = 0
Me.AG_BattCh.ScaleNumbersStartScaleLine = 0
Me.AG_BattCh.ScaleNumbersStepScaleLines = 1
- Me.AG_BattCh.UnitValue1 = System.Windows.Forms.AGauge.UnitValue.Percent
- Me.AG_BattCh.UnitValue2 = System.Windows.Forms.AGauge.UnitValue.None
+ Me.AG_BattCh.UnitValue1 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.Percent
+ Me.AG_BattCh.UnitValue2 = WinNUT_Client.Controls.UPSVarGauge.UnitValueEnum.None
Me.AG_BattCh.Value1 = 0!
Me.AG_BattCh.Value2 = 0!
'
- 'GB_Load_Dial
- '
- resources.ApplyResources(Me.GB_Load_Dial, "GB_Load_Dial")
- Me.GB_Load_Dial.Controls.Add(Me.AG_Load)
- Me.GB_Load_Dial.Controls.Add(Me.Lbl_Load_Dial)
- Me.GB_Load_Dial.Name = "GB_Load_Dial"
- Me.GB_Load_Dial.TabStop = False
- '
- 'AG_Load
- '
- Me.AG_Load.BaseArcColor = System.Drawing.Color.Gray
- Me.AG_Load.BaseArcRadius = 45
- Me.AG_Load.BaseArcStart = 135
- Me.AG_Load.BaseArcSweep = 270
- Me.AG_Load.BaseArcWidth = 5
- Me.AG_Load.Center = New System.Drawing.Point(74, 70)
- Me.AG_Load.GaugeAutoSize = False
- Me.AG_Load.GradientColor = System.Windows.Forms.AGauge.GradientType.RedGreen
- Me.AG_Load.GradientColorOrientation = System.Windows.Forms.AGauge.GradientOrientation.RightToLeft
- resources.ApplyResources(Me.AG_Load, "AG_Load")
- Me.AG_Load.MaxValue = 100.0!
- Me.AG_Load.MinValue = 0!
- Me.AG_Load.Name = "AG_Load"
- Me.AG_Load.NeedleColor1 = System.Windows.Forms.AGaugeNeedleColor.Gray
- Me.AG_Load.NeedleColor2 = System.Drawing.Color.DimGray
- Me.AG_Load.NeedleRadius = 32
- Me.AG_Load.NeedleType = System.Windows.Forms.NeedleType.Advance
- Me.AG_Load.NeedleWidth = 2
- Me.AG_Load.ScaleLinesInterColor = System.Drawing.Color.Black
- Me.AG_Load.ScaleLinesInterInnerRadius = 40
- Me.AG_Load.ScaleLinesInterOuterRadius = 48
- Me.AG_Load.ScaleLinesInterWidth = 1
- Me.AG_Load.ScaleLinesMajorColor = System.Drawing.Color.Black
- Me.AG_Load.ScaleLinesMajorInnerRadius = 40
- Me.AG_Load.ScaleLinesMajorOuterRadius = 48
- Me.AG_Load.ScaleLinesMajorStepValue = 20.0!
- Me.AG_Load.ScaleLinesMajorWidth = 2
- Me.AG_Load.ScaleLinesMinorColor = System.Drawing.Color.Gray
- Me.AG_Load.ScaleLinesMinorInnerRadius = 42
- Me.AG_Load.ScaleLinesMinorOuterRadius = 48
- Me.AG_Load.ScaleLinesMinorTicks = 9
- Me.AG_Load.ScaleLinesMinorWidth = 1
- Me.AG_Load.ScaleNumbersColor = System.Drawing.Color.Black
- Me.AG_Load.ScaleNumbersFormat = Nothing
- Me.AG_Load.ScaleNumbersRadius = 60
- Me.AG_Load.ScaleNumbersRotation = 0
- Me.AG_Load.ScaleNumbersStartScaleLine = 0
- Me.AG_Load.ScaleNumbersStepScaleLines = 1
- Me.AG_Load.UnitValue1 = System.Windows.Forms.AGauge.UnitValue.Percent
- Me.AG_Load.UnitValue2 = System.Windows.Forms.AGauge.UnitValue.Watts
- Me.AG_Load.Value1 = 0!
- Me.AG_Load.Value2 = 0!
- '
- 'Lbl_Load_Dial
- '
- resources.ApplyResources(Me.Lbl_Load_Dial, "Lbl_Load_Dial")
- Me.Lbl_Load_Dial.Name = "Lbl_Load_Dial"
- '
- 'GB_BattV_Dial
- '
- resources.ApplyResources(Me.GB_BattV_Dial, "GB_BattV_Dial")
- Me.GB_BattV_Dial.Controls.Add(Me.AG_BattV)
- Me.GB_BattV_Dial.Controls.Add(Me.Lbl_BattV_Dial)
- Me.GB_BattV_Dial.Name = "GB_BattV_Dial"
- Me.GB_BattV_Dial.TabStop = False
- '
- 'AG_BattV
- '
- Me.AG_BattV.BaseArcColor = System.Drawing.Color.Gray
- Me.AG_BattV.BaseArcRadius = 45
- Me.AG_BattV.BaseArcStart = 135
- Me.AG_BattV.BaseArcSweep = 270
- Me.AG_BattV.BaseArcWidth = 5
- Me.AG_BattV.Center = New System.Drawing.Point(74, 70)
- Me.AG_BattV.GaugeAutoSize = False
- Me.AG_BattV.GradientColor = System.Windows.Forms.AGauge.GradientType.RedGreen
- Me.AG_BattV.GradientColorOrientation = System.Windows.Forms.AGauge.GradientOrientation.BottomToUp
- resources.ApplyResources(Me.AG_BattV, "AG_BattV")
- Me.AG_BattV.MaxValue = 100.0!
- Me.AG_BattV.MinValue = 0!
- Me.AG_BattV.Name = "AG_BattV"
- Me.AG_BattV.NeedleColor1 = System.Windows.Forms.AGaugeNeedleColor.Gray
- Me.AG_BattV.NeedleColor2 = System.Drawing.Color.DimGray
- Me.AG_BattV.NeedleRadius = 32
- Me.AG_BattV.NeedleType = System.Windows.Forms.NeedleType.Advance
- Me.AG_BattV.NeedleWidth = 2
- Me.AG_BattV.ScaleLinesInterColor = System.Drawing.Color.Black
- Me.AG_BattV.ScaleLinesInterInnerRadius = 40
- Me.AG_BattV.ScaleLinesInterOuterRadius = 48
- Me.AG_BattV.ScaleLinesInterWidth = 1
- Me.AG_BattV.ScaleLinesMajorColor = System.Drawing.Color.Black
- Me.AG_BattV.ScaleLinesMajorInnerRadius = 40
- Me.AG_BattV.ScaleLinesMajorOuterRadius = 48
- Me.AG_BattV.ScaleLinesMajorStepValue = 50.0!
- Me.AG_BattV.ScaleLinesMajorWidth = 2
- Me.AG_BattV.ScaleLinesMinorColor = System.Drawing.Color.Gray
- Me.AG_BattV.ScaleLinesMinorInnerRadius = 42
- Me.AG_BattV.ScaleLinesMinorOuterRadius = 48
- Me.AG_BattV.ScaleLinesMinorTicks = 9
- Me.AG_BattV.ScaleLinesMinorWidth = 1
- Me.AG_BattV.ScaleNumbersColor = System.Drawing.Color.Black
- Me.AG_BattV.ScaleNumbersFormat = Nothing
- Me.AG_BattV.ScaleNumbersRadius = 60
- Me.AG_BattV.ScaleNumbersRotation = 0
- Me.AG_BattV.ScaleNumbersStartScaleLine = 0
- Me.AG_BattV.ScaleNumbersStepScaleLines = 1
- Me.AG_BattV.UnitValue1 = System.Windows.Forms.AGauge.UnitValue.Volts
- Me.AG_BattV.UnitValue2 = System.Windows.Forms.AGauge.UnitValue.None
- Me.AG_BattV.Value1 = 0!
- Me.AG_BattV.Value2 = 0!
- '
- 'Lbl_BattV_Dial
- '
- resources.ApplyResources(Me.Lbl_BattV_Dial, "Lbl_BattV_Dial")
- Me.Lbl_BattV_Dial.Name = "Lbl_BattV_Dial"
- '
- 'GB_InF_Dial
- '
- resources.ApplyResources(Me.GB_InF_Dial, "GB_InF_Dial")
- Me.GB_InF_Dial.Controls.Add(Me.AG_InF)
- Me.GB_InF_Dial.Controls.Add(Me.Lbl_InF_Dial)
- Me.GB_InF_Dial.Name = "GB_InF_Dial"
- Me.GB_InF_Dial.TabStop = False
- '
- 'AG_InF
- '
- Me.AG_InF.BaseArcColor = System.Drawing.Color.Gray
- Me.AG_InF.BaseArcRadius = 45
- Me.AG_InF.BaseArcStart = 135
- Me.AG_InF.BaseArcSweep = 270
- Me.AG_InF.BaseArcWidth = 5
- Me.AG_InF.Center = New System.Drawing.Point(74, 70)
- Me.AG_InF.GaugeAutoSize = False
- Me.AG_InF.GradientColor = System.Windows.Forms.AGauge.GradientType.RedGreen
- Me.AG_InF.GradientColorOrientation = System.Windows.Forms.AGauge.GradientOrientation.BottomToUp
- resources.ApplyResources(Me.AG_InF, "AG_InF")
- Me.AG_InF.MaxValue = 100.0!
- Me.AG_InF.MinValue = 0!
- Me.AG_InF.Name = "AG_InF"
- Me.AG_InF.NeedleColor1 = System.Windows.Forms.AGaugeNeedleColor.Gray
- Me.AG_InF.NeedleColor2 = System.Drawing.Color.DimGray
- Me.AG_InF.NeedleRadius = 32
- Me.AG_InF.NeedleType = System.Windows.Forms.NeedleType.Advance
- Me.AG_InF.NeedleWidth = 2
- Me.AG_InF.ScaleLinesInterColor = System.Drawing.Color.Black
- Me.AG_InF.ScaleLinesInterInnerRadius = 40
- Me.AG_InF.ScaleLinesInterOuterRadius = 48
- Me.AG_InF.ScaleLinesInterWidth = 1
- Me.AG_InF.ScaleLinesMajorColor = System.Drawing.Color.Black
- Me.AG_InF.ScaleLinesMajorInnerRadius = 40
- Me.AG_InF.ScaleLinesMajorOuterRadius = 48
- Me.AG_InF.ScaleLinesMajorStepValue = 50.0!
- Me.AG_InF.ScaleLinesMajorWidth = 2
- Me.AG_InF.ScaleLinesMinorColor = System.Drawing.Color.Gray
- Me.AG_InF.ScaleLinesMinorInnerRadius = 42
- Me.AG_InF.ScaleLinesMinorOuterRadius = 48
- Me.AG_InF.ScaleLinesMinorTicks = 9
- Me.AG_InF.ScaleLinesMinorWidth = 1
- Me.AG_InF.ScaleNumbersColor = System.Drawing.Color.Black
- Me.AG_InF.ScaleNumbersFormat = Nothing
- Me.AG_InF.ScaleNumbersRadius = 60
- Me.AG_InF.ScaleNumbersRotation = 0
- Me.AG_InF.ScaleNumbersStartScaleLine = 0
- Me.AG_InF.ScaleNumbersStepScaleLines = 1
- Me.AG_InF.UnitValue1 = System.Windows.Forms.AGauge.UnitValue.Hertz
- Me.AG_InF.UnitValue2 = System.Windows.Forms.AGauge.UnitValue.None
- Me.AG_InF.Value1 = 0!
- Me.AG_InF.Value2 = 0!
- '
- 'Lbl_InF_Dial
- '
- resources.ApplyResources(Me.Lbl_InF_Dial, "Lbl_InF_Dial")
- Me.Lbl_InF_Dial.Name = "Lbl_InF_Dial"
- '
- 'CB_CurrentLog
- '
- Me.CB_CurrentLog.FormattingEnabled = True
- resources.ApplyResources(Me.CB_CurrentLog, "CB_CurrentLog")
- Me.CB_CurrentLog.Name = "CB_CurrentLog"
- '
'WinNUT
'
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
@@ -807,13 +795,13 @@ Partial Class WinNUT
Friend WithEvents Lbl_BattV_Dial As Label
Friend WithEvents GB_InV_Dial As GroupBox
Friend WithEvents Lbl_InV_Dial As Label
- Friend WithEvents AG_InV As AGauge
- Friend WithEvents AG_OutV As AGauge
- Friend WithEvents AG_BattCh As AGauge
- Friend WithEvents AG_Load As AGauge
- Friend WithEvents AG_BattV As AGauge
+ Friend WithEvents AG_InV As WinNUT_Client.Controls.UPSVarGauge
+ Friend WithEvents AG_OutV As WinNUT_Client.Controls.UPSVarGauge
+ Friend WithEvents AG_BattCh As WinNUT_Client.Controls.UPSVarGauge
+ Friend WithEvents AG_Load As WinNUT_Client.Controls.UPSVarGauge
+ Friend WithEvents AG_BattV As WinNUT_Client.Controls.UPSVarGauge
Friend WithEvents GB_InF_Dial As GroupBox
- Friend WithEvents AG_InF As AGauge
+ Friend WithEvents AG_InF As WinNUT_Client.Controls.UPSVarGauge
Friend WithEvents Lbl_InF_Dial As Label
Friend WithEvents CB_CurrentLog As ComboBox
Friend WithEvents PBox_Battery_State As PictureBox
diff --git a/WinNUT_V2/WinNUT_V2.sln b/WinNUT_V2/WinNUT_V2.sln
index 9881f56..465ff0b 100644
--- a/WinNUT_V2/WinNUT_V2.sln
+++ b/WinNUT_V2/WinNUT_V2.sln
@@ -9,11 +9,8 @@ Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "WinNUT-Setup", "Setup\Setup
ProjectSection(ProjectDependencies) = postProject
{194AB29D-1F80-497B-86BE-4F35DACBA6BC} = {194AB29D-1F80-497B-86BE-4F35DACBA6BC}
{9074CE60-DB9A-4BDF-B851-6EAB8A81F366} = {9074CE60-DB9A-4BDF-B851-6EAB8A81F366}
- {CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F} = {CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AGauge", "AGauge_mod\AGauge.csproj", "{CBDB1D25-5A95-43D4-A958-BF6AE65C6C3F}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5DD84426-132B-4C1F-9618-93535F5E8261}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig