The example demonstrates the properties of the numeric led display.

| Language: C# |
using Nevron.Nov;
using Nevron.Nov.Chart;
using Nevron.Nov.Dom;
using Nevron.Nov.Editors;
using Nevron.Nov.Graphics;
using Nevron.Nov.Layout;
using Nevron.Nov.UI;
using Nevron.Nov.Windows.Forms;
using System;
using System.Windows.Forms;
namespace NovWinFormsProject
{
public partial class Form1 : Form
{
#region Constructors
public Form1()
{
InitializeComponent();
// Set form title
Text = "NOV WinForms - NNumericLedDisplayExample";
// Create the NOV example and its controls
NWidget exampleContent = CreateExampleContent();
NWidget exampleControls = CreateExampleControls();
if (exampleControls != null)
{
exampleControls.PreferredWidth = 300;
}
// Place the example and its controls in a pair box
NPairBox pairBox = new NPairBox(exampleContent, exampleControls);
pairBox.FillMode = ENStackFillMode.First;
pairBox.FitMode = ENStackFitMode.First;
pairBox.Margins = new NMargins(NDesign.HorizontalSpacing, NDesign.VerticalSpacing);
// Host the example in the form
NNovWidgetHost host = new NNovWidgetHost(pairBox);
host.Dock = DockStyle.Fill;
Controls.Add(host);
}
#endregion
#region Example
public NWidget CreateExampleContent()
{
NStackPanel stack = new NStackPanel();
stack.Unregistered += OnStackUnregistered;
stack.HorizontalPlacement = ENHorizontalPlacement.Left;
m_NumericDisplay1 = CreateNumericLedDisplay();
stack.Add(m_NumericDisplay1);
m_NumericDisplay2 = CreateNumericLedDisplay();
stack.Add(m_NumericDisplay2);
m_NumericDisplay3 = CreateNumericLedDisplay();
stack.Add(m_NumericDisplay3);
m_DataFeedTimer = new NTimer();
m_DataFeedTimer.Tick += OnDataFeedTimerTick;
m_DataFeedTimer.Start();
return stack;
}
public NWidget CreateExampleControls()
{
NStackPanel stack = new NStackPanel();
NStackPanel propertyStack = new NStackPanel();
stack.Add(new NUniSizeBoxGroup(propertyStack));
// init form controls
m_CellSizeComboBox = new NComboBox();
propertyStack.Add(new NPairBox("Cell Size:", m_CellSizeComboBox, true));
m_CellSizeComboBox.Items.Add(new NComboBoxItem("Small"));
m_CellSizeComboBox.Items.Add(new NComboBoxItem("Normal"));
m_CellSizeComboBox.Items.Add(new NComboBoxItem("Large"));
m_CellSizeComboBox.SelectedIndex = 1;
m_CellSizeComboBox.SelectedIndexChanged += OnCellSizeComboBoxSelectedIndexChanged;
m_DisplayStyleComboBox = new NComboBox();
propertyStack.Add(new NPairBox("Display Style:", m_DisplayStyleComboBox, true));
m_DisplayStyleComboBox.Items.FillFromEnum();
m_DisplayStyleComboBox.SelectedIndex = (int)m_NumericDisplay1.DisplayStyle;
m_DisplayStyleComboBox.SelectedIndexChanged += OnDisplayStyleComboBoxSelectedIndexChanged;
m_ContentAlignmentComboBox = new NComboBox();
propertyStack.Add(new NPairBox("Content Alignment:", m_ContentAlignmentComboBox, true));
m_ContentAlignmentComboBox.Items.FillFromEnum();
m_ContentAlignmentComboBox.SelectedIndex = (int)m_NumericDisplay1.ContentAlignment;
m_ContentAlignmentComboBox.SelectedIndexChanged += OnContentAlignmentComboBoxSelectedIndexChanged;
m_SignModeComboBox = new NComboBox();
propertyStack.Add(new NPairBox("Sign Mode", m_SignModeComboBox, true));
m_SignModeComboBox.Items.FillFromEnum();
m_SignModeComboBox.SelectedIndex = (int)m_NumericDisplay1.SignMode;
m_SignModeComboBox.SelectedIndexChanged += OnSignModeComboBoxSelectedIndexChanged;
m_ShowLeadingZerosCheckBox = new NCheckBox("Show Leading Zeroes");
propertyStack.Add(m_ShowLeadingZerosCheckBox);
m_ShowLeadingZerosCheckBox.CheckedChanged += OnShowLeadingZerosCheckBoxCheckedChanged;
m_AttachSignToNumberCheckBox = new NCheckBox("Attach Sign to Number");
propertyStack.Add(m_AttachSignToNumberCheckBox);
m_AttachSignToNumberCheckBox.CheckedChanged += OnAttachSignToNumberCheckBoxCheckedChanged;
NButton litFillButton = new NButton("Lit Fill");
litFillButton.Click += OnLitFillButtonClick;
propertyStack.Add(litFillButton);
NButton dimFillButton = new NButton("Dim Fill");
dimFillButton.Click += OnDimFillButtonClick;
propertyStack.Add(dimFillButton);
m_StopStartTimerButton = new NButton("Stop Timer");
m_StopStartTimerButton.Click += OnStopStartTimerButtonClick;
propertyStack.Add(m_StopStartTimerButton);
return stack;
}
public string GetExampleDescription()
{
return @"The example demonstrates the properties of the numeric led display.
";
}
///
/// Gets the relevant documentation links for the example
///
///
public (string Name, string Url)[] GetDocumentationUrls()
{
return new[]
{
("Numeric LED Display", "https://www.nevron.com/docs/openvision/numeric-led-display.html"),
("Instrumentation Overview", "https://www.nevron.com/docs/openvision/instrumentation-overview.html"),
};
}
#endregion
#region Implementation
private NNumericLedDisplay CreateNumericLedDisplay()
{
NNumericLedDisplay numericLedDisplay = new NNumericLedDisplay();
numericLedDisplay.Value = 0.0;
numericLedDisplay.CellCountMode = ENDisplayCellCountMode.Fixed;
numericLedDisplay.CellCount = 7;
numericLedDisplay.BackgroundFill = new NColorFill(NColor.Black);
numericLedDisplay.Border = NBorder.CreateSunken3DBorder(new NUIThemeColorMap(ENUIThemeScheme.WindowsClassic));
numericLedDisplay.BorderThickness = new NMargins(6);
numericLedDisplay.Margins = new NMargins(5);
numericLedDisplay.Padding = new NMargins(5);
numericLedDisplay.CapEffect = new NGelCapEffect();
return numericLedDisplay;
}
#endregion
#region Event Handlers
void OnStopStartTimerButtonClick(NEventArgs arg)
{
NLabel label = ((NLabel)((NButton)arg.TargetNode).Content);
if (label.Text.StartsWith("Stop"))
{
label.Text = "Start Timer";
m_DataFeedTimer.Stop();
}
else
{
label.Text = "Stop Timer";
m_DataFeedTimer.Start();
}
}
void OnDataFeedTimerTick()
{
double value1 = -50 + m_Random.Next(10000) / 100.0;
m_NumericDisplay1.Value = value1;
double value2;
if (m_Counter % 4 == 0)
{
value2 = -50 + m_Random.Next(10000) / 100.0;
m_NumericDisplay2.Value = value2;
}
double value3;
if (m_Counter % 8 == 0)
{
value3 = 200 + m_Random.Next(10000) / 100.0;
m_NumericDisplay3.Value = value3;
}
m_Counter++;
}
void OnLitFillButtonClick(NEventArgs arg)
{
NEditorWindow.CreateForType(
(NFill)m_NumericDisplay1.LitFill.DeepClone(),
null,
m_NumericDisplay1.DisplayWindow,
false,
OnLitFillEdited).Open();
}
void OnLitFillEdited(NFill fill)
{
m_NumericDisplay1.LitFill = (NFill)(fill.DeepClone());
m_NumericDisplay2.LitFill = (NFill)(fill.DeepClone());
m_NumericDisplay3.LitFill = (NFill)(fill.DeepClone());
}
void OnDimFillButtonClick(NEventArgs arg)
{
NEditorWindow.CreateForType(
(NFill)m_NumericDisplay1.DimFill.DeepClone(),
null,
m_NumericDisplay1.DisplayWindow,
false,
OnDimFillEdited).Open();
}
void OnDimFillEdited(NFill fill)
{
m_NumericDisplay1.DimFill = (NFill)(fill.DeepClone());
m_NumericDisplay1.DecimalDimFill = (NFill)(fill.DeepClone());
m_NumericDisplay2.DimFill = (NFill)(fill.DeepClone());
m_NumericDisplay2.DecimalDimFill = (NFill)(fill.DeepClone());
m_NumericDisplay3.DimFill = (NFill)(fill.DeepClone());
m_NumericDisplay3.DecimalDimFill = (NFill)(fill.DeepClone());
}
void OnCellSizeComboBoxSelectedIndexChanged(NValueChangeEventArgs arg)
{
double segmentWidth = 0.0;
double segmentGap = 0.0;
NSize cellSize = new NSize(0.0, 0.0);
switch (m_CellSizeComboBox.SelectedIndex)
{
case 0: // small
segmentWidth = 2.0;
segmentGap = 1.0;
cellSize = new NSize(15, 30);
break;
case 1: // normal
segmentWidth = 3;
segmentGap = 1;
cellSize = new NSize(20, 40);
break;
case 2: // large
segmentWidth = 4;
segmentGap = 2;
cellSize = new NSize(26, 52);
break;
}
NNumericLedDisplay[] displays = new NNumericLedDisplay[] { m_NumericDisplay1, m_NumericDisplay2, m_NumericDisplay3 };
for (int i = 0; i < displays.Length; i++)
{
NNumericLedDisplay display = displays[i];
display.CellSize = cellSize;
display.SegmentGap = segmentGap;
display.SegmentWidth = segmentWidth;
display.DecimalCellSize = cellSize;
display.DecimalSegmentGap = segmentGap;
display.DecimalSegmentWidth = segmentWidth;
}
}
void OnDisplayStyleComboBoxSelectedIndexChanged(NValueChangeEventArgs arg)
{
m_NumericDisplay1.DisplayStyle = (ENDisplayStyle)m_DisplayStyleComboBox.SelectedIndex;
m_NumericDisplay2.DisplayStyle = (ENDisplayStyle)m_DisplayStyleComboBox.SelectedIndex;
m_NumericDisplay3.DisplayStyle = (ENDisplayStyle)m_DisplayStyleComboBox.SelectedIndex;
}
void OnContentAlignmentComboBoxSelectedIndexChanged(NValueChangeEventArgs arg)
{
m_NumericDisplay1.ContentAlignment = (ENContentAlignment)m_ContentAlignmentComboBox.SelectedIndex;
m_NumericDisplay2.ContentAlignment = (ENContentAlignment)m_ContentAlignmentComboBox.SelectedIndex;
m_NumericDisplay3.ContentAlignment = (ENContentAlignment)m_ContentAlignmentComboBox.SelectedIndex;
}
private void OnStopStartTimerButtonClick(object sender, System.EventArgs e)
{
if (this.m_DataFeedTimer.IsStarted)
{
this.m_DataFeedTimer.Stop();
m_StopStartTimerButton.Content = new NLabel("Start Timer");
}
else
{
this.m_DataFeedTimer.Start();
m_StopStartTimerButton.Content = new NLabel("Stop Timer");
}
}
void OnSignModeComboBoxSelectedIndexChanged(NValueChangeEventArgs arg)
{
m_NumericDisplay1.SignMode = (ENDisplaySignMode)m_SignModeComboBox.SelectedIndex;
m_NumericDisplay2.SignMode = (ENDisplaySignMode)m_SignModeComboBox.SelectedIndex;
m_NumericDisplay3.SignMode = (ENDisplaySignMode)m_SignModeComboBox.SelectedIndex;
}
void OnShowLeadingZerosCheckBoxCheckedChanged(NValueChangeEventArgs arg)
{
m_NumericDisplay1.ShowLeadingZeros = m_ShowLeadingZerosCheckBox.Checked;
m_NumericDisplay2.ShowLeadingZeros = m_ShowLeadingZerosCheckBox.Checked;
m_NumericDisplay3.ShowLeadingZeros = m_ShowLeadingZerosCheckBox.Checked;
}
void OnAttachSignToNumberCheckBoxCheckedChanged(NValueChangeEventArgs arg)
{
m_NumericDisplay1.AttachSignToNumber = m_AttachSignToNumberCheckBox.Checked;
m_NumericDisplay2.AttachSignToNumber = m_AttachSignToNumberCheckBox.Checked;
m_NumericDisplay3.AttachSignToNumber = m_AttachSignToNumberCheckBox.Checked;
}
private void OnStackUnregistered(NEventArgs arg)
{
m_DataFeedTimer.Stop();
}
#endregion
#region Fields
private NButton m_StopStartTimerButton;
private NCheckBox m_AttachSignToNumberCheckBox;
private NCheckBox m_ShowLeadingZerosCheckBox;
private NComboBox m_SignModeComboBox;
private NComboBox m_ContentAlignmentComboBox;
private NComboBox m_DisplayStyleComboBox;
private NNumericLedDisplay m_NumericDisplay1;
private NNumericLedDisplay m_NumericDisplay2;
private NNumericLedDisplay m_NumericDisplay3;
private NTimer m_DataFeedTimer;
private NComboBox m_CellSizeComboBox;
private int m_Counter = 0;
private Random m_Random = new Random();
#endregion
#region Static Methods
#endregion
#region Constants
#endregion
#region Nested Types
#endregion
}
} | Language: VB.NET |
Imports Nevron.Nov
Imports Nevron.Nov.Chart
Imports Nevron.Nov.Dom
Imports Nevron.Nov.Editors
Imports Nevron.Nov.Graphics
Imports Nevron.Nov.Layout
Imports Nevron.Nov.UI
Imports Nevron.Nov.Windows.Forms
Imports System
Public Class Form1
#Region "Constructors"
Public Sub New()
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
' Set form title
Text = "NOV WinForms - NNumericLedDisplayExample"
' Create the NOV example and its controls
Dim exampleContent As NWidget = CreateExampleContent()
Dim exampleControls As NWidget = CreateExampleControls()
If Not exampleControls Is Nothing Then
exampleControls.PreferredWidth = 300
End If
' Place the example and its controls in a pair box
Dim pairBox As NPairBox = New NPairBox(exampleContent, exampleControls)
pairBox.FillMode = ENStackFillMode.First
pairBox.FitMode = ENStackFitMode.First
pairBox.Margins = New NMargins(NDesign.HorizontalSpacing, NDesign.VerticalSpacing)
' Host the example in the form
Dim host As NNovWidgetHost(Of NWidget) = New NNovWidgetHost(Of NWidget)(pairBox)
host.Dock = DockStyle.Fill
Controls.Add(host)
End Sub
#End Region
#Region "Example"
Public Function CreateExampleContent() As NWidget
Dim stack As NStackPanel = New NStackPanel()
stack.Unregistered += AddressOf OnStackUnregistered
stack.HorizontalPlacement = ENHorizontalPlacement.Left
m_NumericDisplay1 = CreateNumericLedDisplay()
stack.Add(m_NumericDisplay1)
m_NumericDisplay2 = CreateNumericLedDisplay()
stack.Add(m_NumericDisplay2)
m_NumericDisplay3 = CreateNumericLedDisplay()
stack.Add(m_NumericDisplay3)
m_DataFeedTimer = New NTimer()
Me.m_DataFeedTimer.Tick += AddressOf OnDataFeedTimerTick
m_DataFeedTimer.Start()
Return stack
End Function
Public Function CreateExampleControls() As NWidget
Dim stack As NStackPanel = New NStackPanel()
Dim propertyStack As NStackPanel = New NStackPanel()
stack.Add(New NUniSizeBoxGroup(propertyStack))
' init form controls
m_CellSizeComboBox = New NComboBox()
propertyStack.Add(New NPairBox("Cell Size:", m_CellSizeComboBox, True))
m_CellSizeComboBox.Items.Add(New NComboBoxItem("Small"))
m_CellSizeComboBox.Items.Add(New NComboBoxItem("Normal"))
m_CellSizeComboBox.Items.Add(New NComboBoxItem("Large"))
m_CellSizeComboBox.SelectedIndex = 1
Me.m_CellSizeComboBox.SelectedIndexChanged += AddressOf OnCellSizeComboBoxSelectedIndexChanged
m_DisplayStyleComboBox = New NComboBox()
propertyStack.Add(New NPairBox("Display Style:", m_DisplayStyleComboBox, True))
m_DisplayStyleComboBox.Items.FillFromEnum(Of ENDisplayStyle)()
m_DisplayStyleComboBox.SelectedIndex = m_NumericDisplay1.DisplayStyle
Me.m_DisplayStyleComboBox.SelectedIndexChanged += AddressOf OnDisplayStyleComboBoxSelectedIndexChanged
m_ContentAlignmentComboBox = New NComboBox()
propertyStack.Add(New NPairBox("Content Alignment:", m_ContentAlignmentComboBox, True))
m_ContentAlignmentComboBox.Items.FillFromEnum(Of ENContentAlignment)()
m_ContentAlignmentComboBox.SelectedIndex = m_NumericDisplay1.ContentAlignment
Me.m_ContentAlignmentComboBox.SelectedIndexChanged += AddressOf OnContentAlignmentComboBoxSelectedIndexChanged
m_SignModeComboBox = New NComboBox()
propertyStack.Add(New NPairBox("Sign Mode", m_SignModeComboBox, True))
m_SignModeComboBox.Items.FillFromEnum(Of ENDisplaySignMode)()
m_SignModeComboBox.SelectedIndex = m_NumericDisplay1.SignMode
Me.m_SignModeComboBox.SelectedIndexChanged += AddressOf OnSignModeComboBoxSelectedIndexChanged
m_ShowLeadingZerosCheckBox = New NCheckBox("Show Leading Zeroes")
propertyStack.Add(m_ShowLeadingZerosCheckBox)
Me.m_ShowLeadingZerosCheckBox.CheckedChanged += AddressOf OnShowLeadingZerosCheckBoxCheckedChanged
m_AttachSignToNumberCheckBox = New NCheckBox("Attach Sign to Number")
propertyStack.Add(m_AttachSignToNumberCheckBox)
Me.m_AttachSignToNumberCheckBox.CheckedChanged += AddressOf OnAttachSignToNumberCheckBoxCheckedChanged
Dim litFillButton As NButton = New NButton("Lit Fill")
litFillButton.Click += AddressOf OnLitFillButtonClick
propertyStack.Add(litFillButton)
Dim dimFillButton As NButton = New NButton("Dim Fill")
dimFillButton.Click += AddressOf OnDimFillButtonClick
propertyStack.Add(dimFillButton)
m_StopStartTimerButton = New NButton("Stop Timer")
Me.m_StopStartTimerButton.Click += AddressOf OnStopStartTimerButtonClick
propertyStack.Add(m_StopStartTimerButton)
Return stack
End Function
Public Function GetExampleDescription() As String
Return "The example demonstrates the properties of the numeric led display.
"
End Function
'''
''' Gets the relevant documentation links for the example
'''
'''
Public Function GetDocumentationUrls() As (String, String)()
Return {("Numeric LED Display", "https://www.nevron.com/docs/openvision/numeric-led-display.html"), ("Instrumentation Overview", "https://www.nevron.com/docs/openvision/instrumentation-overview.html")}
End Function
#End Region
#Region "Implementation"
Private Function CreateNumericLedDisplay() As NNumericLedDisplay
Dim numericLedDisplay As NNumericLedDisplay = New NNumericLedDisplay()
numericLedDisplay.Value = 0.0
numericLedDisplay.CellCountMode = ENDisplayCellCountMode.Fixed
numericLedDisplay.CellCount = 7
numericLedDisplay.BackgroundFill = New NColorFill(NColor.Black)
numericLedDisplay.Border = NBorder.CreateSunken3DBorder(New NUIThemeColorMap(ENUIThemeScheme.WindowsClassic))
numericLedDisplay.BorderThickness = New NMargins(6)
numericLedDisplay.Margins = New NMargins(5)
numericLedDisplay.Padding = New NMargins(5)
numericLedDisplay.CapEffect = New NGelCapEffect()
Return numericLedDisplay
End Function
#End Region
#Region "Event Handlers"
Private Sub OnStopStartTimerButtonClick(arg As NEventArgs)
Dim label = CType(CType(arg.TargetNode, NButton).Content, NLabel)
If label.Text.StartsWith("Stop") Then
label.Text = "Start Timer"
m_DataFeedTimer.Stop()
Else
label.Text = "Stop Timer"
m_DataFeedTimer.Start()
End If
End Sub
Private Sub OnDataFeedTimerTick()
Dim value1 = -50 + m_Random.Next(10000) / 100.0
m_NumericDisplay1.Value = value1
Dim value2 As Double
If m_Counter Mod 4 = 0 Then
value2 = -50 + m_Random.Next(10000) / 100.0
m_NumericDisplay2.Value = value2
End If
Dim value3 As Double
If m_Counter Mod 8 = 0 Then
value3 = 200 + m_Random.Next(10000) / 100.0
m_NumericDisplay3.Value = value3
End If
m_Counter += 1
End Sub
Private Sub OnLitFillButtonClick(arg As NEventArgs)
Call NEditorWindow.CreateForType(CType(CType(m_NumericDisplay1.LitFill.DeepClone(), NFill), NFill), Nothing, CType(m_NumericDisplay1.DisplayWindow, NWindow), CBool(False), New DNFunction(Of T)(AddressOf OnLitFillEdited)).Open()
End Sub
Private Sub OnLitFillEdited(fill As NFill)
m_NumericDisplay1.LitFill = CType((fill.DeepClone()), NFill)
m_NumericDisplay2.LitFill = CType((fill.DeepClone()), NFill)
m_NumericDisplay3.LitFill = CType((fill.DeepClone()), NFill)
End Sub
Private Sub OnDimFillButtonClick(arg As NEventArgs)
Call NEditorWindow.CreateForType(CType(CType(m_NumericDisplay1.DimFill.DeepClone(), NFill), NFill), Nothing, CType(m_NumericDisplay1.DisplayWindow, NWindow), CBool(False), New DNFunction(Of T)(AddressOf OnDimFillEdited)).Open()
End Sub
Private Sub OnDimFillEdited(fill As NFill)
m_NumericDisplay1.DimFill = CType((fill.DeepClone()), NFill)
m_NumericDisplay1.DecimalDimFill = CType((fill.DeepClone()), NFill)
m_NumericDisplay2.DimFill = CType((fill.DeepClone()), NFill)
m_NumericDisplay2.DecimalDimFill = CType((fill.DeepClone()), NFill)
m_NumericDisplay3.DimFill = CType((fill.DeepClone()), NFill)
m_NumericDisplay3.DecimalDimFill = CType((fill.DeepClone()), NFill)
End Sub
Private Sub OnCellSizeComboBoxSelectedIndexChanged(arg As NValueChangeEventArgs)
Dim segmentWidth = 0.0
Dim segmentGap = 0.0
Dim cellSize As NSize = New NSize(0.0, 0.0)
Select Case m_CellSizeComboBox.SelectedIndex
Case 0 ' small
segmentWidth = 2.0
segmentGap = 1.0
cellSize = New NSize(15, 30)
Case 1 ' normal
segmentWidth = 3
segmentGap = 1
cellSize = New NSize(20, 40)
Case 2 ' large
segmentWidth = 4
segmentGap = 2
cellSize = New NSize(26, 52)
End Select
Dim displays = New NNumericLedDisplay() {m_NumericDisplay1, m_NumericDisplay2, m_NumericDisplay3}
For i = 0 To displays.Length - 1
Dim display = displays(i)
display.CellSize = cellSize
display.SegmentGap = segmentGap
display.SegmentWidth = segmentWidth
display.DecimalCellSize = cellSize
display.DecimalSegmentGap = segmentGap
display.DecimalSegmentWidth = segmentWidth
Next
End Sub
Private Sub OnDisplayStyleComboBoxSelectedIndexChanged(arg As NValueChangeEventArgs)
m_NumericDisplay1.DisplayStyle = CType(m_DisplayStyleComboBox.SelectedIndex, ENDisplayStyle)
m_NumericDisplay2.DisplayStyle = CType(m_DisplayStyleComboBox.SelectedIndex, ENDisplayStyle)
m_NumericDisplay3.DisplayStyle = CType(m_DisplayStyleComboBox.SelectedIndex, ENDisplayStyle)
End Sub
Private Sub OnContentAlignmentComboBoxSelectedIndexChanged(arg As NValueChangeEventArgs)
m_NumericDisplay1.ContentAlignment = CType(m_ContentAlignmentComboBox.SelectedIndex, ENContentAlignment)
m_NumericDisplay2.ContentAlignment = CType(m_ContentAlignmentComboBox.SelectedIndex, ENContentAlignment)
m_NumericDisplay3.ContentAlignment = CType(m_ContentAlignmentComboBox.SelectedIndex, ENContentAlignment)
End Sub
Private Sub OnStopStartTimerButtonClick(sender As Object, e As EventArgs)
If m_DataFeedTimer.IsStarted Then
m_DataFeedTimer.Stop()
m_StopStartTimerButton.Content = New NLabel("Start Timer")
Else
m_DataFeedTimer.Start()
m_StopStartTimerButton.Content = New NLabel("Stop Timer")
End If
End Sub
Private Sub OnSignModeComboBoxSelectedIndexChanged(arg As NValueChangeEventArgs)
m_NumericDisplay1.SignMode = CType(m_SignModeComboBox.SelectedIndex, ENDisplaySignMode)
m_NumericDisplay2.SignMode = CType(m_SignModeComboBox.SelectedIndex, ENDisplaySignMode)
m_NumericDisplay3.SignMode = CType(m_SignModeComboBox.SelectedIndex, ENDisplaySignMode)
End Sub
Private Sub OnShowLeadingZerosCheckBoxCheckedChanged(arg As NValueChangeEventArgs)
m_NumericDisplay1.ShowLeadingZeros = m_ShowLeadingZerosCheckBox.Checked
m_NumericDisplay2.ShowLeadingZeros = m_ShowLeadingZerosCheckBox.Checked
m_NumericDisplay3.ShowLeadingZeros = m_ShowLeadingZerosCheckBox.Checked
End Sub
Private Sub OnAttachSignToNumberCheckBoxCheckedChanged(arg As NValueChangeEventArgs)
m_NumericDisplay1.AttachSignToNumber = m_AttachSignToNumberCheckBox.Checked
m_NumericDisplay2.AttachSignToNumber = m_AttachSignToNumberCheckBox.Checked
m_NumericDisplay3.AttachSignToNumber = m_AttachSignToNumberCheckBox.Checked
End Sub
Private Sub OnStackUnregistered(arg As NEventArgs)
m_DataFeedTimer.Stop()
End Sub
#End Region
#Region "Fields"
Private m_StopStartTimerButton As NButton
Private m_AttachSignToNumberCheckBox As NCheckBox
Private m_ShowLeadingZerosCheckBox As NCheckBox
Private m_SignModeComboBox As NComboBox
Private m_ContentAlignmentComboBox As NComboBox
Private m_DisplayStyleComboBox As NComboBox
Private m_NumericDisplay1 As NNumericLedDisplay
Private m_NumericDisplay2 As NNumericLedDisplay
Private m_NumericDisplay3 As NNumericLedDisplay
Private m_DataFeedTimer As NTimer
Private m_CellSizeComboBox As NComboBox
Private m_Counter As Integer = 0
Private m_Random As Random = New Random()
#End Region
#Region "Static Methods"
#End Region
#Region "Constants"
#End Region
#Region "Nested Types"
#End Region
End Class