Ejemplo n.º 1
0
        protected override void OnItemActivate(EventArgs e)
        {
            base.OnItemActivate(e);

            ParticipantModel association = this.SelectedItems.Count > 0
                ? this.SelectedItems[0].Tag as ParticipantModel : null;

            if (association != null)
            {
                using (Synchronizer.Lock(this.m_Model.Participant)) {
                    if (this.m_Model.Participant.Role is InstructorModel || this.m_Model.Participant.Role == null)
                    {
                        this.m_Model.Participant.Role = new StudentModel(Guid.NewGuid());
                    }
                }

                using (Synchronizer.Lock(this.m_Model.Network.SyncRoot)) {
                    this.m_Model.Network.Association = association;
                }
            }
            else
            {
                StartJoinButton.StartEmptyPresentation(this.m_Model);
            }
        }
Ejemplo n.º 2
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);

            if (this.m_Association != null)
            {
                // Set the role accordingly
                using (Synchronizer.Lock(this.m_Model.Participant)) {
                    if (this.m_Model.Participant.Role is InstructorModel || this.m_Model.Participant.Role == null)
                    {
                        this.m_Model.Participant.Role = new StudentModel(Guid.NewGuid());
                    }
                }

                // Set the network association
                using (Synchronizer.Lock(this.m_Model.Network.SyncRoot)) {
                    this.m_Model.Network.Association = this.Association;
                }
            }
            else
            {
                // Instead Start an Empty Presentation
                StartJoinButton.StartEmptyPresentation(this.m_Model);
            }
        }
Ejemplo n.º 3
0
            public PresentationButtonPanel(PresenterModel model)
            {
                this.m_Model = model;

                this.SuspendLayout();

                this.m_StartJoinButton = new StartJoinButton(this.m_Model);

                Size size = new Size(this.m_StartJoinButton.Width, this.m_StartJoinButton.Height);

                this.Size = new Size(size.Width + 20, size.Height + 20);

                this.Padding = new Padding(10);
                this.m_StartJoinButton.Dock = DockStyle.Fill;

                this.Controls.Add(this.m_StartJoinButton);

                this.ResumeLayout(false);
            }
Ejemplo n.º 4
0
            public PresentationButtonPanel(PresenterModel model)
            {
                this.m_Model = model;

                this.SuspendLayout();

                this.m_StartJoinButton = new StartJoinButton( this.m_Model );

                Size size = new Size( this.m_StartJoinButton.Width, this.m_StartJoinButton.Height);
                this.Size = new Size( size.Width+20, size.Height+20);

                this.Padding = new Padding( 10 );
                this.m_StartJoinButton.Dock = DockStyle.Fill;

                this.Controls.Add(this.m_StartJoinButton);

                this.ResumeLayout(false);
            }