2using System.Collections.Generic;
3using System.ComponentModel;
8using System.Threading.Tasks;
9using System.Windows.Forms;
13 public partial class Setup : Form
17 InitializeComponent();
27 private void okBut_Click(
object sender, EventArgs e)
29 if (imgPathBox.Text !=
"")
31 Properties.Settings.Default.AppPath = imgPathBox.Text;
33 else if(!pythonRadioBut.Checked)
35 if (libraryPathBox.Text !=
"" && libRadioBut.Checked)
37 Properties.Settings.Default.LibPath = libraryPathBox.Text;
39 Properties.Settings.Default.Setup =
true;
40 DialogResult = DialogResult.OK;
41 Properties.Settings.Default.Save();
49 private void cancelBut_Click(
object sender, EventArgs e)
51 DialogResult = DialogResult.Cancel;
60 private void pythonRadioBut_CheckedChanged(
object sender, EventArgs e)
62 Properties.Settings.Default.PMicroscope = pythonRadioBut.Checked;
63 Properties.Settings.Default.PycroManager =
false;
71 private void libRadioBut_CheckedChanged(
object sender, EventArgs e)
73 Properties.Settings.Default.PMicroscope =
false;
74 Properties.Settings.Default.PycroManager =
false;
84 private void setImagingBut_Click(
object sender, EventArgs e)
86 OpenFileDialog d =
new OpenFileDialog();
87 d.Title =
"Select Imaging Application Executable";
88 if (d.ShowDialog() != DialogResult.OK)
90 imgPathBox.Text = d.FileName;
100 private void setLibraryBut_Click(
object sender, EventArgs e)
102 OpenFileDialog d =
new OpenFileDialog();
103 d.Title =
"Select Imaging Library";
104 if (d.ShowDialog() != DialogResult.OK)
106 libraryPathBox.Text = d.FileName;
107 Properties.Settings.Default.PMicroscope =
false;
110 private void micromanRadioBut_CheckedChanged(
object sender, EventArgs e)
112 Properties.Settings.Default.PycroManager = micromanRadioBut.Checked;
113 Properties.Settings.Default.PMicroscope =
false;
114 if (micromanRadioBut.Checked)
115 imgPathBox.Text =
"C:/Program Files/Micro-Manager-2.0/ImageJ.exe";
System.Windows.Forms.Application Application