private void btnSettings_Click(object sender, RibbonControlEventArgs e) { try { frmOptions myOptions = new frmOptions(); myOptions.ShowDialog(); if (myOptions.DialogResult == DialogResult.OK) { // Refresh the drop down items this.LoadDropDown(); // Refresh the command bar this.ShowHideButtons(); } } catch (System.Exception ex) // TODO we should not catch all exceptions { MessageBox.Show("caught: \r\n" + ex.ToString()); } }
private void Settings(Office.CommandBarButton btn, ref bool cancel) { try { frmOptions myOptions = new frmOptions(); myOptions.ShowDialog(); if (myOptions.DialogResult == DialogResult.OK) { // Refresh the drop down items this.LoadDropDown(); // Refresh the command bar this.ShowHideButtons(); } } catch (System.Exception ex) // TODO we should not catch all exceptions { MessageBox.Show("caught: \r\n" + ex.ToString()); } }