Changeset 14 for Common/Prompt.cs
- Timestamp:
- Aug 2, 2022, 11:46:25 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Prompt.cs
r13 r14 1 1 using System; 2 using System.Collections.Generic;3 using System.Linq;4 using System.Text;5 2 using System.IO; 6 using System.Threading.Tasks;7 3 using System.Drawing; 8 4 using System.Windows.Forms; … … 25 21 TextBox textBox = new TextBox() { Left = 50, Top = 44, Width = 400, Text = initialValue }; 26 22 textBox.SelectAll(); 27 Button confirmation = new Button() { Text = "Ok", Left = 350, Width = 100, Top = 70, DialogResult = DialogResult.OK };23 Button confirmation = new Button() { Text = @"Ok", Left = 350, Width = 100, Top = 70, DialogResult = DialogResult.OK }; 28 24 confirmation.Click += (sender, e) => { prompt.Close(); }; 29 25 prompt.Controls.Add(textBox); … … 31 27 prompt.Controls.Add(textLabel); 32 28 prompt.AcceptButton = confirmation; 33 prompt.Load += delegate (object sender3, EventArgs e3)29 prompt.Load += delegate 34 30 { 35 31 Theme.UseTheme(prompt); … … 71 67 }; 72 68 numericUpDown.Select(0, numericUpDown.Text.Length); 73 Button confirmation = new Button() { Text = "Ok", Left = 350, Width = 100, Top = 70, DialogResult = DialogResult.OK };69 Button confirmation = new Button() { Text = @"Ok", Left = 350, Width = 100, Top = 70, DialogResult = DialogResult.OK }; 74 70 confirmation.Click += (sender, e) => { prompt.Close(); }; 75 71 prompt.Controls.Add(numericUpDown); … … 77 73 prompt.Controls.Add(textLabel); 78 74 prompt.AcceptButton = confirmation; 79 prompt.Load += delegate (object sender3, EventArgs e3)75 prompt.Load += delegate 80 76 { 81 77 Theme.UseTheme(prompt); … … 117 113 comboBox.SelectedIndex = 0; 118 114 } 119 Button confirmation = new Button() { Text = "Ok", Left = 350, Width = 100, Top = 70, DialogResult = DialogResult.OK };115 Button confirmation = new Button() { Text = @"Ok", Left = 350, Width = 100, Top = 70, DialogResult = DialogResult.OK }; 120 116 confirmation.Click += (sender, e) => { prompt.Close(); }; 121 117 prompt.Controls.Add(comboBox); … … 123 119 prompt.Controls.Add(textLabel); 124 120 prompt.AcceptButton = confirmation; 125 prompt.Load += delegate (object sender3, EventArgs e3)121 prompt.Load += delegate 126 122 { 127 123 Theme.UseTheme(prompt); … … 155 151 Button confirmation = new Button() 156 152 { 157 Text = "Ok",153 Text = @"Ok", 158 154 Left = 350, 159 155 Width = 100, … … 193 189 prompt.Controls.Add(textLabel); 194 190 prompt.AcceptButton = confirmation; 195 prompt.Load += delegate (object sender3, EventArgs e3)191 prompt.Load += delegate 196 192 { 197 193 Theme.UseTheme(prompt); … … 224 220 Label textLabel = new Label() { Left = 50, Top = 20, AutoSize = true, Text = text }; 225 221 RichTextBox textBox = new RichTextBox() { Left = 50, Top = 44, Width = 400, Height = dataSize, Text = initialValue }; 222 textBox.TextChanged += delegate 223 { 224 Theme.UseTheme(prompt); 225 }; 226 226 textBox.SelectAll(); 227 Button confirmation = new Button() { Text = "Ok", Left = 350, Width = 100, Top = dataSize + 70, DialogResult = DialogResult.OK };227 Button confirmation = new Button() { Text = @"Ok", Left = 350, Width = 100, Top = dataSize + 70, DialogResult = DialogResult.OK }; 228 228 confirmation.Click += (sender, e) => { prompt.Close(); }; 229 229 prompt.Controls.Add(textBox); … … 231 231 prompt.Controls.Add(textLabel); 232 232 prompt.AcceptButton = confirmation; 233 prompt.Load += delegate (object sender3, EventArgs e3)233 prompt.Load += delegate 234 234 { 235 235 Theme.UseTheme(prompt); … … 260 260 { 261 261 result = fileName; 262 OpenFileDialog openFileDialog = new OpenFileDialog() { Filter = fileType + " (." + fileExtension + ")|*." +263 fileExtension + "|Any file|*.*", DefaultExt = fileExtension };262 OpenFileDialog openFileDialog = new OpenFileDialog() { Filter = fileType + @"|*." + 263 fileExtension + @"|Any file|*.*", DefaultExt = fileExtension }; 264 264 if (!string.IsNullOrEmpty(fileName)) 265 265 { … … 282 282 { 283 283 result = fileName; 284 SaveFileDialog saveFileDialog = new SaveFileDialog ()285 { 286 Filter = fileType + "|*." +287 fileExtension + "|Any file|*.*",284 SaveFileDialog saveFileDialog = new SaveFileDialog 285 { 286 Filter = fileType + @"|*." + 287 fileExtension + @"|Any file|*.*", 288 288 DefaultExt = fileExtension 289 289 };
Note:
See TracChangeset
for help on using the changeset viewer.