Exemple #1
0
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            this.clicked = true;

            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
                StartJoinButton2.StartEmptyPresentation(this.m_Model);
            }
        }
Exemple #2
0
 /// <summary>
 /// Configure the model for stand-alone instructor mode without displaying the startup form.
 /// </summary>
 public void StandaloneStartup()
 {
     using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) {
         if (!(this.m_Model.Participant.Role is InstructorModel))
         {
             this.m_Model.Participant.Role = new InstructorModel(Guid.NewGuid());
         }
     }
     using (Synchronizer.Lock(this.m_Model.ViewerState.SyncRoot)) {
         this.m_Model.ViewerState.iRole = 0;
     }
     this.m_StartJoinButton.Association = null;
     StartJoinButton2.StartEmptyPresentation(this.m_Model);
 }
Exemple #3
0
 void StartupForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!(this.m_StartJoinButton.clicked))
     {
         using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) {
             if (!(this.m_Model.Participant.Role is InstructorModel))
             {
                 this.m_Model.Participant.Role = new InstructorModel(Guid.NewGuid());
             }
         }
         using (Synchronizer.Lock(this.m_Model.ViewerState.SyncRoot)) {
             this.m_Model.ViewerState.iRole = 0;
         }
         if (this.m_Connection != null &&
             this.m_Connection.m_ManualConnectionPanel != null)
         {
             this.m_Connection.m_ManualConnectionPanel.DisconnectAllButtons();
         }
         this.m_StartJoinButton.Association = null;
         StartJoinButton2.StartEmptyPresentation(this.m_Model);
     }
 }