진행률 표시 줄을로드하는 동안로드하는 동안 취소 단추를 누르면 전체 응용 프로그램이 무엇을 하던지 중단합니다.진행률 표시 줄에서 취소 버튼을 누르면 프로그램을 멈추는 방법 C#
아래 코드는 진행률 표시 줄을 호출하는 코드입니다. 나는 누군가가 이것으로 도울 수 있을지 궁금해하고 있었다?
Loading loader = new Loading();
private void lockButton_Click(object sender, EventArgs e)
{
if (this.ddCheckBox.Checked == false)
{
if (this.passwordtextBox.Text == "")
{
MessageBox.Show("Please enter a password!");
}
else if (this.retypeTextBox.Text == "")
{
MessageBox.Show("Please retype password!");
}
else if (this.passwordtextBox.Text == this.retypeTextBox.Text)
{
//details = new Details();
details.SetPassword(this.passwordtextBox.Text);
if (this.EncryptionComboBox.Text == "AES - 128 bit" | this.EncryptionComboBox.Text == "AES - 192 bit" | this.EncryptionComboBox.Text == "AES - 256 bit")
{
this.Hide();
Thread thread = null;
thread = new Thread(new ThreadStart(delegate() { loader.dLabel.Text = "Locking Files..."; loader.ShowDialog(); }));
thread.Start();
details.SetEncryption(this.EncryptionComboBox.Text);
한 합의. 배경 작업자에게는 바로 취소 할 수있는 조항이 있습니다. –