void MainWindow_FormClosing(object sender, FormClosingEventArgs e) { DialogResult dr = MessageBox.Show("Вы хотите закрыть окно приложения или нет?", "Событие Closing!", MessageBoxButtons.YesNo); if (dr == DialogResult.No) e.Cancel = true; else e.Cancel = false; }
private void FoundSource_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; this.Visible = false; } }
// 終了時のイベントハンドラ protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); /*if(MessageBox.Show("本当に終了してよろしいですか?", "確認" , MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No){ e.Cancel = true; }*/ }
private void OptionsForm_FormClosing(object sender, FormClosingEventArgs e) { Settings.Default.Action = cbAction.SelectedIndex; Settings.Default.Guard = cbGuard.SelectedIndex; Settings.Default.Stand = cbStand.SelectedIndex; Settings.Default.CounterHit = cbCounterHit.SelectedIndex; Settings.Default.Stun = cbStun.SelectedIndex; Settings.Default.SAGauge = cbSAGauge.SelectedIndex; Settings.Default.AttackData = cbAttackData.SelectedIndex; Settings.Default.InputDisplay = cbInputDisplay.SelectedIndex; Settings.Default.LagSimulation = cbLagSimulation.SelectedIndex; Settings.Default.LoadStateOnPlayback = cbLoadState.Checked; Settings.Default.Save(); KeyboardManager.LoadStateOnPlayback = Settings.Default.LoadStateOnPlayback; }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if ((this.btnSaveAll.Enabled && (e.CloseReason == CloseReason.UserClosing)) && (MessageBox.Show("当前所做的修改还没有保存,确定就直接退出程序吗?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)) { e.Cancel = true; } }
} // end method GetGuesses private void HangmanServerForm_FormClosing(object sender, FormClosingEventArgs e) { Environment.Exit(0); }
private void DownloadLWJGLStatusForm_FormClosing(object sender, FormClosingEventArgs e) { Debug.WriteLine("[DownloadLWJGLStatusForm] Closing reason: " + e.CloseReason); if (DownloadLWJGLThread.IsBusy == true) { Debug.WriteLine("[DownloadLWJGLStatusForm] Worker is busy, cancelling download."); DownloadLWJGLThread.CancelAsync(); this.DownloadLWJGLStatusForm.Controls.Find("DownloadStatusLabel", true)[0].Text = "Cancelling download..."; this.DownloadLWJGLStatusForm.Refresh(); while (DownloadLWJGLThread.IsBusy == true) { }; } }
private void Form_Main_FormClosing(object sender, FormClosingEventArgs e) { Agent.Dispose(); }
private void DirExplorer_FormClosing(object sender, FormClosingEventArgs e) { disk.Unmount(); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { pixels8.Clear(); pixels16.Clear(); imagePanelControl.Dispose(); }
private void InputComponentForm_FormClosing(object sender, FormClosingEventArgs e) { configuredComponent.SetValueForKey("sourceFilePath", filePath); this.Hide(); e.Cancel = true; }
private void Options_FormClosing(object sender, FormClosingEventArgs e) { ApplyStuff(); }
private void BMICalculator_FormClosing(object sender, FormClosingEventArgs e) { Application.Exit(); }
void frmSalesReportBrief_FormClosing(object sender, FormClosingEventArgs e) { ISM.Template.FormUtility.GridLayoutSave(gridView1, _layoutfilename); }
private void Purchase_Form_FormClosing(object sender, FormClosingEventArgs e) { this.Hide(); Main_User_Files.Admin_Form ad = new Main_User_Files.Admin_Form(); ad.ShowDialog(); }
private void SparkleParamsDialog_FormClosing(object sender, FormClosingEventArgs e) { _drawTimer.Stop(); }
// we are saving the last used source language in the settings for the next time // this a poor-man's default settings feature private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { Settings.Default.SourceLanguageLcid = (int)SourceLangCombo.SelectedValue; Settings.Default.Save(); }
protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); saveState(); if (p_Emulator != null) { p_Emulator.Stop(); } }
private void ModelForm_FormClosing(object sender, FormClosingEventArgs e) { Controls.Clear(); model.Stop(); }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; this.Hide(); }
void dd2_FormClosing(object sender, FormClosingEventArgs e) { InvoiceControlTankStockAdd ctrl = (InvoiceControlTankStockAdd)sender; if (string.IsNullOrEmpty(ctrl.TankNumber)) return; int i; i = dataGridView1.Rows.Add(new DataGridViewRow()); DataGridViewCell cell1 = new DataGridViewTextBoxCell(); cell1.Value = "צובר "+ctrl.tankSize+" גלון מספר "+ctrl.TankNumber+""; dataGridView1.Rows[i].Cells["dtclmnTitle"] = cell1; invoiceitem newrow = new invoiceitem(); newrow.title = "צובר " + ctrl.tankSize + " גלון מספר " + ctrl.TankNumber + ""; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl.Note; newrow.note = ctrl.Note; dataGridView1.Rows[i].Cells["dtclmnNote"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl._Amount; newrow.amount = Convert.ToInt32(ctrl._Amount); dataGridView1.Rows[i].Cells["dtclmnAmount"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = i + 1; newrow.num = (i + 1).ToString(); dataGridView1.Rows[i].Cells["dtclmnid"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl._Type; newrow.type = ctrl._Type; dataGridView1.Rows[i].Cells["dttype"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl._Typeid; newrow.typeid = ctrl._Typeid; dataGridView1.Rows[i].Cells["dttypeid"] = cell1; _currentinvoiceitems.Add(newrow); if (ctrl._Type == "tank") { if (null == _currentinvoice) { updateTankStock(ctrl._Typeid, txtinvoiceid.Text); } else { updateTankStock(ctrl._Typeid, _currentinvoice.invoiceNumber); } havetank = true; } }
private void frm_main_FormClosing(object sender, FormClosingEventArgs e) { }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Application.Exit(); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { if (iDriver != null) { iDriver.Dispose(); } }
private void Foosh_FormClosing(object sender, FormClosingEventArgs e) { SaveSettings(); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < this.cboConnectionString.Items.Count; i++) { builder.AppendLine(this.cboConnectionString.Items[i].ToString()); } try { if (builder.Length > 0) { File.WriteAllText(string_1, builder.ToString(), Encoding.Unicode); } else if (File.Exists(string_1)) { File.Delete(string_1); } } catch { } }
protected override void OnFormClosing(FormClosingEventArgs e) { Environment.Exit(0); }
} // end method ChatClientForm_Load // close all threads associated with this application private void ChatClientForm_FormClosing( object sender, FormClosingEventArgs e ) { System.Environment.Exit( System.Environment.ExitCode ); } // end method ChatClientForm_FormClosing
private void VMess_FormClosing(object sender, FormClosingEventArgs e) { Global.MainForm.InitServers(); Global.MainForm.Show(); }
// notify Players to stop Running private void TicTacToeServerForm_FormClosing( object sender, FormClosingEventArgs e ) { disconnected = true; System.Environment.Exit( System.Environment.ExitCode ); }
private void toastform_FormClosing(object sender, FormClosingEventArgs e) { //Close the form by sliding down. this.m_Animator.Direction = FormAnimator.AnimationDirection.Down; }
private void UtauPluginManager_FormClosing( object sender, FormClosingEventArgs e ) { ColumnWidthName = headerName.Width; ColumnWidthPath = headerPath.Width; if ( WindowState == FormWindowState.Normal ) { DialogWidth = Width; DialogHeight = Height; } }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Console.WriteLine("FormClosing"); }
protected override void OnFormClosing(FormClosingEventArgs e) { base.OnFormClosing(e); }
/// <summary> /// Cleans up when the main form closes. /// </summary> private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { ConnectServerCTRL.Disconnect(); }
private void FormClosingMethod(Object sender, FormClosingEventArgs e) { this.ShutDown(); }
protected override void OnFormClosing(FormClosingEventArgs e) { // System.Console.WriteLine("called"); // e.Cancel=true; }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { KeyboardManager.Close(); }
void HandleFormClosing(Object sender, FormClosingEventArgs args) { Form dlg = sender as Form; if (null == dlg) return; if (DialogResult.OK != dlg.DialogResult) return; String outputFilePath = FileNameBox.Text; try { String outputDirectory = Path.GetDirectoryName(outputFilePath); if (!Directory.Exists(outputDirectory)) throw new ApplicationException(); } catch { String title = "Invalid Directory"; StringBuilder msg = new StringBuilder(); msg.Append("The output directory does not exist.\n"); msg.Append("Please specify the directory and base file name using the Browse button."); MessageBox.Show(dlg, msg.ToString(), title, MessageBoxButtons.OK, MessageBoxIcon.Error); args.Cancel = true; return; } try { String baseFileName = Path.GetFileName(outputFilePath); if (String.IsNullOrEmpty(baseFileName)) throw new ApplicationException(); if (-1 != baseFileName.IndexOfAny(Path.GetInvalidFileNameChars())) throw new ApplicationException(); } catch { String title = "Invalid Base File Name"; StringBuilder msg = new StringBuilder(); msg.Append("The base file name is not a valid file name.\n"); msg.Append("Make sure it contains one or more valid file name characters."); MessageBox.Show(dlg, msg.ToString(), title, MessageBoxButtons.OK, MessageBoxIcon.Error); args.Cancel = true; return; } UpdateSelectedTemplates(); if (0 == SelectedTemplates.Count) { String title = "No Templates Selected"; StringBuilder msg = new StringBuilder(); msg.Append("No render templates selected.\n"); msg.Append("Select one or more render templates from the available formats."); MessageBox.Show(dlg, msg.ToString(), title, MessageBoxButtons.OK, MessageBoxIcon.Error); args.Cancel = true; return; } }
private void ChatServerForm_FormClosing( object sender , FormClosingEventArgs e ) { System.Environment.Exit(System.Environment.ExitCode); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; Hide(); }
void dd_FormClosing(object sender, FormClosingEventArgs e) { /* dtclmnid; dtclmnTitle; dtclmnAmount; dtclmnNote;*/ //_currentinvoiceitems.Add( invoiceitem newrow = new invoiceitem(); InvoiceControlAccompanyStockAdd ctrl = (InvoiceControlAccompanyStockAdd)sender; if (string.IsNullOrEmpty(ctrl.Title) || string.IsNullOrEmpty(ctrl.Amount)) return; int i; i = dataGridView1.Rows.Add( new DataGridViewRow()); DataGridViewCell cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl.Title; newrow.title = ctrl.Title; dataGridView1.Rows[i].Cells["dtclmnTitle"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl.Note; newrow.note = ctrl.Note; dataGridView1.Rows[i].Cells["dtclmnNote"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl.Amount; newrow.amount = Convert.ToInt32(ctrl.Amount); dataGridView1.Rows[i].Cells["dtclmnAmount"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = i+1; newrow.num = (i + 1).ToString(); dataGridView1.Rows[i].Cells["dtclmnid"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl._Type; newrow.type = ctrl._Type; dataGridView1.Rows[i].Cells["dttype"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl._Typeid; newrow.typeid = ctrl._Typeid; dataGridView1.Rows[i].Cells["dttypeid"] = cell1; DataGridViewButtonCell cell2 = new DataGridViewButtonCell(); cell2.Value = "מחיקה"; dataGridView1.Rows[i].Cells["dtbttndelet"] = cell2; _currentinvoiceitems.Add(newrow); /* cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl.Title; dataGridView1.Rows[i].Cells["Amount"] = cell1; cell1 = new DataGridViewTextBoxCell(); cell1.Value = ctrl.Title; dataGridView1.Rows[i].Cells["Title"] = cell1;*/ }
public void schliessen(object sender, FormClosingEventArgs e) { try { this.timer1.Enabled = false; this.serialPort.Close(); StreamWriter textfile2 = new StreamWriter(Environment.CurrentDirectory + @"\settings.gui"); textfile2.WriteLine(RuntimeHelpers.GetObjectValue(this.comport.SelectedItem)); textfile2.Close(); this.pingshrediquette.Enabled = false; this.searchlabel.Visible = false; } catch (Exception exception1) { ProjectData.SetProjectError(exception1); ProjectData.ClearProjectError(); } }
private void DictionaryForm_FormClosing(object sender, FormClosingEventArgs e) { SaveDictionary(); }
private void ShadowsocksR_FormClosing(object sender, FormClosingEventArgs e) { Global.MainForm.Show(); }