BioCore  5.0.0
A Windows .NET microscopy library and application for viewing, editing, and annotating images.
Loading...
Searching...
No Matches
TextInput.cs
Go to the documentation of this file.
1namespace BioCore
2{
3 public partial class TextInput : Form
4 {
5 string textValue = "";
6 public Font font = DefaultFont;
7 public Color color = Color.Yellow;
8 public string TextValue
9 {
10 get
11 {
12 return textValue;
13 }
14 }
15 /* A constructor. */
16 public TextInput(string text)
17 {
18 InitializeComponent();
19 textBox.Text = text;
20 }
21
27 private void okBut_Click(object sender, EventArgs e)
28 {
29 textValue = textBox.Text;
30 DialogResult = DialogResult.OK;
31 }
32
38 private void cancelBut_Click(object sender, EventArgs e)
39 {
40 DialogResult = DialogResult.Cancel;
41 }
42
50 private void fontBut_Click(object sender, EventArgs e)
51 {
52 if (fontDialog.ShowDialog() != DialogResult.OK)
53 return;
54 font = fontDialog.Font;
55 }
56
64 private void colorBut_Click(object sender, EventArgs e)
65 {
66 if (colorDialog.ShowDialog() != DialogResult.OK)
67 return;
68 color = colorDialog.Color;
69 }
70 }
71}
System.Drawing.Color Color
TextInput(string text)
Definition TextInput.cs:16