Exemplo n.º 1
0
        public static ConnectionResult EstablishClientConnection(string ip, byte[] password = null)
        {
            var result = clientConnection.EstablishClientConnection(ip, password);

            if (result == ConnectionResult.Success)
            {
                LoadGroupParameters(ip);
                CurrentRole = Role.Client;
                if (CurrentPresentation != null)
                {
                    ViewerController.StartLoadingSlides();
                }
            }
            return(result);
        }
Exemplo n.º 2
0
 public void OnPresentationStart()   // Viewer side
 {
     if (this.WindowState != FormWindowState.Normal && (bool)Properties.Settings.Default["nPresentation"] &&
         !(bool)Properties.Settings.Default["autojoin"])
     {
         Notification.Show("Presentation", "Presentation " + Connection.CurrentPresentation.Name + " started", NotificationType.Presentation);
     }
     if (InvokeRequired)
     {
         Invoke(new Action(() => buttonJoin.Enabled = true));
     }
     else
     {
         buttonJoin.Enabled = true;
     }
     if (InvokeRequired)
     {
         Invoke(new Action(() => LoadPresentationTab()));
     }
     else
     {
         LoadPresentationTab();
     }
     ViewerController.StartLoadingSlides();
     if ((bool)Properties.Settings.Default["autojoin"])
     {
         if (InvokeRequired)
         {
             Invoke(new Action(() => StartViewer()));
         }
         else
         {
             StartViewer();
         }
     }
 }