예제 #1
0
 void pluginUploadWorker_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.RemoveMessage(UploadMessage);
     StatusView.HideProgressIndicator();
     StatusView.UnlockUI();
 }
예제 #2
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.");
     }
     else if (e.Cancelled)
     {
         StatusView.ShowMessage(NoUpdatesAvailableMessage);
     }
     StatusView.RemoveMessage(CheckingPluginsMessage);
     StatusView.HideProgressIndicator();
     StatusView.UnlockUI();
 }
 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();
 }
 private void refreshProductsWorker_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]);
     }
     UpdateProductsList();
     dirtyProducts.Clear();
     EnableControls();
     StatusView.HideProgressIndicator();
     StatusView.RemoveMessage(RefreshMessage);
     StatusView.UnlockUI();
 }