Exemplo n.º 1
0
            public RuntimeVariables()
            {
                string filename = "settings.xml";

                persistence = new XMLPersistenceDictionary(logger, filename, false);
                if (!System.IO.File.Exists(filename))
                {
                    persistence.save();
                }
            }
Exemplo n.º 2
0
 public SteamToys(OnyLib.BotStuff _bstuff)
 {
     BotStuff = _bstuff;
     persistence = BotStuff.OnyVariables.persistence;
 }
Exemplo n.º 3
0
 public Toys(OnyLib.BotStuff _bstuff)
 {
     BotStuff    = _bstuff;
     persistence = BotStuff.OnyVariables.persistence;
     logger      = BotStuff.OnyVariables.logger;
 }
Exemplo n.º 4
0
 public Toys(OnyLib.BotStuff _bstuff)
 {
     BotStuff = _bstuff;
     persistence = BotStuff.OnyVariables.persistence;
     logger = BotStuff.OnyVariables.logger;
 }
Exemplo n.º 5
0
 savenode[] SearchNodesByObject(string Obj, XMLPersistenceDictionary dict, bool recursive)
 {
     List<savenode> returnnodes = new List<savenode>();
     foreach (var item in dict)
     {
         if (item.obj.ToLower().Contains(Obj.ToLower()))
         {
             returnnodes.Add(item);
             if (!checkedlistnodelinks.ContainsKey(item.ToString()))
                 checkedlistnodelinks.Add(item.ToString(), item);
         }
         if (recursive)
             returnnodes.AddRange(SearchNodesByObject(Obj, item.childnodes, true));
     }
     return returnnodes.ToArray();
 }
Exemplo n.º 6
0
        XMLPersistenceDictionary readOnymityXML()
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.CheckFileExists = true;
            if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                OnymityDatasaving.OnymityDatasaving onymityxml = new OnymityDatasaving.OnymityDatasaving();
                try
                {
                    onymityxml.load(ofd.FileName);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Failed to read the XML!\n" + ex.Message);
                    cedlibxml = null;
                    return null;
                }

                XMLPersistenceDictionary dict = new XMLPersistenceDictionary("cedlibxml.xml", false);
                foreach (var item in onymityxml.xmldict.innerdict)
                {
                    savenode cursnode = new savenode(item.name, item.obj);
                    cedlibxml.Add(cursnode);
                    fillCedLibXMLTree(cursnode, item);
                }
                onymityxml = null;
                return dict;
            }
            else return null;
        }
Exemplo n.º 7
0
 private void openCedLibXMLToolStripMenuItem_Click(object sender, EventArgs e)
 {
     groupBox_edit.Enabled = false;
     cedlibxml = readCedLibXML();
     if (cedlibxml == null)
         return;
     CreateTreeview();
 }
Exemplo n.º 8
0
 void Mergedicts(XMLPersistenceDictionary foreigndict, XMLPersistenceDictionary curdict)
 {
     foreach (var item in foreigndict)
     {
         curdict.Add(item);
         Mergedicts(item.childnodes, curdict[item.name].childnodes);
     }
 }
Exemplo n.º 9
0
 void deletenode(XMLPersistenceDictionary dict, savenode node)
 {
     foreach (var item in dict)
     {
         if (dict.Contains(node))
         {
             dict.Remove(node);
             return;
         }
         deletenode(item.childnodes, node);
     }
 }
Exemplo n.º 10
0
 public RuntimeVariables()
 {
     persistence = new XMLPersistenceDictionary(logger, "funcpersistence.xml", false);
 }
Exemplo n.º 11
0
 public SteamToys(OnyLib.BotStuff _bstuff)
 {
     BotStuff    = _bstuff;
     persistence = BotStuff.OnyVariables.persistence;
 }
Exemplo n.º 12
0
 public PriviligedFunctions(OnyLib.BotStuff.RuntimeVariables _runvars)
 {
     RunVars = _runvars;
     logger = RunVars.logger;
     persistence = RunVars.persistence;
 }
Exemplo n.º 13
0
 public PriviligedFunctions(OnyLib.BotStuff.RuntimeVariables _runvars)
 {
     RunVars     = _runvars;
     logger      = RunVars.logger;
     persistence = RunVars.persistence;
 }
Exemplo n.º 14
0
 public RuntimeVariables()
 {
     persistence = new XMLPersistenceDictionary(logger, "funcpersistence.xml", false);
 }
Exemplo n.º 15
0
            public RuntimeVariables()
            {
                string filename = "settings.xml";

                persistence = new XMLPersistenceDictionary(logger, filename, false);
                if (!System.IO.File.Exists(filename))
                    persistence.save();
            }