private void refreshButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(RefreshMessage); refreshProductsWorker.RunWorkerAsync(); }
private void saveButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(UploadMessage); uploadChangedProductsWorker.RunWorkerAsync(dirtyProducts); }
private void refreshRemoteButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(PluginDiscoveryMessage); refreshServerPluginsBackgroundWorker.RunWorkerAsync(); }
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); }
private void deleteProductButton_Click(object sender, EventArgs e) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(DeleteProductMessage); var selectedProducts = from item in productsListView.SelectedItems.OfType <ListViewItem>() select(DeploymentService.ProductDescription) item.Tag; deleteProductWorker.RunWorkerAsync(selectedProducts.ToList()); }
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); }
private void uploadButton_Click(object sender, EventArgs e) { var selectedPlugins = from item in listView.Items.Cast <ListViewItem>() where item.Checked where item.Tag is IPluginDescription select item.Tag as IPluginDescription; if (selectedPlugins.Count() > 0) { StatusView.LockUI(); StatusView.ShowProgressIndicator(); StatusView.ShowMessage(UploadMessage); pluginUploadWorker.RunWorkerAsync(selectedPlugins.ToList()); } }
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(); }