Exemple #1
0
 public static bool IsPlayerInstalled()
 {
     return(RegistryValueExists(RegistryRoot.HKLM,
                                string.Format("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MediaPlayerDotNet_{0}",
                                              ArchitectureHelper.GetPlayerArtchitecture())
                                , "DisplayVersion"));
 }
Exemple #2
0
        private WebFile UpdatePlayer()
        {
            var arch      = ArchitectureHelper.GetPlayerArtchitecture().ToString();
            var installer =
                m_Settings.MpdnVersionOnServer.GenerateSplitButtonItemList()
                .First(file => file.Name.Contains(arch) && file.IsFile && file.Name.Contains("Installer"));

            downloadProgressBar.CustomText = installer.Name;
            return(new TemporaryWebFile(new Uri(installer.Url)));
        }
        protected virtual SplitButtonToolStripItem DefaultDownloadFile()
        {
            if (Settings.LastMpdnReleaseChosen != null)
            {
                return(SplitMenuChoices.First(file => file.Name == Settings.LastMpdnReleaseChosen));
            }

            return
                (SplitMenuChoices.First(
                     file => file.Name.Contains(ArchitectureHelper.GetPlayerArtchitecture().ToString())) ??
                 SplitMenuChoices[0]);
        }
Exemple #4
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();
 }