Esempio n. 1
0
 private async void Button_Click_Install(object sender, RoutedEventArgs e)
 {
     if (_vm.Load.IsInstalling)
     {
         return;
     }
     if (AcceptedPlugins.IsAccepted(_vm.Plugin.PluginUUID))
     {
         await _vm.InstallOrUpdatePlugin();
     }
     else
     {
         var dialog = new CustomDialog(400, 300)
         {
             // Translate this???
             Title            = "Disclaimer on usage of 3rd party software",
             Description      = "NiceHash Miner integrates 3rd party mining software via the miner plugin system. However, since this is 3rd party software that is fully closed-source, we have no chance to inspect it in any way. NiceHash can not vouch for using that software and is refusing to take any responsibility for any damage caused, security breaches, loss of data or funds, system or hardware error, and other issues. By agreeing to this disclaimer you take full responsibility for using these closed-source miners as they are.",
             OkText           = Tr("I ACCEPT"),
             CancelText       = Tr("CANCEL"),
             AnimationVisible = Visibility.Collapsed
         };
         dialog.OKClick += async(s, e1) =>
         {
             AcceptedPlugins.Add(_vm.Plugin.PluginUUID);
             await _vm.InstallOrUpdatePlugin();
         };
         CustomDialogManager.ShowModalDialog(dialog);
     }
 }
Esempio n. 2
0
 private void Button_Click_Remove(object sender, RoutedEventArgs e)
 {
     _vm.IsUserActionRequired = false;
     AcceptedPlugins.Remove(_vm.PluginUUID);
     MinerPluginsManager.RemovePlugin(_vm.PluginUUID);
     OnAcceptOrDecline?.Invoke(sender, e);
 }
 private void Button_Click_Install(object sender, RoutedEventArgs e)
 {
     _vm.IsUserActionRequired = false;
     AcceptedPlugins.Add(_vm.PluginUUID);
     OnAcceptOrDecline?.Invoke(sender, e);
 }
Esempio n. 4
0
 private async void Button_Click_Uninstall(object sender, RoutedEventArgs e)
 {
     AcceptedPlugins.Remove(_vm.Plugin.PluginUUID);
     PluginActionsButtonContext.IsOpen = false;
     await _vm.UninstallPlugin();
 }