Пример #1
0
 public void ShowMessage()
 {
     logger.Debug("Inside show message method");
     LogDisplay.Clear();
     LogDisplay.WriteLine("Button Clicked");
     LogDisplay.Show();
 }
Пример #2
0
        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();
            }
        }
Пример #3
0
 public void ViewLogDisplayButton_OnAction(IRibbonControl control)
 {
     try
     {
         LogDisplay.Show();
     }
     catch (Exception ex)
     {
         ProcessUnhandledException(ex);
     }
 }
Пример #4
0
 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();
     }
 }
Пример #5
0
        public void AutoOpen()
        {
            Log.Logger = new LoggerConfiguration()
                         .MinimumLevel.Verbose()
                         .Enrich.WithXllPath()
                         .Enrich.WithExcelVersion()
                         .Enrich.WithExcelVersionName()
                         .Enrich.WithExcelBitness()
                         .WriteTo.ExcelDnaLogDisplay(displayOrder: DisplayOrder.NewestFirst,
                                                     outputTemplate: "{Properties:j}{NewLine}[{Level:u3}] {Message:lj}{NewLine}{Exception}")
                         .CreateLogger();

            Log.Information("Hello from {AddInName}! :)", DnaLibrary.CurrentLibrary.Name);
            LogDisplay.Show();

            ExcelComAddInHelper.LoadComAddIn(this);
        }
Пример #6
0
        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();
            }
        }
Пример #7
0
 public void Error_Click(IRibbonControl control_)
 {
     LogDisplay.Show();
 }
 public override void Show()
 {
     LogDisplay.Show();
 }
Пример #9
0
 public static void dnaLogDisplayShow()
 {
     LogDisplay.Show();
 }
Пример #10
0
 public static void ShowLogWindow()
 {
     LogDisplay.Show();
 }
Пример #11
0
 public void OnLogButtonPressed(IRibbonControl control)
 {
     LogDisplay.Show();
 }