Exemplo n.º 1
0
 private void Disable()
 {
     _pluginService.RemovePublicAssemblies(SelectedAPI.Assemblies);
     _pluginService.SavePluginConfig();
     SelectedAPI.Enabled          = false;
     DisableCommand.SetCanExecute = false;
     EnableCommand.SetCanExecute  = true;
     EnableCommand.RaiseCanExecuteChanged();
     DisableCommand.RaiseCanExecuteChanged();
 }
Exemplo n.º 2
0
        private void Enable()
        {
            var termsDialog = new TermsDialog();

            var result = termsDialog.ShowDialog();

            if (result.HasValue && result.Value)
            {
                _pluginService.AddPublicAssemblies(SelectedAPI.Assemblies);
                _pluginService.SavePluginConfig();
                SelectedAPI.Enabled          = true;
                EnableCommand.SetCanExecute  = false;
                DisableCommand.SetCanExecute = true;
                EnableCommand.RaiseCanExecuteChanged();
                DisableCommand.RaiseCanExecuteChanged();
            }
        }