public ScoreControl(IUnityContainer container, IOutput output, IMidiInput midiInput, IInputEvents inputEvents, IMediaServiceHost mediaServiceHost, IVirtualKeyBoard virtualKeyboard, ILogger logger, XScore musicScore) : this() { _container = container; _output = output; _intputEvents = inputEvents; _midiInput = midiInput; _virtualKeyboard = virtualKeyboard; _musicScore = musicScore; _mediaServiceHost = mediaServiceHost; _logger = logger; _updateScrollTimer = new Timer(ScrollTimerHandler, null, Timeout.Infinite, _scrollTimingPerdiod); _scoreParser = new ScoreParser(_musicScore, ScoreGrid); _scoreParser.Render(); ScoreGrid.Width = _scoreParser.GetMaxHorizontalPosition(); nextBarDetails = new BarDetails(); nextBarDetails.NoteTime = 0; nextBarDetails.XCoord = 0; _intputEvents.MessageReceived += HandleInputEvent; _midiInput.StartRecording(); ConfigureSongEventController(); }
/// <summary> /// Creates a new recording session object /// </summary> /// <param name="midiInput">Expected to be injected</param> public RecordSession(IMidiInput midiInput, IOutput output, IVirtualKeyBoard virtualKeyboard) { _midiInput = midiInput; _output = output; _virtualKeyboard = virtualKeyboard; Init(); }
public NoteGuessViewModel(IOutput outputDevice, IInputEvents inputDevice, IVirtualKeyBoard keyBoard) { _testActive = false; _outputDevice = outputDevice; _keyboard = keyBoard; _goRelayCommand = new RelayCommand(StartTest, () => true); //Subscribe to input messages. inputDevice.MessageReceived += (o, e) => HandleInputDeviceInput(o, e); }
public KeyBoardControl(IVirtualKeyBoard keyBoard) : this() { keyBoard.DrawKeys(KeyBoardCanvas); _keyboard = keyBoard; var window = Application.Current.MainWindow; //Hookup keyboard presses window.KeyDown += (o, e) => _keyboard.HandleKeyboardPress(o, e); window.KeyUp += (o, e) => _keyboard.HandleKeyboardPress(o, e); }
//, ITestControlService currentTest) public MainWindowViewModel(IUnityContainer container, IMediaService mediaService, IDialogService dialogService, IOutput outputDevice, IMidiInput inputDevice, IVirtualKeyBoard keyBoard) { _container =container; _dialoagService = dialogService; _mediaService = mediaService; _output = outputDevice; _input = inputDevice; _keyBoard = keyBoard; //_currentTest = currentTest.Control; ResolveViews(); //Hook up keyboard (mouse presses) to output _keyBoard.KeyPressEvent += (o, e) => _output.Send(e); }
public MainWindowViewModel(IUnityContainer container, IMediaServiceHost mediaServiceHost, IDialogService dialogService, IOutput outputDevice, IMidiInput inputDevice, IVirtualKeyBoard keyBoard, ITestControlService currentTest, IInputEvents inputEvents) { _container = container; _dialoagService = dialogService; _mediaServiceHost = mediaServiceHost; _output = outputDevice; _input = inputDevice; _keyBoard = keyBoard; _currentTestControl = currentTest; availableTestControls = new ObservableCollection <ITestControlService>(); availableTestControls.Add(_currentTestControl); availableTestControls.Add(_container.Resolve <NoteGuess.NoteGuessControl>()); ResolveViews(); }
public MainWindowViewModel(IUnityContainer container, IMediaServiceHost mediaServiceHost, IDialogService dialogService, IOutput outputDevice, IMidiInput inputDevice, IVirtualKeyBoard keyBoard, ITestControlService currentTest, IInputEvents inputEvents) { _container =container; _dialoagService = dialogService; _mediaServiceHost = mediaServiceHost; _output = outputDevice; _input = inputDevice; _keyBoard = keyBoard; _currentTestControl = currentTest; availableTestControls = new ObservableCollection<ITestControlService>(); availableTestControls.Add(_currentTestControl); availableTestControls.Add(_container.Resolve<NoteGuess.NoteGuessControl>()); ResolveViews(); }
public KeyBoardControl(IVirtualKeyBoard keyBoard) : this() { keyBoard.DrawKeys(KeyBoardCanvas); }