private void DiscardChanges_Click(object sender, RoutedEventArgs e) { if (Window.Current.Content is Frame f && f.Content is EditionMode root) { root.IsModified = false; this.Result = ClosingResult.Close; this.Hide(); } }
private void SaveResume_Click(object sender, RoutedEventArgs e) { if (Window.Current.Content is Frame f && f.Content is EditionMode root) { root.SaveResume(); this.Result = ClosingResult.Close; this.Hide(); } }
private static ClosingResult getClosingResult(ClosingResult res) { bool state = Properties.Settings.Default.CloseState; // true: ��С����������֪ͨ����false �ر� if (state) { res = ClosingResult.Minimize; } else { res = ClosingResult.Close; if (Program.ChatForms.Count > 0) { if (MessageBox.Show("�ÿͶԻ��������رտͻ���,�Ƿ�ǿ�ƹرգ�", "ϵͳ��ʾ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { res = ClosingResult.Cancel; } } } return res; }
private void CancelExiting_Click(object sender, RoutedEventArgs e) { this.Result = ClosingResult.Stay; this.Hide(); }