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
TextInput.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Threading.Tasks;
9using System.Windows.Forms;
10
11namespace BioImager
12{
13 public partial class TextInput : Form
14 {
15 string textValue = "";
16 public Font font = DefaultFont;
17 public Color color = Color.Yellow;
18 public string TextValue
19 {
20 get
21 {
22 return textValue;
23 }
24 }
25 public TextInput(string text)
26 {
27 InitializeComponent();
28 textBox.Text = text;
29 }
30
36 private void okBut_Click(object sender, EventArgs e)
37 {
38 textValue = textBox.Text;
39 DialogResult = DialogResult.OK;
40 }
41
46 private void cancelBut_Click(object sender, EventArgs e)
47 {
48 DialogResult=DialogResult.Cancel;
49 }
50
58 private void fontBut_Click(object sender, EventArgs e)
59 {
60 if (fontDialog.ShowDialog() != DialogResult.OK)
61 return;
62 font = fontDialog.Font;
63 }
64
72 private void colorBut_Click(object sender, EventArgs e)
73 {
74 if (colorDialog.ShowDialog() != DialogResult.OK)
75 return;
76 color = colorDialog.Color;
77 }
78 }
79}
AForge.Color Color
TextInput(string text)
Definition TextInput.cs:25