processing_form_template
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| processing_form_template [2009/09/23 04:59] – created stephen | processing_form_template [2017/01/01 20:05] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| public partial class ProcessingFormTemplate : Form | public partial class ProcessingFormTemplate : Form | ||
| { | { | ||
| - | private const string | + | private const string |
| - | private const string | + | private const string |
| private Processor _processor; | private Processor _processor; | ||
| Line 40: | Line 40: | ||
| switch (buttonStartStopProcessing.Text) | switch (buttonStartStopProcessing.Text) | ||
| { | { | ||
| - | case | + | case |
| UpdateUIForStartStopProcessing(true); | UpdateUIForStartStopProcessing(true); | ||
| StartProcessing(); | StartProcessing(); | ||
| break; | break; | ||
| - | case | + | case |
| UpdateUIForStartStopProcessing(false); | UpdateUIForStartStopProcessing(false); | ||
| StopProcessing(); | StopProcessing(); | ||
| Line 89: | Line 89: | ||
| else | else | ||
| { | { | ||
| - | buttonStartStopProcessing.Text = IsProcessing | + | foreach (Control control in this.Controls) |
| - | checkBoxSomeOption.Enabled | + | { |
| + | if (control != buttonStartStopProcessing) | ||
| + | control.Enabled | ||
| + | } | ||
| + | |||
| + | buttonStartStopProcessing.Text = IsProcessing | ||
| } | } | ||
| } | } | ||
| Line 120: | Line 125: | ||
| else | else | ||
| { | { | ||
| - | this.textBoxMessageLog.Text += | + | StringBuilder fullMessage |
| - | DateTime.Now.ToShortDateString() | + | fullMessage.Append(DateTime.Now.ToShortDateString()); |
| - | DateTime.Now.ToString(timeFormat, | + | fullMessage.Append(" "); |
| - | message + Environment.NewLine; | + | fullMessage.Append(DateTime.Now.ToString(timeFormat, |
| - | this.textBoxMessageLog.SelectionStart = this.textBoxMessageLog.Text.Length; | + | fullMessage.Append(message); |
| - | this.textBoxMessageLog.ScrollToCaret(); | + | fullMessage.Append(Environment.NewLine); |
| + | |||
| + | this.textBoxMessageLog.AppendText(fullMessage.ToString()); | ||
| } | } | ||
| } | } | ||
| Line 226: | Line 233: | ||
| </ | </ | ||
| - | {{tag> | + | {{tag> |
processing_form_template.1253681970.txt.gz · Last modified: 2017/01/01 19:51 (external edit)
