Exemple #1
0
        private void Recorder_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            var controller = KeyboardContorller.GetInstence();

            if (!controller.Recorder.IsRecording && !controller.Player.IsPlaying)
            {
                CurrentState = "Ready";
            }
            else if (e.PropertyName == "IsRecording" && controller.Recorder.IsRecording)
            {
                CurrentState = "Recording";
            }
            else if (e.PropertyName == "IsPlaying" && controller.Player.IsPlaying)
            {
                CurrentState = "Playing";
            }
        }
Exemple #2
0
 public GameStateViewModel()
 {
     GameStateGetter();
     KeyboardContorller.GetInstence().PropertyChanged += Recorder_PropertyChanged;
 }
 public KeyboardStateViewModel()
 {
     KeyboardLogInfos = new ObservableCollection <KeyboardLogInfo>();
     KeyboardContorller.GetInstence().KeyEvent        += KeyboardRecorder_KeyLogEvent;
     KeyboardContorller.GetInstence().PropertyChanged += KeyboardRecorder_PropertyChanged;
 }