Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            object o = ListPlugins.SelectedItem;

            osalot.AssemblyTracker tracker = o as osalot.AssemblyTracker;
            tracker.removed = true;
            ListPlugins.Items.Remove(o);
        }
Example #2
0
 private void FillCurrentPluginSystems()
 {
     SystemList.Items.Clear();
     osalot.AssemblyTracker o = ListPlugins.SelectedItem as osalot.AssemblyTracker;
     if (o != null)
     {
         foreach (string system in o.allow_on_system)
         {
             SystemList.Items.Add(system);
         }
     }
 }
Example #3
0
        public static bool LoadAssembly(string p, osalot.AssemblyTracker use_assembly)
        {
            ToolStripMenuItem items;

            if (osalot.LoadAssembly(p, out items, MenuClick
                                    , new EventHandler(item_Click), use_assembly))
            {
                if (items != null)
                {
                    core_common.plugin_drop.DropDown.Items.Add(items);
                }
                return(true);
            }
            return(false);
        }
Example #4
0
        bool IReflectorPersistance.Load(System.Xml.XPath.XPathNavigator r)
        {
            if (r.NodeType == XPathNodeType.Element)
            {
                osalot.AssemblyTracker tracker = new osalot.AssemblyTracker();
                string location = null;
                switch (r.Name)
                {
                case "Plugins":
                    bool everokay = false;
                    bool okay;
                    for (okay = r.MoveToFirstAttribute(); okay; okay = r.MoveToNextAttribute())
                    {
                        everokay = true;
                        switch (r.Name)
                        {
                        case "Location":
                            location = r.Value;
                            break;
                        }
                    }
                    if (everokay)
                    {
                        r.MoveToParent();
                    }

                    everokay = false;
                    for (okay = r.MoveToFirstChild(); okay; okay = r.MoveToNext())
                    {
                        everokay = true;
                        switch (r.Name)
                        {
                        case "System Mask":
                            tracker.allow_on_system.Add(r.Value);
                            break;
                        }
                    }
                    if (everokay)
                    {
                        r.MoveToParent();
                    }
                    if (tracker.allow_on_system.Count == 0)
                    {
                        core_common.LoadAssembly(location, tracker);
                    }
                    else
                    {
                        foreach (String s in tracker.allow_on_system)
                        {
                            Match m = Regex.Match(SystemInformation.ComputerName, s);
                            if (m.Success)
                            {
                                core_common.LoadAssembly(location, tracker);
                                break;
                            }
                        }
                    }
                    return(true);
                }
                return(false);
            }
            return(false);
        }