当前位置: 首页>>代码示例>>C#>>正文


C# Forms.FormClosingEventArgs类代码示例

本文整理汇总了C#中System.Windows.Forms.FormClosingEventArgs的典型用法代码示例。如果您正苦于以下问题:C# FormClosingEventArgs类的具体用法?C# FormClosingEventArgs怎么用?C# FormClosingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FormClosingEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了FormClosingEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FormSnapshotName_FormClosing

		private void FormSnapshotName_FormClosing(object sender, FormClosingEventArgs e)
		{
			if (DialogResult != DialogResult.OK) return;
			if (!String.IsNullOrEmpty(textEditScheduleName.EditValue as String)) return;
			e.Cancel = true;
			PopupMessageHelper.Instance.ShowWarning("You should set Snapshot name before continue");
		}
开发者ID:w01f,项目名称:VolgaTeam.Dashboard,代码行数:7,代码来源:FormSectionName.cs

示例2: Program_FormClosing

 private void Program_FormClosing(object sender, FormClosingEventArgs e)
 {
     Console.WriteLine ("End of Game");
     if (wld != null) {
         wld.Destroy ();
     }
 }
开发者ID:weimingtom,项目名称:erica,代码行数:7,代码来源:Program.cs

示例3: RelatorioForm_FormClosing

 private void RelatorioForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if(admin == false)
     {
         Application.Exit();
     }
 }
开发者ID:vitorandreazza,项目名称:Matricula-Fatec,代码行数:7,代码来源:RelatorioForm.cs

示例4: FeedbackForm_FormClosing

        private void FeedbackForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (DialogResult == DialogResult.OK)
            {
                if (nameTextBox.Text.Length < 4)
                {
                    Error("Please enter your name before submitting your feedback.");
                    e.Cancel = true;
                    return;
                }
                if (emailTextBox.Text.Length < 4 || !emailTextBox.Text.Contains("@") || !emailTextBox.Text.Contains("."))
                {
                    Error("Please enter your email address before submitting your feedback.");
                    e.Cancel = true;
                    return;
                }

                string text = nameTextBox.Text + ":" + emailTextBox.Text + ":" + textBox.Text + ":" + AboutBox.AssemblyVersion+":"+Environment.OSVersion.ToString();
                string result = null;
                try
                {
                    result = Submit(text);
                }
                catch (Exception)
                {
                }
                if (result == null)
                {
                    Error("Sorry, we couldn't submit your feedback right now. Please make sure your Internet connection is working.\nOr, you can send your feedback via email to the address in the About box.");
                    e.Cancel = true;
                    return;
                }
                MessageBox.Show(this, result, this.Text, MessageBoxButtons.OK);
            }
        }
开发者ID:ArsenShnurkov,项目名称:Tree,代码行数:35,代码来源:FeedbackForm.cs

示例5: FrmCustomPath_FormClosing

        /// <summary>
        /// �ر��¼�
        /// ����TE�¼� 
        /// �����Դ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FrmCustomPath_FormClosing(object sender, FormClosingEventArgs e)
        {
            Program.TE.OnLButtonDown -= new TerraExplorerX._ITerraExplorerEvents5_OnLButtonDownEventHandler(TE_OnLButtonDown);
            Program.TE.OnFrame -= new TerraExplorerX._ITerraExplorerEvents5_OnFrameEventHandler(TE_OnFrame);
            Program.TE.OnRButtonDown -= new TerraExplorerX._ITerraExplorerEvents5_OnRButtonDownEventHandler(TE_OnRButtonDown);

            if (this.lock_deleteObj)
            {
                try
                {
                    Program.TE.DeleteItem(this.dynamicObj.InfoTreeItemID);

                }
                catch (Exception)
                {
                }

            }
            try
            {
                Program.TE.DeleteItem(this.polyLine.InfoTreeItemID);
            }
            catch (Exception)
            {

            }

            this.Dispose();
            this.Close();
        }
开发者ID:hy1314200,项目名称:HyDM,代码行数:37,代码来源:FrmCustomPath.cs

示例6: frmNotes_FormClosing

        private void frmNotes_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (OriginalText == txtNotes.Text) return;

            if (EventName != null)
            {
                Tournament tournament = Config.Settings.GetTournament(EventName);
                if (tournament != null)
                {
                    tournament.Notes = txtNotes.Text;
                    Config.Settings.SaveEvents();
                    return;
                }
                League league = Config.Settings.GetLeague(EventName);
                if (league != null)
                {
                    league.Notes = txtNotes.Text;
                    Config.Settings.SaveEvents();
                    return;
                }
            }
            else
            {
                Config.Settings.Notes = txtNotes.Text;
                Config.Settings.SaveSettings();
            }
        }
开发者ID:DeusInnomen,项目名称:LuciusIncidentLogbook,代码行数:27,代码来源:frmNotes.cs

示例7: GUIcomment_FormClosing

 private void GUIcomment_FormClosing(object sender, FormClosingEventArgs e)
 {
     gui.Invoke((MethodInvoker)delegate
     {
         gui.Enabled = true;
     });
 }
开发者ID:DomiStyle,项目名称:DaRT,代码行数:7,代码来源:GUIcomment.cs

示例8: ServerRithmicMain_FormClosing

 void ServerRithmicMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     _log.Stop();
     if (sr != null)
         sr.Stop();
     Properties.Settings.Default.Save();
 }
开发者ID:bluejack2000,项目名称:core,代码行数:7,代码来源:ServerRithmicMain.cs

示例9: Form1_FormClosing

 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     notifyIcon1.Visible = false;
     timer1.Enabled = false;
     serialPort1.Close();
     Serial_connect_status(false);
 }
开发者ID:ichirowo,项目名称:Room-temperature_IoT,代码行数:7,代码来源:Form1.cs

示例10: MFUsbConfigDialog_FormClosing

 private void MFUsbConfigDialog_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (m_cfgHelper != null)
     {
         m_cfgHelper.Dispose();
     }
 }
开发者ID:koson,项目名称:.NETMF_for_LPC17xx,代码行数:7,代码来源:MFConfigUsbDialog.cs

示例11: OnFormClosing

        private void OnFormClosing(object sender, FormClosingEventArgs e)
        {
            SaveFormState(sender as Form);

            if (Changed != null)
                Changed();
        }
开发者ID:KebinuChiousu,项目名称:MangaCrawler,代码行数:7,代码来源:FormState.cs

示例12: AccountPropertiesDialog_FormClosing

 private void AccountPropertiesDialog_FormClosing( object sender, FormClosingEventArgs e )
 {
     if( ctx == null || DialogResult != DialogResult.OK ) {
         return;
     }
     if( string.IsNullOrEmpty( textBox1.Text ) ) {
         MessageBox.Show( "Du måste ange ett namn" );
     }
     _account = new Account {
         Name = textBox1.Text
     };
     if( account != null ) {
         _account.ID = account.ID;
     }
     foreach( Control c in panel1.Controls ) {
         CheckBox cb = c as CheckBox;
         if( cb == null || !cb.Checked ) {
             continue;
         }
         User u = (User)cb.Tag;
         _account.PermittedUsers.Add( u.ID );
     }
     NameValueCollection values = new NameValueCollection();
     values.Add( "Name", _account.Name );
     values.Add( "ID", _account.ID );
     foreach( int uid in _account.PermittedUsers ) {
         values.Add( "userid", uid );
     }
     _account = ctx.ServiceCaller.PostData<Account>( string.Format( "{0}/AccountService/Save", ctx.ServiceBaseURL ), values );
 }
开发者ID:EsleEnoemos,项目名称:HomeFinance,代码行数:30,代码来源:AccountPropertiesDialog.cs

示例13: OnFormClosing

 protected override void OnFormClosing(FormClosingEventArgs e)
 {
     if (e.CloseReason == CloseReason.UserClosing)
     {
         WorkbenchSingleton.Workbench.CloseView(content);
     }
 }
开发者ID:ratoy,项目名称:VisualMap,代码行数:7,代码来源:SdiWorkspaceWindow.cs

示例14: ProfScheduleForm_FormClosing

 private void ProfScheduleForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     //
     // Read all checkBox in dgvSchedule and save that in string array
     //
     string[] Day = new string[7];
     for (int columnIndex = 1; columnIndex < 8; columnIndex++)
     {
         Day[columnIndex - 1] = string.Empty;
         for (int rowIndex = 0; rowIndex < 12; rowIndex++)
         {
             if (dgvSchedule[columnIndex, rowIndex].Value != null)
             {
                 if (dgvSchedule[columnIndex, rowIndex].Value.ToString() == "True")
                 {
                     Day[columnIndex - 1] += (string)dgvSchedule[0, rowIndex].Value.ToString() + " & ";
                 }
             }
         }
     }
     //
     // clear over plus text in string array and add in dgvProfessor
     //
     interface_TextBox.Value = string.Empty;
     string buffer = "";
     for (int i = 0; i < 7; i++)
     {
         // clear overPlus data as string Array
         Day[i] = Day[i].Substring(0, (Day[i].Length > 2) ? Day[i].Length - 2 : 0);
         // add day schedule in DataGridView dgvProfessor
         string dayName = "";
         switch (i)
         {
             case 0: dayName = "SAT";
                 break;
             case 1: dayName = "SUN";
                 break;
             case 2: dayName = "MON";
                 break;
             case 3: dayName = "THU";
                 break;
             case 4: dayName = "WED";
                 break;
             case 5: dayName = "THR";
                 break;
             case 6: dayName = "FRI";
                 break;
         }
         buffer += (Day[i].Length > 2) ? dayName + " { " + Day[i] + "} & " : "";
     }
     interface_TextBox.Value = buffer.Substring(0, (buffer.Length > 2) ? buffer.Length - 2 : 0);
     bool FREE = true;
     for (int i = 0; i < 12; i++)
         for (int j = 1; j < 8; j++)
             if (dgvSchedule[j, i].Value == null)
             { FREE = false; break; }
             else if (dgvSchedule[j, i].Value.ToString() == "false")
             { FREE = false; break; }
     if (FREE) interface_TextBox.Value = "FREE";
 }
开发者ID:Behzadkhosravifar,项目名称:MakeClassSchedule,代码行数:60,代码来源:ProfScheduleForm.cs

示例15: FacebookUploader_FormClosing

 private void FacebookUploader_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (isWorking)
         if (e.Cancel = !(MessageBox.Show("There are still images to upload.\nConfirm cancelation?", "Are you sure?", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
             == System.Windows.Forms.DialogResult.Yes))
             deleteFolder(directoryPath.FullName);
 }
开发者ID:Barina,项目名称:ScreenGrabber,代码行数:7,代码来源:FacebookConnect.cs


注:本文中的System.Windows.Forms.FormClosingEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。