Ejemplo n.º 1
0
 public void ShowMessage()
 {
     logger.Debug("Inside show message method");
     LogDisplay.Clear();
     LogDisplay.WriteLine("Button Clicked");
     LogDisplay.Show();
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 3
0
 public void ViewLogDisplayButton_OnAction(IRibbonControl control)
 {
     try
     {
         LogDisplay.Show();
     }
     catch (Exception ex)
     {
         ProcessUnhandledException(ex);
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 7
0
 public void Error_Click(IRibbonControl control_)
 {
     LogDisplay.Show();
 }
 public override void Show()
 {
     LogDisplay.Show();
 }
Ejemplo n.º 9
0
 public static void dnaLogDisplayShow()
 {
     LogDisplay.Show();
 }
Ejemplo n.º 10
0
 public static void ShowLogWindow()
 {
     LogDisplay.Show();
 }
Ejemplo n.º 11
0
 public void OnLogButtonPressed(IRibbonControl control)
 {
     LogDisplay.Show();
 }