18 InitializeComponent();
19 panel.Controls.Add(view);
20 view.Dock = DockStyle.Fill;
22 foreach (System.Drawing.Imaging.PixelFormat p in (System.Drawing.Imaging.PixelFormat[])Enum.GetValues(typeof(System.Drawing.Imaging.PixelFormat)))
24 if (Properties.Settings.Default.PCameraFormat == p.ToString())
25 pxBox.SelectedItem = p.ToString();
28 funcsBox.SelectedIndex = 4;
30 private void filterWheelBox_TextChanged(
object sender, EventArgs e)
32 Properties.Settings.Default.PFilterWheel = filterWheelBox.Text;
35 private void stageBox_TextChanged(
object sender, EventArgs e)
37 Properties.Settings.Default.PStage = stageBox.Text;
40 private void editConfigBut_Click(
object sender, EventArgs e)
42 System.Diagnostics.Process.Start(
"notepad.exe",
Application.StartupPath +
"/PythonMicroscope/microscope/config.txt");
45 private void initBut_Click(
object sender, EventArgs e)
47 if(startBut.Text ==
"Start Server")
49 Microscope.pMicroscope.Initialize();
51 startBut.Text =
"Stop Server";
56 startBut.Text =
"Start Server";
61 private void funcsBox_SelectedIndexChanged(
object sender, EventArgs e)
63 view.TextBox.Text = System.IO.File.ReadAllText(
Application.StartupPath +
"/PythonMicroscope/microscope/" + funcsBox.SelectedItem.ToString());
66 private void saveBut_Click(
object sender, EventArgs e)
68 System.IO.File.WriteAllText(
Application.StartupPath +
"/PythonMicroscope/microscope/" + funcsBox.SelectedItem.ToString(), view.
TextBox.Text);
71 private void pxBox_SelectedIndexChanged(
object sender, EventArgs e)
73 Properties.Settings.Default.PCameraFormat = pxBox.Text;
74 Properties.Settings.Default.Save();
77 private void cameraBox_TextChanged(
object sender, EventArgs e)
79 Properties.Settings.Default.PStage = stageBox.Text;