Esempio n. 1
0
        /// <summary>
        /// Validates the plugin.
        /// </summary>
        /// <param name="plugin">The plugin.</param>
        /// <returns></returns>
        private bool ValidatePlugin(Plugin plugin)
        {
            bool result = false;

            try {
                string displayName = plugin.DisplayName;

                result = true;
            } catch (Exception ex) {
                Trace.WriteLine(ex.Message, ex.StackTrace, LogCategory.Error);
            }

            return result;
        }
Esempio n. 2
0
        /// <summary>
        /// Loads the tool childs.
        /// </summary>
        /// <param name="parent">The parent.</param>
        /// <param name="clone">The clone.</param>
        /// <param name="_pluginManager">The manager.</param>
        private void LoadToolChilds(Plugin parent, Plugin clone)
        {
            foreach (Tool m in parent.Childs.FindAll(c => c is Tool)) {
                Tool tool = _pluginManager.Plugins.Find(p => p.Fullname == m.Fullname && p.AssemblyFile == m.AssemblyFile) as Tool;
                Tool toolClone = tool.Clone() as Tool;
                toolClone.UID = m.UID;
                toolClone.Name = m.Name;

                toolClone.SetParent(clone);
                CloneProperties(m, toolClone);

                clone.Childs.Add(toolClone);
                Trace.WriteLine("Added tool: " + toolClone.Name + " (" + toolClone.UID + ")", LogCategory.Debug);
                LoadToolChilds(m, toolClone);
            }
        }
 public PluginStatusChangedEventArgs(Plugin plugin, PluginStatus status) {
     _plugin = plugin;
     _status = status;
 }