本文整理汇总了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");
}
示例2: Program_FormClosing
private void Program_FormClosing(object sender, FormClosingEventArgs e)
{
Console.WriteLine ("End of Game");
if (wld != null) {
wld.Destroy ();
}
}
示例3: RelatorioForm_FormClosing
private void RelatorioForm_FormClosing(object sender, FormClosingEventArgs e)
{
if(admin == false)
{
Application.Exit();
}
}
示例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);
}
}
示例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();
}
示例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();
}
}
示例7: GUIcomment_FormClosing
private void GUIcomment_FormClosing(object sender, FormClosingEventArgs e)
{
gui.Invoke((MethodInvoker)delegate
{
gui.Enabled = true;
});
}
示例8: ServerRithmicMain_FormClosing
void ServerRithmicMain_FormClosing(object sender, FormClosingEventArgs e)
{
_log.Stop();
if (sr != null)
sr.Stop();
Properties.Settings.Default.Save();
}
示例9: Form1_FormClosing
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
notifyIcon1.Visible = false;
timer1.Enabled = false;
serialPort1.Close();
Serial_connect_status(false);
}
示例10: MFUsbConfigDialog_FormClosing
private void MFUsbConfigDialog_FormClosing(object sender, FormClosingEventArgs e)
{
if (m_cfgHelper != null)
{
m_cfgHelper.Dispose();
}
}
示例11: OnFormClosing
private void OnFormClosing(object sender, FormClosingEventArgs e)
{
SaveFormState(sender as Form);
if (Changed != null)
Changed();
}
示例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 );
}
示例13: OnFormClosing
protected override void OnFormClosing(FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing)
{
WorkbenchSingleton.Workbench.CloseView(content);
}
}
示例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";
}
示例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);
}