• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.FormClosingEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: FormMain_FormClosing

 private void FormMain_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         Microsoft.Win32.RegistryKey keyApp = Application.UserAppDataRegistry;
         if (null == keyApp)
         {
             return;
         }
         keyApp.SetValue("windowState", (int)WindowState);
         keyApp.SetValue("width", Width);
         keyApp.SetValue("height", Height);
         keyApp.SetValue("top", Top);
         keyApp.SetValue("left", Left);
         keyApp.SetValue("shaderFileName", shaderFileName);
         keyApp.SetValue("textureFileName", texture1.Text);
         keyApp.SetValue("texture2FileName", texture2.Text);
         keyApp.SetValue("soundFileName", soundFileName);
         keyApp.SetValue("play", soundPlayerBar1.Playing);
         keyApp.SetValue("granularity", this.granularity.Text);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
开发者ID:Densen90,项目名称:MMPROG-1,代码行数:26,代码来源:FormMain.cs


示例17: FormLogFormClosing

        /// <summary>
        /// Form is closing.
        /// </summary>
        private void FormLogFormClosing(object sender, FormClosingEventArgs e)
        {
            ClassWinGeometry.Save(this);

            // Remove our print function delegate
            App.PrintLogMessage -= Print;
        }
开发者ID:kjanakir,项目名称:GitForce,代码行数:10,代码来源:FormLog.cs


示例18: frm_about_FormClosing

 private void frm_about_FormClosing(object sender, FormClosingEventArgs e)
 {
     for ( int i = 0; i < 10; i++ ) {
         Thread.Sleep(60);
         this.Opacity = this.Opacity - 0.1;
     }
 }
开发者ID:old-kasthack-s-projects,项目名称:GAS,代码行数:7,代码来源:frm_about.cs


示例19: Config_FormClosing

        private void Config_FormClosing(object sender, FormClosingEventArgs e)
        {
            //TODO: Validar se arquivo .mfc é válido
            if (_contadorErro <= 3 && !System.IO.File.Exists(txtPasta.Text))
            {
                MessageBox.Show("Por favor, selecione um arquivo válido de configurações do Mock MF.", "Erro", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                e.Cancel = true;
                _contadorErro++;
                return;
            }

            if (_contadorErro > 3)
            {
                e.Cancel = false;
                Application.Exit();
                return;
            }

            FileInfo fInfo = new FileInfo(txtPasta.Text);
            Configuracoes.CaminhoArquivo = fInfo.DirectoryName;
            Configuracoes.TelaInicial = Path.GetFileNameWithoutExtension(txtPasta.Text);
            var baseMFSerializer =new Serializer<BaseMF>();
            if (checkSalvar.Checked)
                File.WriteAllText(String.Format("{0}\\{1}.xml", Application.LocalUserAppDataPath, Configuracoes.Nome), baseMFSerializer.XmlSerialize(Configuracoes));
        }
开发者ID:rcarubbi,项目名称:Carubbi.Components,代码行数:25,代码来源:Configuracoes.cs


示例20: AddEdManagerForm_FormClosing

 private void AddEdManagerForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (DialogResult == DialogResult.OK)
         managerBindingSource.EndEdit();
     else
         managerBindingSource.CancelEdit();
 }
开发者ID:Geliya94,项目名称:magazin,代码行数:7,代码来源:AddEdManagerForm.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.GiveFeedbackEventArgs类代码示例发布时间:2022-05-26
下一篇:
C# Forms.FormClosedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap