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

LoadConfig() public method

public LoadConfig ( ) : void
return void
        public void LoadConfig()
        {
            string loadfile = configfile;

            if (!File.Exists(configfile))
            {
                if (!File.Exists(configfiledefault))
                {
                    return;
                }
                else
                {
                    loadfile = configfiledefault;
                }
            }

            System.Xml.Serialization.XmlSerializer reader =
                new System.Xml.Serialization.XmlSerializer(typeof(List<CheckListItem>),
                    new Type[] { typeof(CheckListItem) });

            using (StreamReader sr = new StreamReader(loadfile))
            {
                CheckListItems = (List<CheckListItem>)reader.Deserialize(sr);
            }
        }