Exemplo n.º 1
0
 public void RunInitialization()
 {
     AddInTree.Load(addInFiles, disabledAddIns);
     // run workspace autostart commands
     LoggingService.Info("Running autostart commands...");
     foreach (ICommand command in AddInTree.BuildItems <ICommand>("/Workspace/Autostart", null, false))
     {
         command.Run();
     }
 }
Exemplo n.º 2
0
 public void RunInitialization()
 {
     AddInTree.Load(this.addInFiles, this.disabledAddIns);
     foreach (ICommand current in AddInTree.BuildItems <ICommand>("/Workspace/Autostart", null, false))
     {
         try
         {
             current.Run(null, null);
         }
         catch (System.Exception ex)
         {
             LoggingService.Error(ex.Message + "\r\n" + ex.StackTrace);
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes the AddIn system.
        /// This loads the AddIns that were added to the list,
        /// then it executes the <see cref="ICommand">commands</see>
        /// in <c>/Workspace/Autostart</c>.
        /// </summary>
        public void RunInitialization()
        {
            AddInTree.Load(addInFiles, disabledAddIns);

            // run workspace autostart commands
            LoggingService.Info("Running autostart commands...");
            foreach (ICommand command in AddInTree.BuildItems <ICommand>("/Workspace/Autostart", null, false))
            {
                try {
                    command.Run();
                } catch (Exception ex) {
                    // allow startup to continue if some commands fail
                    MessageService.ShowError(ex);
                }
            }
        }