public ManualConnectionPanel(PresenterModel model, StartupForm stup) { if (model == null) throw new ArgumentNullException("model"); this.m_EventQueue = new ControlEventQueue(this); this.m_Model = model; this.m_Startup = stup; //this.Text = "Manual Connections"; this.Font = Model.Viewer.ViewerStateModel.StringFont; this.Location = new Point(10, 10); this.Size = new Size(250, 250); this.CreateHandle(); this.BorderStyle = BorderStyle.Fixed3D; this.AutoScroll = true; Label label1 = new Label(); label1.FlatStyle = FlatStyle.System; label1.Font = Model.Viewer.ViewerStateModel.StringFont2; label1.Text = Strings.ManualConnectionVenues; label1.Location = new Point(10, 5); label1.Size = new Size(this.Width - 20, label1.Font.Height); this.Controls.Add(label1); this.UnicastLabel = new Label(); this.UnicastLabel.FlatStyle = FlatStyle.System; this.UnicastLabel.Font = Model.Viewer.ViewerStateModel.StringFont2; this.UnicastLabel.Text = Strings.Unicast; this.UnicastLabel.Location = new Point(10, (int)(10*this.UnicastLabel.Font.Height) + 5); this.UnicastLabel.Size = new Size(this.Width - 20, this.UnicastLabel.Font.Height); this.Controls.Add(this.UnicastLabel); #if RTP_BUILD this.MulticastLabel = new Label(); this.MulticastLabel.Text = Strings.MultiCast; this.MulticastLabel.FlatStyle = FlatStyle.System; this.MulticastLabel.Font = Model.Viewer.ViewerStateModel.StringFont2; this.MulticastLabel.Location = new Point(10, (int)(2 * this.MulticastLabel.Font.Height)); this.MulticastLabel.Size = new Size(this.Width - 20, this.MulticastLabel.Font.Height); this.Controls.Add(this.MulticastLabel); #else this.UnicastLabel.Location = new Point(10, label1.Bottom + 5); #endif //Add the TCP dealie to the list bool isInstructor = false; using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) { isInstructor = (this.m_Model.Participant.Role is InstructorModel); } if (!isInstructor) { this.TCPRadioButton = new ConnectTCPRadioButton(m_EventQueue, m_Model, this, new Point(10, this.UnicastLabel.Bottom + 5), this.Width - 60); this.Controls.Add(this.TCPRadioButton);//Add click handlers, etc this.Reenter = new ReenterServerButton(this.TCPRadioButton); this.Reenter.Location = new Point(this.TCPRadioButton.Right, this.TCPRadioButton.Top); this.Controls.Add(this.Reenter); } // Set up a helper to add other classrooms this.m_ProtocolCollectionHelper = new ProtocolCollectionHelper(this, this.m_Model.Network); }
public ManualConnectionPanel(PresenterModel model, StartupForm stup) { if (model == null) { throw new ArgumentNullException("model"); } this.m_EventQueue = new ControlEventQueue(this); this.m_Model = model; this.m_Startup = stup; //this.Text = "Manual Connections"; this.Font = Model.Viewer.ViewerStateModel.StringFont; this.Location = new Point(10, 10); this.Size = new Size(250, 250); this.CreateHandle(); this.BorderStyle = BorderStyle.Fixed3D; this.AutoScroll = true; Label label1 = new Label(); label1.FlatStyle = FlatStyle.System; label1.Font = Model.Viewer.ViewerStateModel.StringFont2; label1.Text = Strings.ManualConnectionVenues; label1.Location = new Point(10, 5); label1.Size = new Size(this.Width - 20, label1.Font.Height); this.Controls.Add(label1); this.UnicastLabel = new Label(); this.UnicastLabel.FlatStyle = FlatStyle.System; this.UnicastLabel.Font = Model.Viewer.ViewerStateModel.StringFont2; this.UnicastLabel.Text = Strings.Unicast; this.UnicastLabel.Location = new Point(10, (int)(6 * this.UnicastLabel.Font.Height) + 5); this.UnicastLabel.Size = new Size(this.Width - 20, this.UnicastLabel.Font.Height); this.Controls.Add(this.UnicastLabel); #if RTP_BUILD this.MulticastLabel = new Label(); this.MulticastLabel.Text = Strings.MultiCast; this.MulticastLabel.FlatStyle = FlatStyle.System; this.MulticastLabel.Font = Model.Viewer.ViewerStateModel.StringFont2; this.MulticastLabel.Location = new Point(10, (int)(2 * this.MulticastLabel.Font.Height)); this.MulticastLabel.Size = new Size(this.Width - 20, this.MulticastLabel.Font.Height); this.Controls.Add(this.MulticastLabel); #else this.UnicastLabel.Location = new Point(10, label1.Bottom + 5); #endif //Add the TCP dealie to the list bool isInstructor = false; using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) { isInstructor = (this.m_Model.Participant.Role is InstructorModel); } if (!isInstructor) { this.TCPRadioButton = new ConnectTCPRadioButton(m_EventQueue, m_Model, this, new Point(10, this.UnicastLabel.Bottom + 5), this.Width - 60); this.Controls.Add(this.TCPRadioButton);//Add click handlers, etc this.Reenter = new ReenterServerButton(this.TCPRadioButton); this.Reenter.Location = new Point(this.TCPRadioButton.Right, this.TCPRadioButton.Top); this.Reenter.Width = 100; this.Controls.Add(this.Reenter); } // Set up a helper to add other classrooms this.m_ProtocolCollectionHelper = new ProtocolCollectionHelper(this, this.m_Model.Network); }