8 using Syncfusion.Windows.Forms;
9 using Syncfusion.Windows.Forms.Gauge;
10 using Syncfusion.Windows.Forms.Tools;
33 this.InitializeComponent();
34 this.scanControlMain.Init(arduinoCommands);
35 this.manualControl.Init(arduinoCommands);
36 this.Text = $
"SimpleScan3D {Program.Version}";
37 this.scanControlMain.StartScanning += this.ScanControlMainOnStartScanning;
38 this.scanControlMain.StopScanning += this.ScanControlMainOnStopScanning;
40 this.TranslateTexts();
46 private void TranslateTexts()
56 foreach (RadialGauge childControl
in this.Descendants<RadialGauge>())
63 foreach (T childControl
in this.Descendants<T>().Where(childControl => !String.IsNullOrEmpty(childControl.Text)))
68 private void ScanControlMainOnStartScanning()
70 for (
int i = 0; i < this.tabControlMain.TabPages.Count; i++)
72 if (this.tabControlMain.TabPages[i] !=
this.tabPageScan)
73 this.tabControlMain.TabPages[i].TabVisible =
false;
78 private void ScanControlMainOnStopScanning()
80 for (
int i = 0; i < this.tabControlMain.TabPages.Count; i++)
82 if (this.tabControlMain.TabPages[i] !=
this.tabPageScan)
83 this.tabControlMain.TabPages[i].TabVisible =
true;
92 private void tabControlMain_SelectedIndexChanged(
object sender, EventArgs e)
94 switch (this.tabControlMain.SelectedTab.Name)
97 this.manualControl.Stop();
98 this.configurationControl1.Stop();
100 this.scanControlMain.Start();
102 case "tabPageControl":
103 this.scanControlMain.Stop();
104 this.configurationControl1.Stop();
106 this.manualControl.Start();
108 case "tabPageConfiguration":
109 this.scanControlMain.Stop();
110 this.manualControl.Stop();
112 this.configurationControl1.Start();
Class for detecting an arduino and sending commands to it
SimpleScanMainForm(ArduinoCommands arduinoCommands)
Initializes a new instance of the SimpleScanMainForm class.
Class for creating a singleton for a generic class
static T Instance
Gets the instance.