void AfterDownload() { if (mDownloadWindow != null) { mDownloadWindow.Hide(); mDownloadWindow.Dispose(); mDownloadWindow = null; } }
private void RemoteActionButton2_Click(object sender, EventArgs e) { if (mDownloadWindow == null) { mDownloadWindow = new DownloadPluginProgressWindow(); mDownloadWindow.Location = System.Windows.Forms.Cursor.Position; mDownloadWindow.Show(this); } try { if (SelectedRssItem != null && !string.IsNullOrEmpty(SelectedRssItem.DirectLink)) { // I wrote this for Glue, didn't realize it was also being used by GlueView #if GLUE try { EditorObjects.IoC.Container.Get <PluginUpdater>().StartDownload(SelectedRssItem.DirectLink, AfterDownload); } catch (Exception exc) { MessageBox.Show("Failed to download plugin\n\n" + exc); } #endif } } catch (Exception exception) { MessageBox.Show("Error downloading:\n\n" + exception.Message); if (mDownloadWindow != null) { mDownloadWindow.Hide(); mDownloadWindow.Dispose(); mDownloadWindow = null; } } }
void AfterDownload() { if (mDownloadWindow != null) { mDownloadWindow.Hide(); mDownloadWindow.Dispose(); mDownloadWindow = null; } }
private void RemoteActionButton2_Click(object sender, EventArgs e) { if (mDownloadWindow == null) { mDownloadWindow = new DownloadPluginProgressWindow(); mDownloadWindow.Location = System.Windows.Forms.Cursor.Position; mDownloadWindow.Show(this); } try { if (SelectedRssItem != null && !string.IsNullOrEmpty(SelectedRssItem.DirectLink)) { // I wrote this for Glue, didn't realize it was also being used by GlueView #if GLUE try { EditorObjects.IoC.Container.Get<PluginUpdater>().StartDownload(SelectedRssItem.DirectLink, AfterDownload); } catch (Exception exc) { MessageBox.Show("Failed to download plugin\n\n" + exc); } #endif } } catch(Exception exception) { MessageBox.Show("Error downloading:\n\n" + exception.Message); if (mDownloadWindow != null) { mDownloadWindow.Hide(); mDownloadWindow.Dispose(); mDownloadWindow = null; } } }