コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: honj51/ideacode
 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;
 }
コード例 #4
0
 private void CancelExiting_Click(object sender, RoutedEventArgs e)
 {
     this.Result = ClosingResult.Stay;
     this.Hide();
 }