Exemple #1
0
 public static PaperForm getInstance(ClosePaper ClosePaper)
 {
     if (instance == null)
     {
         instance = new PaperForm(ClosePaper);
     }
     instance.Show();
     return(instance);
 }
Exemple #2
0
        private void SelProblem(OneProblemForm oneProblemForm, ProblemWithTypeName problemWithTN, bool IsBtn)
        {
            //if (this.CurSelProblemWithTN != problemWithTN)
            //{
            //    this.CurSelProblemWithTN = problemWithTN;
            //    this.tbProblemType.Text = this.CurSelProblemWithTN.TypeName;
            //    this.rtbProblemOther.Text = this.CurSelProblemWithTN.Other;
            //}

            if (CurSelProblemForm != oneProblemForm)
            {
                if (CurSelProblemForm != null)
                {
                    CurSelProblemForm.CancelFocus();
                }
                CurSelProblemForm = oneProblemForm;
                CurSelProblemForm.SetFocus();

                this.CurSelProblemWithTN  = CurSelProblemForm.cuProblemWithTN;
                this.tbProblemType.Text   = this.CurSelProblemWithTN.TypeName;
                this.rtbProblemOther.Text = this.CurSelProblemWithTN.Other;
            }

            if (IsBtn)
            {
                //MessageBox.Show("添加到试卷");
                if (this.IKnowltAndProblemFormReq.InsertOneProblem(this.CurSelProblemWithTN) == 1)
                {
                    if (this.varClosePaper == null)
                    {
                        this.varClosePaper = new ClosePaper(this.ClosePaper);
                    }
                    PaperForm.getInstance(this.varClosePaper).AddChild(new ProblemInPaper(this.CurSelProblemWithTN));
                }
            }
            this.ShowAnswer();
        }
Exemple #3
0
 private PaperForm(ClosePaper ClosePaper)
 {
     InitializeComponent();
     this.ClosePaper = ClosePaper;
 }