예제 #1
0
        public static TSOConfig Load(string source_file)
        {
            XmlReader     reader     = XmlReader.Create(source_file);
            XmlSerializer serializer = new XmlSerializer(typeof(TSOConfig));
            TSOConfig     config     = serializer.Deserialize(reader) as TSOConfig;

            reader.Close();
            return(config);
        }
예제 #2
0
 public Form1()
 {
     InitializeComponent();
     if (File.Exists(config_file))
     {
         config = TSOConfig.Load(config_file);
     }
     else
     {
         config = new TSOConfig();
     }
     propertyGrid1.SelectedObject = config;
 }