예제 #1
0
파일: MainForm.cs 프로젝트: akx/ltag
 private void loadSettingsButton_Click(object sender, EventArgs e)
 {
     var path = GetIniPath();
     if (!File.Exists(path))
     {
         SetStatus("No INI file at " + path);
         return;
     }
     var iser = new IniSerializer();
     using (var tw = new StreamReader(path, Encoding.UTF8))
     {
         iser.Parse(tw.ReadToEnd());
         iser.UpdateObject("Tracker", _tracker);
         iser.UpdateObject("StrokeRecognizer", _strokeRecognizer);
         iser.UpdateObject("Drawing", _drawing);
         iser.UpdateObject("DrawParams", _drawWindow.DrawParams);
         UpdatePropertyGrids();
         SetStatus("Loaded from " + path);
     }
 }