예제 #1
0
 private void editanswercontent(ref AnswerContent value)
 {
     EditorForm editorform = new EditorForm(value.subjecthtmlanswer);
     DialogResult da = editorform.ShowDialog();
     if (da.Equals(DialogResult.OK))
     {
         if (editorform.editor1.BodyHtml!= null && !editorform.editor1.BodyHtml.Equals(""))
         {
             //value.subjectbinaryanswer = editorform.editor1.BodyHtml;
             //value.subjecttextanswer = editorform.editor1.BodyHtml;
             value.subjecthtmlanswer = editorform.editor1.BodyHtml;
         }
         else
         {
             value.subjectbinaryanswer = null;
             value.subjecttextanswer = null;
             value.subjecthtmlanswer = null;
         }
         editorform.Dispose();
     }
 }
예제 #2
0
파일: Martian.cs 프로젝트: Kristd/backup
 private void treeViewSubject_DoubleClick(object sender, EventArgs e)
 {
     if (treeViewSubject.SelectedNode != null)
     {
         Subject subject = (Subject)this.treeViewSubject.SelectedNode.Tag;
         try
         {
             using (EditorForm editor = new EditorForm(subject.subjecthtmlcontent, subject.answer.subjecthtmlanswer))
             {
                 DialogResult da = editor.ShowDialog(this);
                 if (da.Equals(DialogResult.OK))
                 {
                     subject.subjecthtmlcontent = editor.editor1.BodyHtml;
                     subject.subjecttextcontent = HtmlUtil.RemoveHTML(editor.editor1.BodyHtml);
                     subject.answer.subjecthtmlanswer = editor.editor2.BodyHtml;
                     if (subject.answer.subjecthtmlanswer != null)
                         subject.answer.subjecttextanswer = HtmlUtil.RemoveHTML(subject.answer.subjecthtmlanswer).Trim();
                     this.treeViewSubject.SelectedNode.Tag = subject;
                     webBrowser.DocumentText = editor.editor1.BodyHtml;
                 }
             }
             subjectCheck(false);//添加答案检查
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
 }