Example #1
0
        private void SaveToMainStrategyFile()
        {
            StrategyLoader LoadWindow = new StrategyLoader();

            if ((_currentStrategy != null) && (_currentStrategy.Name != "NotSet"))
                LoadWindow.Save(_currentStrategy.Name);
            else
                LoadWindow.Save();

            // Lecture du nom de la stratégie
            String strategyToSave = LoadWindow.SelectedStrategyName;

            if (strategyToSave != "")
            {
                _currentStrategy.Name = strategyToSave;
                _currentStrategy.Save();
                _mainModel.UpdateRobotActionList();
            }

            LoadWindow = null;
        }
Example #2
0
        private void LoadMainStrategyFile()
        {
            StrategyLoader LoadWindow = new StrategyLoader();
            LoadWindow.Load();

            // Lecture du nom de la stratégie
            String strategyToLoad = LoadWindow.SelectedStrategyName;

            if (strategyToLoad != "")
            {
                _currentStrategy.Clear();
                _currentStrategy.Load(strategyToLoad);
                _mainModel.UpdateRobotActionList();
            }

            LoadWindow = null;
        }