public void AutoOpen() { try { AddinContext.ConfigManager = new ConfigurationManagerWrapper(); // Settings the path to the Add-In AddinContext.Settings.AddinPath = (string)XlCall.Excel(XlCall.xlGetName); // Token cancellation is useful to close all existing Tasks<> before leaving the application AddinContext.TokenCancellationSource = new CancellationTokenSource(); // The Excel Application object AddinContext.ExcelApp = new Application(null, ExcelDnaUtil.Application); // Start the bootstrapper now new Bootstrapper(AddinContext.TokenCancellationSource.Token).Start(); } catch (Exception e) { LogDisplay.RecordLine(e.Message); LogDisplay.RecordLine(e.StackTrace); LogDisplay.Show(); } }
public void AutoOpen() { try { // The Excel Application object AddinContext.ExcelApp = new Application(null, ExcelDnaUtil.Application); } catch (Exception e) { LogDisplay.RecordLine(e.Message); LogDisplay.RecordLine(e.StackTrace); LogDisplay.Show(); } }
public void Emit(LogEvent logEvent) { EnsureNotDisposed(); var stringWriter = new StringWriter(new StringBuilder(256)); _formatter.Format(logEvent, stringWriter); lock (_syncRoot) { LogDisplay.DisplayOrder = _displayOrder; LogDisplay.RecordLine(stringWriter.ToString()); } }
public void AutoOpen() { try { // Token cancellation is useful to close all existing Tasks<> before leaving the application AddinContext.TokenCancellationSource = new CancellationTokenSource(); AddinContext.ExcelApp = new Xl.Application(null, ExcelDnaUtil.Application); // Start the bootstrapper now new Bootstrapper(AddinContext.TokenCancellationSource.Token).Start(); } catch (Exception e) { LogDisplay.RecordLine(e.Message); LogDisplay.RecordLine(e.StackTrace); LogDisplay.Show(); } }
public override void RecordLine(string format, params object[] args) { LogDisplay.RecordLine(format, args); }
public static void logError(string callerAddress, string callerName, string Message) { OHRepository.Instance.storeErrorMsg(callerAddress, Message); LogDisplay.RecordLine("{0}\t{1}\t{2}", callerAddress, callerName, Message); }