Example #1
0
        public void serialize(ConfigFile configFile)
        {
            if (Serialize)
            {
                ConfigSection section = configFile.createOrRetrieveConfigSection(persistName);
                section.setValue("Location", desiredLocation.ToString());
                section.setValue("DockLocation", CurrentDockLocation.ToString());
                section.setValue("Scale", Scale);
                section.setValue("DockedSize", dockedSize.ToString());

                customSerialize(section, configFile);
            }
        }
Example #2
0
 protected void loadDockProperties(ConfigSection section)
 {
     try
     {
         CurrentDockLocation = (DockLocation)Enum.Parse(typeof(DockLocation), section.getValue("DockLocation", () => CurrentDockLocation.ToString()));
     }
     catch (Exception)
     {
         Log.Warning("Could not load DockLocation for {0}, using default instead.", persistName);
     }
     Scale = section.getValue("Scale", Scale);
 }