Beispiel #1
0
        async Task <bool> CheckToolInstalled(string displayName)
        {
            string      name = displayName.Trim();
            RegistryKey key  = Registry.CurrentUser.OpenSubKey(@"Software\Vibrance Player", true);
            object      obj  = key.GetValue(name);

            if (obj != null)
            {
                key.Close();
                return((int)obj == 1);
            }
            else
            {
                await DialogMaster.GetInstance().ShowDialogMessage(DialogType.ADDON_UPDATE, DialogSettingsType.YESNO, displayName);

                if (await DialogMaster.GetInstance().ShowDialogMessage(DialogType.ADDON_UPDATE,
                                                                       DialogSettingsType.YESNO, displayName) == MessageDialogResult.Affirmative)
                {
                    key.SetValue(name, 1);
                }
                else
                {
                    key.SetValue(name, 0);
                }
                key.Close();
                return(await CheckToolInstalled(displayName));
            }
        }
Beispiel #2
0
 internal void ApplyUpdate()
 {
     if (UpdateAvailable)
     {
         player.Dispatcher.Invoke(async() =>
         {
             player.update.Cursor    = Cursors.Hand;
             MessageDialogResult res = await DialogMaster.GetInstance().ShowUpdateDialog(_versionLocal, _versionOnline);
             if (res == MessageDialogResult.Affirmative)
             {
                 player.RestartApp();
             }
         });
     }
 }