public static Macro LoadFromFile(string file) { Macro res = (Macro)XmlTool.DeserializeObject(file); res.m_pyfile = Path.ChangeExtension(file, ".py"); return(res); }
public void EditProperties() { object macro = XmlTool.DeserializeObject(m_file.DataDiskPath); if (EditPropertiesForm.Run(macro, true)) { XmlTool.SerializeObject(m_file.DataDiskPath, macro); } }
public void ReloadCustom() { try { m_customDrivers = (DbDriverSet)XmlTool.DeserializeObject(Path.Combine(Core.ConfigDirectory, "drivers.xml")); } catch (Exception) { m_customDrivers = new DbDriverSet(); } }
public static void Load() { try { Instance = (UICache)XmlTool.DeserializeObject(Filename); if (Instance.ItemsForLoading.Count > 0 && Instance.Items.Count == 0) { Instance.ItemsForXml = Instance.ItemsForLoading; Instance.ItemsForLoading.Clear(); } } catch (Exception) { Instance = new UICache(); } }
public DbDriverManager() { try { m_customDrivers = (DbDriverSet)XmlTool.DeserializeObject(Path.Combine(Core.ConfigDirectory, "drivers.xml")); } catch (Exception) { m_customDrivers = new DbDriverSet(); } try { m_systemDrivers = (DbDriverSet)XmlTool.DeserializeObject(Path.Combine(Core.LibDirectory, "drivers.xml")); } catch (Exception) { m_systemDrivers = new DbDriverSet(); } foreach (DbDriverDefinition drv in m_systemDrivers.Drivers) { drv.IsSystem = true; } }