Example #1
0
        /// <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);
        }
Example #2
0
        /// <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);
        }
Example #3
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public ConfigWindow()
        {
            InitializeComponent();

            Config config = new Config();

            ControlXml.ReadConfigXml(ref config);

            GetConfig(config);
        }