BioImager  5.0.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
Loading...
Searching...
No Matches
MicroscopeSetup.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2using System;
3using System.Collections.Generic;
4using System.ComponentModel;
5using System.Data;
6using System.Drawing;
7using System.Linq;
8using System.Text;
9using System.IO;
10using System.Threading.Tasks;
11using System.Windows.Forms;
12using System.Reflection;
13using System.Diagnostics;
14using System.Collections;
15using System.Configuration;
16using BioLib;
17namespace BioImager
18{
19 public partial class MicroscopeSetup : Form
20 {
21 public static BioImage simImage = null;
23 {
24 InitializeComponent();
25 if (!System.IO.Directory.Exists(Application.StartupPath + "//" + "Config"))
26 System.IO.Directory.CreateDirectory(Application.StartupPath + "//" + "Config");
27 Objectives_Load();
28
29 simCameraBox.Checked = Properties.Settings.Default.SimulateCamera;
30 if (simCameraBox.Checked)
31 {
32 imageLabel.Text = Properties.Settings.Default.SimulatedImage;
33 if(File.Exists(Properties.Settings.Default.SimulatedImage))
34 simImage = BioImage.OpenFile(Properties.Settings.Default.SimulatedImage).Result;
35 }
36 }
37 private void Objectives_Load()
38 {
39 string st = Application.StartupPath + "/Config/MicroscopeObjectives.json";
40 if (File.Exists(st))
41 {
42 List<Objectives.Objective> list = JsonConvert.DeserializeObject<List<Objectives.Objective>>(File.ReadAllText(st));
43 if (list.Count == 0)
44 {
45 //We initialize with default values.
46 UpdateObjectives();
47 }
48 objectiveA1Box.Value = (decimal)list[0].AcquisitionExposure;
49 objectiveA2Box.Value = (decimal)list[1].AcquisitionExposure;
50 objectiveA3Box.Value = (decimal)list[2].AcquisitionExposure;
51 objectiveA4Box.Value = (decimal)list[3].AcquisitionExposure;
52 objectiveA5Box.Value = (decimal)list[4].AcquisitionExposure;
53 objectiveA6Box.Value = (decimal)list[5].AcquisitionExposure;
54 if (Microscope.Objectives.List.Count == 7)
55 objectiveA7Box.Value = (decimal)list[6].AcquisitionExposure;
56
57 objectiveL1Box.Value = (decimal)list[0].LocateExposure;
58 objectiveL2Box.Value = (decimal)list[1].LocateExposure;
59 objectiveL3Box.Value = (decimal)list[2].LocateExposure;
60 objectiveL4Box.Value = (decimal)list[3].LocateExposure;
61 objectiveL5Box.Value = (decimal)list[4].LocateExposure;
62 objectiveL6Box.Value = (decimal)list[5].LocateExposure;
63 if (Microscope.Objectives.List.Count == 7)
64 objectiveL7Box.Value = (decimal)list[6].LocateExposure;
65
66 Obj1LMove.Value = (decimal)list[0].MoveAmountL;
67 Obj2LMove.Value = (decimal)list[1].MoveAmountL;
68 Obj3LMove.Value = (decimal)list[2].MoveAmountL;
69 Obj4LMove.Value = (decimal)list[3].MoveAmountL;
70 Obj5LMove.Value = (decimal)list[4].MoveAmountL;
71 Obj6LMove.Value = (decimal)list[5].MoveAmountL;
72 if (Microscope.Objectives.List.Count == 7)
73 Obj7LMove.Value = (decimal)list[6].MoveAmountL;
74
75 Obj1RMove.Value = (decimal)list[0].MoveAmountR;
76 Obj2RMove.Value = (decimal)list[1].MoveAmountR;
77 Obj3RMove.Value = (decimal)list[2].MoveAmountR;
78 Obj4RMove.Value = (decimal)list[3].MoveAmountR;
79 Obj5RMove.Value = (decimal)list[4].MoveAmountR;
80 Obj6RMove.Value = (decimal)list[5].MoveAmountR;
81 if (Microscope.Objectives.List.Count == 7)
82 Obj7RMove.Value = (decimal)list[6].MoveAmountR;
83
84 Obj1Focus.Value = (decimal)list[0].FocusMoveAmount;
85 Obj2Focus.Value = (decimal)list[1].FocusMoveAmount;
86 Obj3Focus.Value = (decimal)list[2].FocusMoveAmount;
87 Obj4Focus.Value = (decimal)list[3].FocusMoveAmount;
88 Obj5Focus.Value = (decimal)list[4].FocusMoveAmount;
89 Obj6Focus.Value = (decimal)list[5].FocusMoveAmount;
90 if (Microscope.Objectives.List.Count == 7)
91 Obj7Focus.Value = (decimal)list[6].FocusMoveAmount;
92
93
94 Obj1Width.Value = (decimal)list[0].ViewWidth;
95 Obj2Width.Value = (decimal)list[1].ViewWidth;
96 Obj3Width.Value = (decimal)list[2].ViewWidth;
97 Obj4Width.Value = (decimal)list[3].ViewWidth;
98 Obj5Width.Value = (decimal)list[4].ViewWidth;
99 Obj6Width.Value = (decimal)list[5].ViewWidth;
100 if (Microscope.Objectives.List.Count == 7)
101 Obj7Width.Value = (decimal)list[6].ViewWidth;
102
103 Obj1Height.Value = (decimal)list[0].ViewHeight;
104 Obj2Height.Value = (decimal)list[1].ViewHeight;
105 Obj3Height.Value = (decimal)list[2].ViewHeight;
106 Obj4Height.Value = (decimal)list[3].ViewHeight;
107 Obj5Height.Value = (decimal)list[4].ViewHeight;
108 Obj6Height.Value = (decimal)list[5].ViewHeight;
109 if (Microscope.Objectives.List.Count == 7)
110 Obj7Height.Value = (decimal)list[6].ViewHeight;
111 }
112 UpdateObjectives();
113 //If setup not run we run it.
114 if(Properties.Settings.Default.Setup)
115 {
116 this.Show();
117 Properties.Settings.Default.Setup = false;
118 }
119 }
120
121 private void objectiveA1Box_ValueChanged(object sender, EventArgs e)
122 {
123 Microscope.Objectives.List[0].AcquisitionExposure = (int)objectiveA1Box.Value;
124 }
125 private void objectiveA2Box_ValueChanged(object sender, EventArgs e)
126 {
127 Microscope.Objectives.List[1].AcquisitionExposure = (int)objectiveA2Box.Value;
128 }
129 private void objectiveA3Box_ValueChanged(object sender, EventArgs e)
130 {
131 Microscope.Objectives.List[2].AcquisitionExposure = (int)objectiveA3Box.Value;
132 }
133 private void objectiveA4Box_ValueChanged(object sender, EventArgs e)
134 {
135 Microscope.Objectives.List[3].AcquisitionExposure = (int)objectiveA4Box.Value;
136 }
137 private void objectiveA5Box_ValueChanged(object sender, EventArgs e)
138 {
139 Microscope.Objectives.List[4].AcquisitionExposure = (int)objectiveA5Box.Value;
140 }
141 private void objectiveA6Box_ValueChanged(object sender, EventArgs e)
142 {
143 Microscope.Objectives.List[5].AcquisitionExposure = (int)objectiveA6Box.Value;
144 }
145 private void objectiveA7Box_ValueChanged(object sender, EventArgs e)
146 {
147 Microscope.Objectives.List[6].AcquisitionExposure = (int)objectiveA7Box.Value;
148 }
149 private void objectiveL1Box_ValueChanged(object sender, EventArgs e)
150 {
151 Microscope.Objectives.List[0].LocateExposure = (int)objectiveL1Box.Value;
152 }
153 private void objectiveL2Box_ValueChanged(object sender, EventArgs e)
154 {
155 Microscope.Objectives.List[1].LocateExposure = (int)objectiveL2Box.Value;
156 }
157 private void objectiveL3Box_ValueChanged(object sender, EventArgs e)
158 {
159 Microscope.Objectives.List[2].LocateExposure = (int)objectiveL3Box.Value;
160 }
161 private void objectiveL4Box_ValueChanged(object sender, EventArgs e)
162 {
163 Microscope.Objectives.List[3].LocateExposure = (int)objectiveL4Box.Value;
164 }
165 private void objectiveL5Box_ValueChanged(object sender, EventArgs e)
166 {
167 Microscope.Objectives.List[4].LocateExposure = (int)objectiveL5Box.Value;
168 }
169 private void objectiveL6Box_ValueChanged(object sender, EventArgs e)
170 {
171 Microscope.Objectives.List[5].LocateExposure = (int)objectiveL6Box.Value;
172 }
173 private void objectiveL7Box_ValueChanged(object sender, EventArgs e)
174 {
175 Microscope.Objectives.List[6].LocateExposure = (int)objectiveL7Box.Value;
176 }
177 private void Obj1RMove_ValueChanged(object sender, EventArgs e)
178 {
179 Microscope.Objectives.List[0].MoveAmountR = (double)Obj1RMove.Value;
180 }
181 private void Obj2RMove_ValueChanged(object sender, EventArgs e)
182 {
183 Microscope.Objectives.List[1].MoveAmountR = (double)Obj2RMove.Value;
184 }
185 private void Obj3RMove_ValueChanged(object sender, EventArgs e)
186 {
187 Microscope.Objectives.List[2].MoveAmountR = (double)Obj3RMove.Value;
188 }
189 private void Obj4RMove_ValueChanged(object sender, EventArgs e)
190 {
191 Microscope.Objectives.List[3].MoveAmountR = (double)Obj4RMove.Value;
192 }
193 private void Obj5RMove_ValueChanged(object sender, EventArgs e)
194 {
195 Microscope.Objectives.List[4].MoveAmountR = (double)Obj5RMove.Value;
196 }
197 private void Obj6RMove_ValueChanged(object sender, EventArgs e)
198 {
199 Microscope.Objectives.List[5].MoveAmountR = (double)Obj6RMove.Value;
200 }
201 private void Obj7RMove_ValueChanged(object sender, EventArgs e)
202 {
203 Microscope.Objectives.List[6].MoveAmountR = (double)Obj7RMove.Value;
204 }
205 private void Obj1LMove_ValueChanged(object sender, EventArgs e)
206 {
207 Microscope.Objectives.List[0].MoveAmountL = (double)Obj1LMove.Value;
208 }
209 private void Obj2LMove_ValueChanged(object sender, EventArgs e)
210 {
211 Microscope.Objectives.List[1].MoveAmountL = (double)Obj2LMove.Value;
212 }
213 private void Obj3LMove_ValueChanged(object sender, EventArgs e)
214 {
215 Microscope.Objectives.List[2].MoveAmountL = (double)Obj3LMove.Value;
216 }
217 private void Obj4LMove_ValueChanged(object sender, EventArgs e)
218 {
219 Microscope.Objectives.List[3].MoveAmountL = (double)Obj4LMove.Value;
220 }
221 private void Obj5LMove_ValueChanged(object sender, EventArgs e)
222 {
223 Microscope.Objectives.List[4].MoveAmountL = (double)Obj5LMove.Value;
224 }
225 private void Obj6LMove_ValueChanged(object sender, EventArgs e)
226 {
227 Microscope.Objectives.List[5].MoveAmountL = (double)Obj6LMove.Value;
228 }
229 private void Obj7LMove_ValueChanged(object sender, EventArgs e)
230 {
231 Microscope.Objectives.List[6].MoveAmountL = (double)Obj7LMove.Value;
232 }
233 private void Obj1Focus_ValueChanged(object sender, EventArgs e)
234 {
235 Microscope.Objectives.List[0].FocusMoveAmount = (double)Obj1Focus.Value;
236 }
237 private void Obj2Focus_ValueChanged(object sender, EventArgs e)
238 {
239 Microscope.Objectives.List[1].FocusMoveAmount = (double)Obj2Focus.Value;
240 }
241 private void Obj3Focus_ValueChanged(object sender, EventArgs e)
242 {
243 Microscope.Objectives.List[2].FocusMoveAmount = (double)Obj3Focus.Value;
244 }
245 private void Obj4Focus_ValueChanged(object sender, EventArgs e)
246 {
247 Microscope.Objectives.List[3].FocusMoveAmount = (double)Obj4Focus.Value;
248 }
249 private void Obj5Focus_ValueChanged(object sender, EventArgs e)
250 {
251 Microscope.Objectives.List[4].FocusMoveAmount = (double)Obj5Focus.Value;
252 }
253 private void Obj6Focus_ValueChanged(object sender, EventArgs e)
254 {
255 Microscope.Objectives.List[5].FocusMoveAmount = (double)Obj6Focus.Value;
256 }
257 private void Obj7Focus_ValueChanged(object sender, EventArgs e)
258 {
259 Microscope.Objectives.List[6].FocusMoveAmount = (double)Obj7Focus.Value;
260 }
261 private void Obj1Width_ValueChanged(object sender, EventArgs e)
262 {
263 Microscope.Objectives.List[0].ViewWidth = (double)Obj1Width.Value;
264 }
265 private void Obj2Width_ValueChanged(object sender, EventArgs e)
266 {
267 Microscope.Objectives.List[1].ViewWidth = (double)Obj2Width.Value;
268 }
269 private void Obj3Width_ValueChanged(object sender, EventArgs e)
270 {
271 Microscope.Objectives.List[2].ViewWidth = (double)Obj3Width.Value;
272 }
273 private void Obj4Width_ValueChanged(object sender, EventArgs e)
274 {
275 Microscope.Objectives.List[3].ViewWidth = (double)Obj4Width.Value;
276 }
277 private void Obj5Width_ValueChanged(object sender, EventArgs e)
278 {
279 Microscope.Objectives.List[4].ViewWidth = (double)Obj5Width.Value;
280 }
281 private void Obj6Width_ValueChanged(object sender, EventArgs e)
282 {
283 Microscope.Objectives.List[5].ViewWidth = (double)Obj6Width.Value;
284 }
285 private void Obj7Width_ValueChanged(object sender, EventArgs e)
286 {
287 Microscope.Objectives.List[6].ViewWidth = (double)Obj7Width.Value;
288 }
289 private void Obj1Height_ValueChanged(object sender, EventArgs e)
290 {
291 Microscope.Objectives.List[0].ViewHeight = (double)Obj1Height.Value;
292 }
293 private void Obj2Height_ValueChanged(object sender, EventArgs e)
294 {
295 Microscope.Objectives.List[1].ViewHeight = (double)Obj2Height.Value;
296 }
297 private void Obj3Height_ValueChanged(object sender, EventArgs e)
298 {
299 Microscope.Objectives.List[2].ViewHeight = (double)Obj3Height.Value;
300 }
301 private void Obj4Height_ValueChanged(object sender, EventArgs e)
302 {
303 Microscope.Objectives.List[3].ViewHeight = (double)Obj4Height.Value;
304 }
305 private void Obj5Height_ValueChanged(object sender, EventArgs e)
306 {
307 Microscope.Objectives.List[4].ViewHeight = (double)Obj5Height.Value;
308 }
309 private void Obj6Height_ValueChanged(object sender, EventArgs e)
310 {
311 Microscope.Objectives.List[5].ViewHeight = (double)Obj6Height.Value;
312 }
313 private void Obj7Height_ValueChanged(object sender, EventArgs e)
314 {
315 Microscope.Objectives.List[6].ViewHeight = (double)Obj7Height.Value;
316 }
317 private void obj1Name_TextChanged(object sender, EventArgs e)
318 {
319 Microscope.Objectives.List[0].Name = obj1Name.Text;
320 }
321 private void obj2Name_TextChanged(object sender, EventArgs e)
322 {
323 Microscope.Objectives.List[1].Name = obj2Name.Text;
324 }
325 private void obj3Name_TextChanged(object sender, EventArgs e)
326 {
327 Microscope.Objectives.List[2].Name = obj3Name.Text;
328 }
329 private void obj4Name_TextChanged(object sender, EventArgs e)
330 {
331 Microscope.Objectives.List[3].Name = obj4Name.Text;
332 }
333 private void obj5Name_TextChanged(object sender, EventArgs e)
334 {
335 Microscope.Objectives.List[4].Name = obj5Name.Text;
336 }
337 private void obj6Name_TextChanged(object sender, EventArgs e)
338 {
339 Microscope.Objectives.List[5].Name = obj6Name.Text;
340 }
341 private void obj7Name_TextChanged(object sender, EventArgs e)
342 {
343 Microscope.Objectives.List[6].Name = obj7Name.Text;
344 }
345
346 private void UpdateObjectives()
347 {
348
349 Microscope.Objectives.List[0].Name = obj1Name.Text;
350 Microscope.Objectives.List[1].Name = obj2Name.Text;
351 Microscope.Objectives.List[2].Name = obj3Name.Text;
352 Microscope.Objectives.List[3].Name = obj4Name.Text;
353 Microscope.Objectives.List[4].Name = obj5Name.Text;
354 Microscope.Objectives.List[5].Name = obj6Name.Text;
355 if (Microscope.Objectives.List.Count == 7)
356 Microscope.Objectives.List[6].Name = obj7Name.Text;
357
358 Microscope.Objectives.List[0].AcquisitionExposure = (double)objectiveA1Box.Value;
359 Microscope.Objectives.List[1].AcquisitionExposure = (double)objectiveA2Box.Value;
360 Microscope.Objectives.List[2].AcquisitionExposure = (double)objectiveA3Box.Value;
361 Microscope.Objectives.List[3].AcquisitionExposure = (double)objectiveA4Box.Value;
362 Microscope.Objectives.List[4].AcquisitionExposure = (double)objectiveA5Box.Value;
363 Microscope.Objectives.List[5].AcquisitionExposure = (double)objectiveA6Box.Value;
364
365 Microscope.Objectives.List[0].LocateExposure = (double)objectiveL1Box.Value;
366 Microscope.Objectives.List[1].LocateExposure = (double)objectiveL2Box.Value;
367 Microscope.Objectives.List[2].LocateExposure = (double)objectiveL3Box.Value;
368 Microscope.Objectives.List[3].LocateExposure = (double)objectiveL4Box.Value;
369 Microscope.Objectives.List[4].LocateExposure = (double)objectiveL5Box.Value;
370 Microscope.Objectives.List[5].LocateExposure = (double)objectiveL6Box.Value;
371 if (Microscope.Objectives.List.Count == 7)
372 Microscope.Objectives.List[6].LocateExposure = (double)objectiveL7Box.Value;
373
374 Microscope.Objectives.List[0].ViewWidth = (double)Obj1Width.Value;
375 Microscope.Objectives.List[1].ViewWidth = (double)Obj2Width.Value;
376 Microscope.Objectives.List[2].ViewWidth = (double)Obj3Width.Value;
377 Microscope.Objectives.List[3].ViewWidth = (double)Obj4Width.Value;
378 Microscope.Objectives.List[4].ViewWidth = (double)Obj5Width.Value;
379 Microscope.Objectives.List[5].ViewWidth = (double)Obj6Width.Value;
380 if (Microscope.Objectives.List.Count == 7)
381 Microscope.Objectives.List[6].ViewWidth = (double)Obj7Width.Value;
382
383 Microscope.Objectives.List[0].ViewHeight = (double)Obj1Height.Value;
384 Microscope.Objectives.List[1].ViewHeight = (double)Obj2Height.Value;
385 Microscope.Objectives.List[2].ViewHeight = (double)Obj3Height.Value;
386 Microscope.Objectives.List[3].ViewHeight = (double)Obj4Height.Value;
387 Microscope.Objectives.List[4].ViewHeight = (double)Obj5Height.Value;
388 Microscope.Objectives.List[5].ViewHeight = (double)Obj6Height.Value;
389 if (Microscope.Objectives.List.Count == 7)
390 Microscope.Objectives.List[6].ViewWidth = (double)Obj7Width.Value;
391
392 Microscope.Objectives.List[0].MoveAmountL = (double)Obj1LMove.Value;
393 Microscope.Objectives.List[1].MoveAmountL = (double)Obj2LMove.Value;
394 Microscope.Objectives.List[2].MoveAmountL = (double)Obj3LMove.Value;
395 Microscope.Objectives.List[3].MoveAmountL = (double)Obj4LMove.Value;
396 Microscope.Objectives.List[4].MoveAmountL = (double)Obj5LMove.Value;
397 Microscope.Objectives.List[5].MoveAmountL = (double)Obj6LMove.Value;
398 if (Microscope.Objectives.List.Count == 7)
399 Microscope.Objectives.List[5].MoveAmountL = (double)Obj6LMove.Value;
400
401 Microscope.Objectives.List[0].MoveAmountR = (double)Obj1RMove.Value;
402 Microscope.Objectives.List[1].MoveAmountR = (double)Obj2RMove.Value;
403 Microscope.Objectives.List[2].MoveAmountR = (double)Obj3RMove.Value;
404 Microscope.Objectives.List[3].MoveAmountR = (double)Obj4RMove.Value;
405 Microscope.Objectives.List[4].MoveAmountR = (double)Obj5RMove.Value;
406 Microscope.Objectives.List[5].MoveAmountR = (double)Obj6RMove.Value;
407 if (Microscope.Objectives.List.Count == 7)
408 Microscope.Objectives.List[5].MoveAmountR = (double)Obj6RMove.Value;
409
410 Microscope.Objectives.List[0].FocusMoveAmount = (double)Obj1Focus.Value;
411 Microscope.Objectives.List[1].FocusMoveAmount = (double)Obj2Focus.Value;
412 Microscope.Objectives.List[2].FocusMoveAmount = (double)Obj3Focus.Value;
413 Microscope.Objectives.List[3].FocusMoveAmount = (double)Obj4Focus.Value;
414 Microscope.Objectives.List[4].FocusMoveAmount = (double)Obj5Focus.Value;
415 Microscope.Objectives.List[5].FocusMoveAmount = (double)Obj6Focus.Value;
416 if (Microscope.Objectives.List.Count == 7)
417 Microscope.Objectives.List[6].FocusMoveAmount = (double)Obj7Focus.Value;
418 }
419 private void MicroscopeSetup_FormClosing(object sender, FormClosingEventArgs e)
420 {
421 string j = JsonConvert.SerializeObject(Microscope.Objectives.List, Formatting.None);
422 System.IO.File.WriteAllText(Application.StartupPath + "/Config/MicroscopeObjectives.json", j);
423 Properties.Settings.Default.Save();
424 e.Cancel = true;
425 this.Hide();
426 UpdateObjectives();
427 }
428
429 private async void setImageBut_Click(object sender, EventArgs e)
430 {
431 if (openFileDialog.ShowDialog() != DialogResult.OK)
432 return;
433 Properties.Settings.Default.SimulatedImage = openFileDialog.FileName;
434 Properties.Settings.Default.Save();
435 simImage = await BioImage.OpenFile(openFileDialog.FileName);
436 }
437
438 private void simCameraBox_CheckedChanged(object sender, EventArgs e)
439 {
440 Properties.Settings.Default.SimulateCamera = simCameraBox.Checked;
441 }
442 public static bool SettingExist(string settingName)
443 {
444 return Properties.Settings.Default.Properties.Cast<SettingsProperty>().Any(prop => prop.Name == settingName);
445 }
446
447 private void SetGetProperty(object sender, EventArgs e)
448 {
449 string name = (string)((Button)sender).Tag;
450 Function f;
451 if (Function.Functions.ContainsKey(name))
452 {
453 f = Function.Functions[name];
454 }
455 else
456 {
457 f = new Function();
458 f.Name = name;
459 }
460 FunctionForm form = new FunctionForm(f);
461 if (form.ShowDialog() != DialogResult.OK)
462 return;
463 if (!SettingExist(name))
464 {
465 SettingsProperty sp = new SettingsProperty(name);
466 sp.DefaultValue = form.Func.Serialize();
467 sp.Name = name;
468 Properties.Settings.Default.Properties.Add(sp);
469 }
470 else
471 {
472 Properties.Settings.Default[name] = form.Func.Serialize();
473 }
474 form.Dispose();
475 }
476
477 private void SetProperty(object sender, EventArgs e)
478 {
479 string name = (string)((Button)sender).Tag;
480 Function f;
481 if (Function.Functions.ContainsKey(name))
482 {
483 f = Function.Functions[name];
484 }
485 else
486 {
487 f = new Function();
488 f.Name = name;
489 }
490 FunctionForm form = new FunctionForm(f);
491 if (form.ShowDialog() != DialogResult.OK)
492 return;
493 if (!SettingExist(f.Name))
494 {
495 SettingsProperty sp = new SettingsProperty(name);
496 sp.DefaultValue = form.Func.Serialize();
497 sp.Name = name;
498 Properties.Settings.Default.Properties.Add(sp);
499 }
500 else
501 Properties.Settings.Default[name] = form.Func.Serialize();
502 form.Dispose();
503 }
504
505 private void useLibBox_CheckedChanged(object sender, EventArgs e)
506 {
507
508 }
509
510 private void setLibBut_Click(object sender, EventArgs e)
511 {
512 App.lib.Show();
513 }
514
515 private void pythonMicroscopeBut_Click(object sender, EventArgs e)
516 {
517 PythonMicroscope.MicroscopeSetup pm = new PythonMicroscope.MicroscopeSetup();
518 pm.Show();
519 }
520 }
521}
System.Windows.Forms.Application Application
Definition ImageView.cs:14
BioLib.BioImage BioImage
Definition TabsView.cs:15
static Dictionary< string, Function > Functions
static bool SettingExist(string settingName)