Skip to content

Commit a8ce04d

Browse files
committed
Cleaning up Windows Forms client (removing ResetDB and Start)
1 parent 97c8e72 commit a8ce04d

File tree

2 files changed

+43
-100
lines changed

2 files changed

+43
-100
lines changed

samples/applications/iot-smart-grid/WinFormsClient/FrmMain.Designer.cs

Lines changed: 43 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/applications/iot-smart-grid/WinFormsClient/FrmMain.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -96,25 +96,11 @@ private async void StartApp()
9696
this.stopTimer.Start();
9797
this.Stop.Enabled = true;
9898
this.Stop.Update();
99-
this.Start.Enabled = false;
100-
this.Start.Update();
101-
this.Reset.Enabled = false;
102-
this.Reset.Update();
103-
10499
this.dataGenerator.RunAsync();
105100
await Task.Delay(this.delayStart);
106101
this.rpsTimer.Start();
107102
}
108103
}
109-
private async void Start_Click(object sender, EventArgs e)
110-
{
111-
try
112-
{
113-
StartApp();
114-
}
115-
catch (Exception exception) { HandleException(exception); }
116-
}
117-
118104
private void StopApp()
119105
{
120106
if (dataGenerator.IsRunning)
@@ -127,10 +113,6 @@ private void StopApp()
127113
this.lblTasksValue.Text = "0";
128114
this.Stop.Enabled = false;
129115
this.Stop.Update();
130-
this.Start.Enabled = true;
131-
this.Start.Update();
132-
this.Reset.Enabled = true;
133-
this.Reset.Update();
134116

135117
this.dataGenerator.StopAsync();
136118
this.dataGenerator.RpsReset();
@@ -242,12 +224,6 @@ private void rpsTimer_Tick(object sender, EventArgs e)
242224
}
243225
catch (Exception exception) { HandleException(exception); }
244226
}
245-
246-
private void Reset_Click(object sender, EventArgs e)
247-
{
248-
ResetDb();
249-
}
250-
251227
private void ResetDb()
252228
{
253229
try

0 commit comments

Comments
 (0)