refactor: 项目稳定性优化
This commit is contained in:
14
RestForm.cs
14
RestForm.cs
@@ -6,11 +6,11 @@ namespace TimerApp
|
||||
{
|
||||
public class RestForm : Form
|
||||
{
|
||||
private Label lblMessage;
|
||||
private Label lblTimer;
|
||||
private Button btnSkip;
|
||||
private Label lblMessage = null!;
|
||||
private Label lblTimer = null!;
|
||||
private Button btnSkip = null!;
|
||||
|
||||
public event EventHandler SkipRequested;
|
||||
public event EventHandler? SkipRequested;
|
||||
|
||||
public RestForm()
|
||||
{
|
||||
@@ -99,12 +99,12 @@ namespace TimerApp
|
||||
this.PerformLayout();
|
||||
}
|
||||
|
||||
private void RestForm_Load(object sender, EventArgs e)
|
||||
private void RestForm_Load(object? sender, EventArgs e)
|
||||
{
|
||||
CenterControls();
|
||||
}
|
||||
|
||||
private void RestForm_Resize(object sender, EventArgs e)
|
||||
private void RestForm_Resize(object? sender, EventArgs e)
|
||||
{
|
||||
CenterControls();
|
||||
}
|
||||
@@ -153,7 +153,7 @@ namespace TimerApp
|
||||
}
|
||||
}
|
||||
|
||||
private void btnSkip_Click(object sender, EventArgs e)
|
||||
private void btnSkip_Click(object? sender, EventArgs e)
|
||||
{
|
||||
SkipRequested?.Invoke(this, EventArgs.Empty);
|
||||
this.Close();
|
||||
|
||||
Reference in New Issue
Block a user