Exemplo n.º 1
0
        private void StartupHandler_ExtensionChanged(object sender, Mono.Addins.ExtensionNodeEventArgs args)
        {
            LogDebug("OnStartChanged {");
            LogDebug($"  Path    - {args.Path}");
            LogDebug($"  Node    - {args.ExtensionNode}");
            LogDebug($"  Object  - {args.ExtensionObject}");
            LogDebug($"  Changed - {args.Change.ToString()}");

            Mono.Addins.TypeExtensionNode extNode = args.ExtensionNode as Mono.Addins.TypeExtensionNode;
            LogDebug($"  ExtNode: {extNode.ToString()}");

            LogDebug("  Running...");
            IStartupExtension ext = (IStartupExtension)args.ExtensionObject;

            ext.Run();

            LogDebug("}");
        }
Exemplo n.º 2
0
        private void OnStartupExtensionChanged(object sender, Mono.Addins.ExtensionNodeEventArgs args)
        {
            Log.Debug("###########################");
            Log.Debug("OnStartChanged {");
            Log.Debug($"  Id      - '{args.ExtensionNode.Id}'");
            Log.Debug($"  Path    - '{args.Path}'");
            Log.Debug($"  Node    - '{args.ExtensionNode}'");
            Log.Debug($"  Object  - '{args.ExtensionObject}'");
            Log.Debug($"  Changed - '{args.Change.ToString()}'");

            Mono.Addins.TypeExtensionNode extNode = args.ExtensionNode as Mono.Addins.TypeExtensionNode;
            Log.Debug("   --[ ExtensionNode ]------");
            Log.Debug($"  Id      - '{extNode.Id}'");
            Log.Debug($"  ToString- '{extNode.ToString()}'");
            Log.Debug($"  TypeName- '{extNode.TypeName}'");
            Log.Debug("# # # # # # # # # # #");

            Log.Debug("  Running...");
            IStartupExtension ext = (IStartupExtension)args.ExtensionObject;

            ext.Run();

            Log.Debug("}");
        }
Exemplo n.º 3
0
        private void AddinExecute()
        {
            Log.Debug("************************");
            Log.Debug("Add-in Execute");
            Log.Debug("{");

            // Get title and execute add-in
            foreach (TypeExtensionNode node in AddinManager.GetExtensionNodes(StartupExtensionPath))
            {
                IStartupExtension ext = (IStartupExtension)node.CreateInstance();
                Log.Debug($"  Running add-in titled, '{ext.Title}'");

                // Execute add-in
                ext.Run();

                foreach (NodeElement nloc in node.ChildNodes)
                {
                    MessageBox.Show("HEY! " + nloc.NodeName);
                }
            }

            Log.Debug("}");
            Log.Debug("* * * * * * * * * * * * *");
        }