/// <summary> /// xml設定ファイルから設定を読み込む /// </summary> public void SetConfigFromXml() { Config config = new Config(); ControlXml.ReadConfigXml(ref config); this._antSimulate.SetConfigAntWorld(config.Speed, config.MaxAntNum, config.AntAddSpan, config.AntLife); }
/// <summary> /// 保存ボタン /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void saveButton_Click(object sender, RoutedEventArgs e) { Config config = new Config(); SetConfig(ref config); ControlXml.WriteConfigXml(ref config); Application.Current.Shutdown(0); }
/// <summary> /// コンストラクタ /// </summary> public ConfigWindow() { InitializeComponent(); Config config = new Config(); ControlXml.ReadConfigXml(ref config); GetConfig(config); }