コード例 #1
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            FrmBuildHtmlDocument.ProcessInfo ProcessInfoHandler = null;
            Globals.BuildHtmlDocs(this.CardFolder, ProcessInfoHandler);
            CreateSnapshot();

            string q_dir = ctrlQuestion.WorkingFolder;

            if (Directory.Exists(q_dir) == false)
            {
                MessageBox.Show(string.Format("Unable to save content because directory '{0}' is missing.", q_dir));
                return;
            }
            if (Directory.GetFiles(q_dir).Length == 0)
            {
                MessageBox.Show(string.Format("Unable to save content because 'Question' content is empty."));
                tcCard.SelectedIndex = 0;
                return;
            }


            string a_dir = ctrlAnswer.WorkingFolder;

            if (Directory.Exists(a_dir) == false)
            {
                MessageBox.Show(string.Format("Unable to save content because directory '{0}' is missing.", a_dir));
                return;
            }
            if (Directory.GetFiles(a_dir).Length == 0)
            {
                MessageBox.Show(string.Format("Unable to save content because 'Answer' content is empty."));
                tcCard.SelectedIndex = 1;
                return;
            }


            this.save_is_pressed = true;
            this.external_ask_to_discard_is_in_process = false;
            if (this.OnClose != null)
            {
                this.OnClose(null, null);
            }
        }
コード例 #2
0
 void bw_DoWork(object sender, DoWorkEventArgs e)
 {
     Globals.BuildHtmlDocs(ProcessInfoHandler);
 }