Esempio n. 1
0
 private void UpdateBoth()
 {
     m_DownloadingWebFile = UpdateExtensions();
     m_DownloadingWebFile.DownloadFailed          += InstallerOnDownloadFailed;
     m_DownloadingWebFile.DownloadProgressChanged += InstallerOnDownloadProgressChanged;
     m_DownloadingWebFile.Downloaded += (o =>
     {
         var downloadedExtensionInstaller = (WebFile)o;
         downloadedExtensionInstaller.Start(string.Format("/ARCH={0} /MPDN_VERSION=\"{1}\"",
                                                          ArchitectureHelper.GetPlayerArtchitecture(), m_Settings.MpdnVersionOnServer));
         GuiThread.Do((Application.Exit));
     });
     m_DownloadingWebFile.DownloadFile();
 }
Esempio n. 2
0
        private void ClientAuth(StreamWriter writer, string msgValue, Guid clientGuid)
        {
            WriteToSpecificClient(writer, "AuthCode|" + msgValue);
            var allow = false;

            GuiThread.Do(() =>
                         allow =
                             MessageBox.Show(Gui.VideoBox, "Allow Remote Connection for " + msgValue, "Remote Authentication",
                                             MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes);
            if (allow)
            {
                WriteToSpecificClient(writer, "Connected|Authorized");
                WriteToSpecificClient(writer, "ClientGUID|" + clientGuid);
                m_AuthHandler.AddAuthedClient(msgValue);
                if (m_ClientManager.Visible)
                {
                    m_ClientManager.ForceUpdate();
                }
            }
            else
            {
                DisconnectClient(writer, "Unauthorized", clientGuid);
            }
        }
Esempio n. 3
0
 private void InstallerOnDownloaded(object sender)
 {
     ((WebFile)sender).Start();
     GuiThread.Do((Application.Exit));
 }