Little UI tweaks
This commit is contained in:
4
Test_Merge/Form1.Designer.cs
generated
4
Test_Merge/Form1.Designer.cs
generated
@@ -85,6 +85,7 @@
|
||||
//
|
||||
// btnStartDecoding
|
||||
//
|
||||
this.btnStartDecoding.Enabled = false;
|
||||
this.btnStartDecoding.Location = new System.Drawing.Point(6, 54);
|
||||
this.btnStartDecoding.Name = "btnStartDecoding";
|
||||
this.btnStartDecoding.Size = new System.Drawing.Size(127, 27);
|
||||
@@ -104,6 +105,7 @@
|
||||
//
|
||||
// btnStopUpdating
|
||||
//
|
||||
this.btnStopUpdating.Enabled = false;
|
||||
this.btnStopUpdating.Location = new System.Drawing.Point(153, 54);
|
||||
this.btnStopUpdating.Name = "btnStopUpdating";
|
||||
this.btnStopUpdating.Size = new System.Drawing.Size(128, 27);
|
||||
@@ -118,7 +120,7 @@
|
||||
this.btnResetEmulator.Name = "btnResetEmulator";
|
||||
this.btnResetEmulator.Size = new System.Drawing.Size(128, 27);
|
||||
this.btnResetEmulator.TabIndex = 5;
|
||||
this.btnResetEmulator.Text = "Reset";
|
||||
this.btnResetEmulator.Text = "Start driver";
|
||||
this.btnResetEmulator.UseVisualStyleBackColor = true;
|
||||
this.btnResetEmulator.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace Test_Merge
|
||||
if (Emulator != null && Wrapper != null)
|
||||
{
|
||||
// Disable UI controls to prevent re-entrancy
|
||||
btnResetEmulator.Enabled = false;
|
||||
btnStartDecoding.Enabled = false;
|
||||
btnStopUpdating.Enabled = true;
|
||||
btnSettings.Enabled = false;
|
||||
@@ -96,6 +97,11 @@ namespace Test_Merge
|
||||
Bitmap screen = Emulator.Screenshot();
|
||||
screen.Save("HopefullyDataScreenshot.png");
|
||||
|
||||
Invoke((MethodInvoker)delegate
|
||||
{
|
||||
pbxResult.Image = (Bitmap)screen.Clone();
|
||||
});
|
||||
|
||||
Wrapper.ChangeImage(screen);
|
||||
int errorCode = await Wrapper.Refresh();
|
||||
|
||||
@@ -113,8 +119,10 @@ namespace Test_Merge
|
||||
}
|
||||
}
|
||||
// Re-enable UI controls
|
||||
btnStopUpdating.Text = "Stop";
|
||||
btnStartDecoding.Enabled = true;
|
||||
btnStopUpdating.Enabled = false;
|
||||
btnResetEmulator.Enabled = true;
|
||||
btnSettings.Enabled = true;
|
||||
}
|
||||
}
|
||||
@@ -142,10 +150,14 @@ namespace Test_Merge
|
||||
{
|
||||
// Set the cancellation flag
|
||||
cancelRequested = true;
|
||||
btnStopUpdating.Enabled = false;
|
||||
btnResetEmulator.Enabled = false;
|
||||
btnStopUpdating.Text = "Stopping";
|
||||
}
|
||||
|
||||
private async void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnResetEmulator.Text = "Restart driver";
|
||||
btnResetEmulator.Enabled = false;
|
||||
btnSettings.Enabled = false;
|
||||
btnStartDecoding.Enabled = false;
|
||||
|
||||
Reference in New Issue
Block a user