void deleteProductWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (e.Error != null)
            {
                StatusView.ShowError("Connection Error",
                                     "There was an error while connecting to the server." + Environment.NewLine +
                                     "Please check your connection settings and user credentials.");
                this.products.Clear();
                this.plugins.Clear();
            }
            else
            {
                this.products = new List <DeploymentService.ProductDescription>(
                    (DeploymentService.ProductDescription[])((object[])e.Result)[0]);
                this.plugins = new List <DeploymentService.PluginDescription>(
                    (DeploymentService.PluginDescription[])((object[])e.Result)[1]);

                EnableControls();
            }
            UpdateProductsList();
            dirtyProducts.Clear();
            StatusView.HideProgressIndicator();
            StatusView.RemoveMessage(DeleteProductMessage);
            StatusView.UnlockUI();
        }
Esempio n. 2
0
        private void updateAndInstallButton_Click(object sender, EventArgs e)
        {
            var installedPlugins = pluginManager.Plugins.OfType <IPluginDescription>().ToList();

            updatePluginsBackgroundWorker.RunWorkerAsync(installedPlugins);
            StatusView.LockUI();
            StatusView.ShowProgressIndicator();
            StatusView.RemoveMessage(NoUpdatesAvailableMessage);
            StatusView.ShowMessage(CheckingPluginsMessage);
        }
Esempio n. 3
0
 void updatePluginsBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         StatusView.ShowError("Connection Error",
                              "There was an error while connecting to the server." + Environment.NewLine +
                              "Please check your connection settings and user credentials.");
     }
     StatusView.RemoveMessage(CheckingPluginsMessage);
     StatusView.HideProgressIndicator();
     UpdateControl();
     StatusView.UnlockUI();
 }
Esempio n. 4
0
        private void updateSelectedButton_Click(object sender, EventArgs e)
        {
            StatusView.LockUI();
            StatusView.ShowProgressIndicator();
            StatusView.RemoveMessage(NoUpdatesAvailableMessage);
            StatusView.ShowMessage(CheckingPluginsMessage);
            var checkedPlugins = localPluginsListView.CheckedItems.OfType <ListViewItem>()
                                 .Select(item => item.Tag)
                                 .OfType <IPluginDescription>()
                                 .ToList();

            updatePluginsBackgroundWorker.RunWorkerAsync(checkedPlugins);
        }
 void refreshServerPluginsBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
   if (e.Error != null) {
     StatusView.ShowError("Connection Error",
       "There was an error while connecting to the server." + Environment.NewLine +
       "Please check your connection settings and user credentials.");
   } else {
     RefreshBackgroundWorkerResult refreshResult = (RefreshBackgroundWorkerResult)e.Result;
     products = refreshResult.RemoteProducts;
     plugins = refreshResult.RemotePlugins;
     UpdateControl();
   }
   StatusView.UnlockUI();
   StatusView.RemoveMessage(PluginDiscoveryMessage);
   StatusView.HideProgressIndicator();
 }
Esempio n. 6
0
 void refreshPluginsWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         StatusView.ShowError("Connection Error",
                              "There was an error while connecting to the server." + Environment.NewLine +
                              "Please check your connection settings and user credentials.");
     }
     else
     {
         UpdatePluginListView((IEnumerable <IPluginDescription>)e.Result);
     }
     StatusView.HideProgressIndicator();
     StatusView.RemoveMessage(RefreshMessage);
     StatusView.UnlockUI();
 }