MissionPlanner.Controls.PreFlight.CheckListControl.SaveConfig C# (CSharp) Method

SaveConfig() public method

public SaveConfig ( ) : void
return void
        public void SaveConfig()
        {
            // save config
            System.Xml.Serialization.XmlSerializer writer =
                new System.Xml.Serialization.XmlSerializer(typeof(List<CheckListItem>),
                    new Type[] { typeof(CheckListItem), typeof(Color) });

            using (StreamWriter sw = new StreamWriter(configfile))
            {
                lock (CheckListItems)
                {
                    writer.Serialize(sw, CheckListItems);
                }
            }
        }

Usage Example

Example #1
0
 private void BUT_save_Click(object sender, EventArgs e)
 {
     _parent.SaveConfig();
 }