/// <summary> /// Construct the button /// </summary> /// <param name="location">The location for the button</param> /// <param name="tabIndex">The tab index for the button</param> public SSOrganizerOKButton(DeckModel deck, SSOrganizerMainPanel panel, Point location, int tabIndex) { // Need to assign the result reference this.panel = panel; this.deck = deck; this.DialogResult = System.Windows.Forms.DialogResult.OK; this.FlatStyle = FlatStyle.System; this.Font = ViewerStateModel.StringFont; this.Location = location; this.Name = "organizerOKButton"; this.TabIndex = tabIndex; this.Anchor = AnchorStyles.Bottom; this.Text = Strings.OK; }
/// <summary> /// Constructs the dialog form /// </summary> public SSOrganizerForm(PresenterModel m) { // Save the model this.model = m; // Get the student submission deck if (this.model != null) { using (Synchronizer.Lock(this.model.SyncRoot)) { if (this.model.Workspace != null) { using (this.model.Workspace.Lock()) { if (~this.model.Workspace.CurrentPresentation != null) { using (Synchronizer.Lock((~this.model.Workspace.CurrentPresentation).SyncRoot)) { deckModel = (~this.model.Workspace.CurrentPresentation).GetStudentSubmissionDeck(); } } } } } } // Setup the display of the form // Suspend the layout this.SuspendLayout(); this.AutoScaleBaseSize = new Size(5, 13); this.ClientSize = new System.Drawing.Size(564, 342); this.Font = ViewerStateModel.FormFont; this.FormBorderStyle = FormBorderStyle.Sizable; this.MaximizeBox = true; this.MinimumSize = new Size(220, 220); this.Name = "SSOrganizerForm"; // TODO CMPRINCE: Need to localize this string this.Text = "Student Submission Organizer"; // Add the child controls SSOrganizerMainPanel mainPanel = new SSOrganizerMainPanel(this.deckModel, new Point(0, 0), new Size(564, 304), 0); this.Controls.Add(mainPanel); this.Controls.Add(new SSOrganizerOKButton(this.deckModel, mainPanel, new Point(182, 310), 1)); this.Controls.Add(new SSOrganizerCancelButton(new Point(300, 310), 2)); this.ResumeLayout(); }
/// <summary> /// Constructs the dialog form /// </summary> public SSOrganizerForm(PresenterModel m) { // Save the model this.model = m; // Get the student submission deck if(this.model != null) { using (Synchronizer.Lock(this.model.SyncRoot)) { if (this.model.Workspace != null) { using (this.model.Workspace.Lock()) { if (~this.model.Workspace.CurrentPresentation != null) { using (Synchronizer.Lock((~this.model.Workspace.CurrentPresentation).SyncRoot)) { deckModel = (~this.model.Workspace.CurrentPresentation).GetStudentSubmissionDeck(); } } } } } } // Setup the display of the form // Suspend the layout this.SuspendLayout(); this.AutoScaleBaseSize = new Size(5, 13); this.ClientSize = new System.Drawing.Size(564, 342); this.Font = ViewerStateModel.FormFont; this.FormBorderStyle = FormBorderStyle.Sizable; this.MaximizeBox = true; this.MinimumSize = new Size(220, 220); this.Name = "SSOrganizerForm"; // TODO CMPRINCE: Need to localize this string this.Text = "Student Submission Organizer"; // Add the child controls SSOrganizerMainPanel mainPanel = new SSOrganizerMainPanel(this.deckModel, new Point(0, 0), new Size(564, 304), 0); this.Controls.Add(mainPanel); this.Controls.Add(new SSOrganizerOKButton(this.deckModel, mainPanel, new Point(182, 310), 1)); this.Controls.Add(new SSOrganizerCancelButton(new Point(300, 310), 2)); this.ResumeLayout(); }
/// <summary> /// Construct the button /// </summary> /// <param name="location">The location for the button</param> /// <param name="tabIndex">The tab index for the button</param> public SSOrganizerOKButton(DeckModel deck, SSOrganizerMainPanel panel, Point location, int tabIndex) { // Need to assign the result reference this.panel = panel; this.deck = deck; this.DialogResult = System.Windows.Forms.DialogResult.OK; this.FlatStyle = FlatStyle.System; this.Font = ViewerStateModel.StringFont; this.Location = location; this.Name = "organizerOKButton"; this.TabIndex = tabIndex; this.Anchor = AnchorStyles.Bottom; this.Text = Strings.OK; }