Chronos Plugins 5.11.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]
 Gives access to the device. Will be set after the class has been instantiated.
Icon NavBarIcon [get]
 Icon that is shown in the tools menu.
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 }

References mDev.

Member Data Documentation

◆ mDev

MockDevice MockPlugin.Device.MockDeviceToolbox.mDev
private

Definition at line 22 of file MockDeviceToolbox.cs.

Referenced by btnShowMessage_Click().

Property Documentation

◆ Device

MockDevice MockPlugin.Device.MockDeviceToolbox.Device
getset

Gives access to the device. Will be set after the class has been instantiated.

Implements AxelSemrau.Chronos.Plugin.IToolbox< TDevice >.

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

Icon that is shown in the tools menu.

Please use 32x32 pixels.

Implements AxelSemrau.Chronos.Plugin.IToolbox< TDevice >.

Definition at line 47 of file MockDeviceToolbox.cs.

◆ SequenceRunning

bool? MockPlugin.Device.MockDeviceToolbox.SequenceRunning
set

Informs you if a sequence is running or not, so that you can adjust the GUI accordingly.

Implements AxelSemrau.Chronos.Plugin.IUsableDuringRun< TDevice >.

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: