public async static Task OpenPaperAsync(Entity entity) { var form = new PaperForm(entity); form.MdiParent = MainForm.Current; form.Show(); }
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(); }