Beispiel #1
0
 public void removeAssessment(AssessmentControl assessment)
 {
     this.pnlAssessments.Controls.Remove(assessment);
     assessment.Dispose();
     this.resetAssessmentControlPositions();
     this.updateControls();
 }
Beispiel #2
0
 public void reset()
 {
     this.ModuleName = Properties.Resources.MODULE_DEFAULT_TITLE;
     this.ModuleCode = Properties.Resources.MODULE_DEFAULT_CODE;
     for (int i = this.pnlAssessments.Controls.Count - 1; i > 1; i--)
     {
         AssessmentControl tmp = (AssessmentControl)this.pnlAssessments.Controls[i];
         this.pnlAssessments.Controls.RemoveAt(i);
         tmp.Dispose();
     }
     this.restoreHelp();
 }
Beispiel #3
0
        public void createAssessment(System.EventHandler callbackOpen, System.EventHandler callbackRemove, Assessment a)
        {
            AssessmentControl tmp = new AssessmentControl(a);

            tmp.Anchor = (AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top);
            //tmp.Width = this.pnlAssessments.Width - 2;// - ((/*this.pnlAssessments.VerticalScroll.Visible*/true) ? (System.Windows.Forms.SystemInformation.VerticalScrollBarWidth) : (0));
            //tmp.Location = new Point(0, this.pnlAssessments.AutoScrollPosition.Y + ((this.pnlAssessments.Controls.Count - 2) * 55));
            //tmp.Margin = new Padding(0, 10, 0, 10);
            tmp.hookFaceClick(callbackOpen);
            tmp.hookRemoveClick(callbackRemove);

            this.pnlAssessments.Controls.Add(tmp);
            this.resetAssessmentControlPositions();
            this.updateControls();
        }