Example #1
0
        public void EditProperties()
        {
            object macro = XmlTool.DeserializeObject(m_file.DataDiskPath);

            if (EditPropertiesForm.Run(macro, true))
            {
                XmlTool.SerializeObject(m_file.DataDiskPath, macro);
            }
        }
Example #2
0
        public void SaveToFile(string file, string pycode)
        {
            XmlTool.SerializeObject(file, this);
            string pyfile = Path.ChangeExtension(file, ".py");

            using (StreamWriter fw = new StreamWriter(pyfile, false))
            {
                fw.Write(pycode);
            }
        }
Example #3
0
 public static void Save()
 {
     try
     {
         if (GlobalSettings.Pages.Cache().CacheMode == CacheMode.UsePersistent)
         {
             XmlTool.SerializeObject(Filename, Instance);
         }
     }
     catch (Exception err)
     {
         Logging.Warning("Error saving UI cache:" + err.Message);
     }
 }
Example #4
0
 public void SaveCustom()
 {
     XmlTool.SerializeObject(Path.Combine(Core.ConfigDirectory, "drivers.xml"), m_customDrivers);
 }