private void toolBarToolbar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e) { if (e.Button == this.toolBarButtonRefresh) { this.RefreshTree(); } else if (e.Button == this.toolBarButtonMode) { this.ChangeMode(); } else if (e.Button == this.toolBarButtonOpen) { this.Open(); } else if (e.Button == this.toolBarButtonExecute) { this.Execute(); } else if (e.Button == this.toolBarButtonExecuteSavedInput) { this.ExecuteSavedInput(); } else if (e.Button == this.toolBarButtonSaveInput) { this.SaveInput(); } else if (e.Button == this.toolBarButtonWeb) { try { if (templateLibrary == null) { templateLibrary = new WebTemplateLibrary(treeBuilder.IdPathHash); } templateLibrary.ShowDialog(this); foreach (string uniqueid in templateLibrary.UpdatedTemplateIDs) { this.OnTemplateUpdate(uniqueid); } this.RefreshTree(); } catch { templateLibrary = null; MessageBox.Show("The WebUpdate feature failed to connect to the server."); } } }
private void toolStripButtonWebLibrary_Click(object sender, EventArgs e) { try { if (_templateLibrary == null) { _templateLibrary = new WebTemplateLibrary(_treeBuilder.IdPathHash); } _templateLibrary.ShowDialog(this); foreach (string uniqueid in _templateLibrary.UpdatedTemplateIDs) { this.OnTemplateUpdate(uniqueid); } this.RefreshTree(); } catch { _templateLibrary = null; MessageBox.Show("The WebUpdate feature failed to connect to the server."); } }