Chronos Plugins 5.9.0
This documentation covers the plugin interfaces definitions and an example implementation.
Loading...
Searching...
No Matches
MockPlugin.Device.MockDeviceToolbox Class Reference

Example implementation for a WinForms toolbox for our Mock Device. More...

+ Inheritance diagram for MockPlugin.Device.MockDeviceToolbox:
+ Collaboration diagram for MockPlugin.Device.MockDeviceToolbox:

Public Member Functions

 MockDeviceToolbox ()
 

Properties

MockDevice Device [get, set]
 
Icon NavBarIcon [get]
 
bool? SequenceRunning [set]
 
- Properties inherited from AxelSemrau.Chronos.Plugin.IToolbox< MockDevice >
TDevice Device [get, set]
 Gives access to the device. Will be set after the class has been instantiated.
 
System.Drawing.Icon NavBarIcon [get]
 Icon that is shown in the tools menu.
 
- Properties inherited from AxelSemrau.Chronos.Plugin.IUsableDuringRun< MockDevice >
bool SequenceRunning [set]
 Informs you if a sequence is running or not, so that you can adjust the GUI accordingly.
 

Private Member Functions

void btnShowMessage_Click (object sender, EventArgs e)
 

Private Attributes

MockDevice mDev
 

Detailed Description

Example implementation for a WinForms toolbox for our Mock Device.

Just passes a message to the device which will show it in a MessageBox and allows to connect/disconnect.

Definition at line 15 of file MockDeviceToolbox.cs.

Constructor & Destructor Documentation

◆ MockDeviceToolbox()

MockPlugin.Device.MockDeviceToolbox.MockDeviceToolbox ( )

Definition at line 17 of file MockDeviceToolbox.cs.

18 {
19 InitializeComponent();
20 }

Member Function Documentation

◆ btnShowMessage_Click()

void MockPlugin.Device.MockDeviceToolbox.btnShowMessage_Click ( object sender,
EventArgs e )
private

Definition at line 42 of file MockDeviceToolbox.cs.

43 {
44 mDev.ShowTheMessage(textBox1.Text);
45 }
void ShowTheMessage(string messageText)
Let our device set a status message and display some message box instead of doing real work.

References MockPlugin.Device.MockDeviceToolbox.mDev, and MockPlugin.Device.MockDevice.ShowTheMessage().

Member Data Documentation

◆ mDev

MockDevice MockPlugin.Device.MockDeviceToolbox.mDev
private

Property Documentation

◆ Device

MockDevice MockPlugin.Device.MockDeviceToolbox.Device
getset

Definition at line 24 of file MockDeviceToolbox.cs.

25 {
26 get => mDev;
27 set
28 {
29 mDev = value;
30 if (mDev != null)
31 {
32 // Handle connect/disconnect using data binding
33 checkBox1.DataBindings.Add(new Binding("Checked",
34 mDev,
35 "IsConnected",
36 false,
37 DataSourceUpdateMode.OnPropertyChanged));
38 }
39 }
40 }

◆ NavBarIcon

Icon MockPlugin.Device.MockDeviceToolbox.NavBarIcon
get

Definition at line 47 of file MockDeviceToolbox.cs.

◆ SequenceRunning

bool? MockPlugin.Device.MockDeviceToolbox.SequenceRunning
set

Definition at line 49 of file MockDeviceToolbox.cs.

50 {
51 set => lblRunning.Text = $@"{(value ? "Sequence" : "No sequence")} running";
52 }

The documentation for this class was generated from the following file: