Initialize Controls
You can write a new method to reset the controls and then call it in the method "Submit_Click".
private void Reset() { checkBox1.CheckState = CheckState.Unchecked; checkBox2.CheckState = CheckState.Unchecked; // ... textBox1.Text = string.Empty; textBox2.Text = string.Empty; // ... } private void Submit_Click(object sender, EventArgs e) { // any other operation, like saving/renaming a file Reset(); }
If you want to initialize all controls, you can use the following code to implement it.
private void Submit_Click(object sender, EventArgs e) { // any other operation, like saving/renaming a file Controls.Clear(); InitializeComponent(); }
把圈子变小,把语言变干净,把成绩往上提,把故事往心里收,现在想要的以后你都会有。