コード例 #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);
        }
コード例 #2
0
ファイル: FormMenu.cs プロジェクト: Hlib-Bakai/ShareP
 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();
         }
     }
 }