/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { StringBuilder sbTrace = new StringBuilder(); try { sbTrace.AppendLine("Start"); Logger.SaveLoggerTrace(sbTrace); //this.Close(); AboutAddIn form = AboutAddIn.GetInstance(); form.Hide(); } catch (Exception ex) { sbTrace.Clear(); sbTrace.AppendLine("Exception" + ex); Logger.SaveLoggerTrace(sbTrace); Logger.LogWriter(ex.StackTrace); } finally { sbTrace.Clear(); sbTrace.AppendLine("End"); Logger.SaveLoggerTrace(sbTrace); } }
/// <summary> /// Call OnAboutAddIn method in legal ribbon /// </summary> /// <param name="control"></param> public void OnAboutAddIn(Office.IRibbonControl control) { StringBuilder sbTrace = new StringBuilder(); try { sbTrace.AppendLine("Start"); Logger.SaveLoggerTrace(sbTrace); //Tools.Instance.Help(); objAboutAddIn = AboutAddIn.GetInstance(); if (!objAboutAddIn.Visible) { objAboutAddIn.Show(); } else { objAboutAddIn.BringToFront(); } } catch (Exception ex) { sbTrace.Clear(); sbTrace.AppendLine("Exception" + ex); Logger.SaveLoggerTrace(sbTrace); Logger.LogWriter(ex.StackTrace); } finally { sbTrace.Clear(); sbTrace.AppendLine("End"); Logger.SaveLoggerTrace(sbTrace); } }
/// <summary> /// /// </summary> /// <returns></returns> public static AboutAddIn GetInstance() { if (_instance == null) { _instance = new AboutAddIn(); } return(_instance); }