コード例 #1
0
ファイル: c2.cs プロジェクト: akmaplus/My_sources_cs
    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;
    }
コード例 #2
0
ファイル: HTMLForm.cs プロジェクト: grefly/Buy4
 private void FoundSource_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         e.Cancel = true;
         this.Visible = false;
     }
 }
コード例 #3
0
ファイル: Form.cs プロジェクト: koh110/TwitamaForm
 // 終了時のイベントハンドラ
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     base.OnFormClosing(e);
     /*if(MessageBox.Show("本当に終了してよろしいですか?", "確認"
         , MessageBoxButtons.YesNo, MessageBoxIcon.Question)
         == DialogResult.No){
         e.Cancel = true;
     }*/
 }
コード例 #4
0
ファイル: OptionsForm.cs プロジェクト: booblebobble/SF3hack
	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;
	}
コード例 #5
0
ファイル: MainForm.cs プロジェクト: nakijun/FastDBEngine
 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;
     }
 }
コード例 #6
0
ファイル: HangmanServer.cs プロジェクト: Fanarito/FOR3A
    } // end method GetGuesses

    private void HangmanServerForm_FormClosing(object sender, FormClosingEventArgs e)
    {
        Environment.Exit(0);
    }
コード例 #7
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) { };
     }
 }
コード例 #8
0
ファイル: Form_Main.cs プロジェクト: Zerseu/Reflecta
 private void Form_Main_FormClosing(object sender, FormClosingEventArgs e)
 {
     Agent.Dispose();
 }
コード例 #9
0
 private void DirExplorer_FormClosing(object sender, FormClosingEventArgs e)
 {
     disk.Unmount();
 }
コード例 #10
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     pixels8.Clear();
     pixels16.Clear();
     imagePanelControl.Dispose();
 }
コード例 #11
0
 private void InputComponentForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     configuredComponent.SetValueForKey("sourceFilePath", filePath);
     this.Hide();
     e.Cancel = true;
 }
コード例 #12
0
ファイル: Options.cs プロジェクト: Rain-World-Modding/BOI
 private void Options_FormClosing(object sender, FormClosingEventArgs e)
 {
     ApplyStuff();
 }
コード例 #13
0
 private void BMICalculator_FormClosing(object sender, FormClosingEventArgs e)
 {
     Application.Exit();
 }
コード例 #14
0
ファイル: frmSalesReportBrief.cs プロジェクト: radtek/InfoPos
 void frmSalesReportBrief_FormClosing(object sender, FormClosingEventArgs e)
 {
     ISM.Template.FormUtility.GridLayoutSave(gridView1, _layoutfilename);
 }
コード例 #15
0
 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();
 }
コード例 #16
0
 private void SparkleParamsDialog_FormClosing(object sender, FormClosingEventArgs e) {
     _drawTimer.Stop();
 }
コード例 #17
0
ファイル: MainForm.cs プロジェクト: yuyingzhang/Sdl-Community
 // 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();
 }
コード例 #18
0
ファイル: MainIDE.cs プロジェクト: TomWilsonCoder/oside
    protected override void OnFormClosing(FormClosingEventArgs e)
    {
        base.OnFormClosing(e);

        saveState();
        if (p_Emulator != null) {
            p_Emulator.Stop();
        }
    }
コード例 #19
0
 private void ModelForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     Controls.Clear();
     model.Stop();
 }
コード例 #20
0
ファイル: Form1.cs プロジェクト: RZMC0091/Trash
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     e.Cancel = true;
     this.Hide();
 }
コード例 #21
0
ファイル: TankInvoice.cs プロジェクト: ranyaof/ongaz
        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;

            }
        }
コード例 #22
0
 private void frm_main_FormClosing(object sender, FormClosingEventArgs e)
 {
 }
コード例 #23
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
 }
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     Application.Exit();
 }
コード例 #25
0
ファイル: MainForm.cs プロジェクト: JoostZ/astrocaptureserver
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (iDriver != null)
     {
         iDriver.Dispose();
     }
 }
コード例 #26
0
ファイル: Foosh.cs プロジェクト: ffxivtools/foosh
 private void Foosh_FormClosing(object sender, FormClosingEventArgs e)
 {
     SaveSettings();
 }
コード例 #27
0
ファイル: MainForm.cs プロジェクト: nakijun/FastDBEngine
 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
     {
     }
 }
コード例 #28
0
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     Environment.Exit(0);
 }
コード例 #29
0
ファイル: ChatClient.cs プロジェクト: Fanarito/FOR3A
   } // 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
コード例 #30
0
ファイル: VMess.cs プロジェクト: partment/x2tap
 private void VMess_FormClosing(object sender, FormClosingEventArgs e)
 {
     Global.MainForm.InitServers();
     Global.MainForm.Show();
 }
コード例 #31
0
 // notify Players to stop Running
 private void TicTacToeServerForm_FormClosing( object sender, FormClosingEventArgs e )
 {
     disconnected = true;
       System.Environment.Exit( System.Environment.ExitCode );
 }
コード例 #32
0
ファイル: toastform.cs プロジェクト: vantruc/skimpt
 private void toastform_FormClosing(object sender, FormClosingEventArgs e)
 {
     //Close the form by sliding down.
     this.m_Animator.Direction = FormAnimator.AnimationDirection.Down;
 }
コード例 #33
0
 private void UtauPluginManager_FormClosing( object sender, FormClosingEventArgs e ) {
     ColumnWidthName = headerName.Width;
     ColumnWidthPath = headerPath.Width;
     if ( WindowState == FormWindowState.Normal ) {
         DialogWidth = Width;
         DialogHeight = Height;
     }
 }
コード例 #34
0
ファイル: form6.cs プロジェクト: ChanahC/CSharpTrain
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     Console.WriteLine("FormClosing");
 }
コード例 #35
0
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     base.OnFormClosing(e);
 }
コード例 #36
0
 /// <summary>
 /// Cleans up when the main form closes.
 /// </summary>
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     ConnectServerCTRL.Disconnect();
 }
コード例 #37
0
 private void FormClosingMethod(Object sender, FormClosingEventArgs e)
 {
     this.ShutDown();
 }
コード例 #38
0
ファイル: MenuDialog.cs プロジェクト: Jimmyscene/Random
 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     // System.Console.WriteLine("called");
     // e.Cancel=true;
 }
コード例 #39
0
ファイル: Form1.cs プロジェクト: booblebobble/SF3hack
	private void Form1_FormClosing(object sender, FormClosingEventArgs e)
	{
		KeyboardManager.Close();
	}
コード例 #40
0
 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;
     }
 }
コード例 #41
0
 private void ChatServerForm_FormClosing( object sender ,
    FormClosingEventArgs e )
 {
     System.Environment.Exit(System.Environment.ExitCode);
 }
コード例 #42
0
ファイル: MainForm.cs プロジェクト: ATouhou/QuranCode
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     e.Cancel = true;
     Hide();
 }
コード例 #43
0
ファイル: TankInvoice.cs プロジェクト: ranyaof/ongaz
        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;*/
        }
コード例 #44
0
ファイル: MainForm.cs プロジェクト: matttija/afrodevices
 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();
     }
 }
コード例 #45
0
 private void DictionaryForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     SaveDictionary(); 
 }
コード例 #46
0
ファイル: ShadowsocksR.cs プロジェクト: xk7612/Netch
 private void ShadowsocksR_FormClosing(object sender, FormClosingEventArgs e)
 {
     Global.MainForm.Show();
 }