public void RegisterView_Closed(object sender, EventArgs e) { if (SoftReg.IsRegistered()) { MessageBox.Show("注册成功"); } else { Application.Current.Shutdown(); } }
private void IsRegistered() { if (SoftReg.IsRegistered()) { this.IsEnable = true; Start(); } else { this.IsEnable = false; Task t = Task.Run(new Action(SendEmail)); t.ContinueWith((c) => { OnSendEmailCompleted(this, new EventArgs()); }); } }