Ejemplo n.º 1
0
        public SettingsWindow()
        {
            InitializeComponent();

            _textBox.Text       = Settings.Default.ProcessName;
            _colorTolerBox.Text = Settings.Default.ColorTolerance.ToString();

            if (!string.IsNullOrWhiteSpace(Settings.Default.BattleConditions))
            {
                var parts = ColorPoint.ParseCollection(Settings.Default.BattleConditions).ToList();
                _tb1.Text = parts[0].ToString();
                _tb2.Text = parts[1].ToString();
            }
        }
Ejemplo n.º 2
0
        private void Start()
        {
            if (SelectedProcess == null)
            {
                MessageBox.Show("Необходимо выбрать процесс.");
                return;
            }

            _emulationSettings.Process = SelectedProcess;

            var character = new Character(SelectedProcess);

            foreach (var colorPointCondition in ColorPoint.ParseCollection(Settings.Default.BattleConditions))
            {
                character.InBattleConditions.Add(colorPointCondition);
            }
            _emulationSettings.Character = character;

            _statistics.EmulationStart = DateTime.Now;

            _timer = new Timer(Work, _emulationSettings, TimeSpan.FromSeconds(1), Settings.Default.TimerInterval);

            TuneControls();
        }