Exemplo n.º 1
0
        public MainWindow(Settings settings)
        {
            StaticServer.instance.ReportEvent("startupApp");
            inputSimulator = new InputSimulator();
            InitializeComponent();

            _tempDirPath = settings.TempDirPath;

            _yandexSpeech = settings.YandexSpeech;

            _host = settings.Host;

            ChangeSettings(settings);

            _cards = new List <Card>();

            cardBoard.ClickOnCardButton  += cardButton_Click;
            cardBoard.CountPagesChanged  += CardBoard_CountPagesChanged;
            cardBoard.CurrentPageChanged += CardBoard_CurrentPageChanged;
            cardBoard.Cards = _cards;

            _words = new List <Card>();
            try
            {
                var joystick = new Joysticks();
                joystick.JoystickButtonDown += Joystick_JoystickButtonDown;
            } catch (Exception e)
            {
            }
            _player = new Player(_yandexSpeech);
        }
Exemplo n.º 2
0
        public SettingsWindow(Settings settings)
        {
            InitializeComponent();

            _settings = settings.Clone() as Settings;

            InitActions();

            _joysticks = new Joysticks();
            _joysticks.JoystickButtonDown += Joystick_JoystickButtonDown;

            isHazGazeEnabledCheckBox.IsChecked       = _settings.IsHasGazeEnabled;
            isAnimatedClickEnabledCheckBox.IsChecked = _settings.IsAnimatedClickEnabled;
            isPlayAudioFromCardCheckBox.IsChecked    = _settings.IsPlayAudioFromCard;
            isPageButtonVisibleCheckBox.IsChecked    = _settings.IsPageButtonVisible;

            isJoystickEnabledCheckBox.IsChecked = _settings.IsJoystickEnabled;
            isKeyboardEnabledCheckBox.IsChecked = _settings.IsKeyboardEnabled;
            isMouseEnabledCheckBox.IsChecked    = _settings.IsMouseEnabled;
            isOutputTypeCheckBox.IsChecked      = _settings.IsOutputType;

            voiceSelect.ItemsSource   = YandexVoice.VOICES;
            voiceSelect.SelectedIndex = YandexVoice.FindIndexById(_settings.VoiceId);

            DataContext = _settings;
        }
        public SettingsWindow(Settings settings)
        {
            InitializeComponent();

            _settings = settings.Clone() as Settings;

            InitActions();

            _joysticks = new Joysticks();
            _joysticks.JoystickButtonDown += Joystick_JoystickButtonDown;

            isHazGazeEnabledCheckBox.IsChecked       = _settings.IsHasGazeEnabled;
            isAnimatedClickEnabledCheckBox.IsChecked = _settings.IsAnimatedClickEnabled;
            isPlayAudioFromCardCheckBox.IsChecked    = _settings.IsPlayAudioFromCard;
            isPageButtonVisibleCheckBox.IsChecked    = _settings.IsPageButtonVisible;

            isJoystickEnabledCheckBox.IsChecked = _settings.IsJoystickEnabled;
            isKeyboardEnabledCheckBox.IsChecked = _settings.IsKeyboardEnabled;
            isMouseEnabledCheckBox.IsChecked    = _settings.IsMouseEnabled;

            DataContext = _settings;
        }