private void Dispose(bool disposing) { DebugOutput("~~~~~~~~~~~~~~~~~~~~~~ InPlaceEditor.Dispose(" + disposing + ")" ENTER); #if DO_CLEANUP if (EditingEndedObserver != null) { DebugOutput(" ~!~!~!~! InPlaceEditor.Dispose: removing end edit observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingEndedObserver); EditingEndedObserver.Dispose(); EditingEndedObserver = null; } if (EditingTextChanged != null) { DebugOutput(" ~!~!~!~! InPlaceEditor.Dispose: removing edit text changed observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingTextChanged); EditingTextChanged.Dispose(); EditingTextChanged = null; } if (EditingStartedObserver != null) { DebugOutput(" ~!~!~!~! InPlaceEditor.Dispose: removing edit started observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingStartedObserver); EditingStartedObserver.Dispose(); EditingStartedObserver = null; } #endif // DO_CLEANUP if (KeyMonitor != null) { DebugOutput(" ~!~!~!~! InPlaceEditor.Dispose: removing key monitor"); NSEvent.RemoveMonitor(KeyMonitor); KeyMonitor.Dispose(); KeyMonitor = null; } DebugOutput("~~~~~~~~~~~~~~~~~~~~~~ InPlaceEditor.Dispose(" + disposing + ") EXIT"); }
public override void update() { //キー入力 foreach (KeyCode tKey in KeyMonitor.getInputKey()) { parent.hit(tKey, parent.getCurrentTime(), Note.HitNoteType.decolorize, "tambourine", "castanet"); } }
public override void update() { //キー入力 foreach (KeyCode tKey in KeyMonitor.getInputKey()) { tryCreateNote(new KeyTime(MusicScoreData.musicTimeToQuarterBeat(parent.getCurrentTime()))); //SoundPlayer.playSe("tambourine"); } }
public void Disconnect() { if (mMonitor != null) { // NOTE: blocks until disconnected mMonitor.KeyPressed -= MMonitor_KeyPressed; // unsub mPartialLineQueue = null; // clear mMonitor = null; // clear } }
public void Disconnect() { // NOTE: blocks until disconnected if (monitor != null) { partialLineQueue = null; monitor.KeyPressed -= Monitor_KeyPressed; monitor = null; } }
public void Connect() { // NOTE: blocks until connected if (monitor == null) { partialLineQueue = new Queue <char>(); monitor = new KeyMonitor(); monitor.KeyPressed += Monitor_KeyPressed; } }
public override void update() { //キー入力 foreach (KeyCode tKey in KeyMonitor.getInputKey()) { parent.hit(tKey, parent.getCurrentTime(), Note.HitNoteType.delete, "tambourine", "castanet"); } //Miss判定 parent.mScore.missHit(parent.mPlayer.mCurrentSecond - TypeEvaluation.kWorstDifference); }
public override HitResult hit(KeyCode aKey, HitNoteType aType) { if (mHitted) { return(HitResult.miss); //hit済み } if (KeyMonitor.convertToCode(mVowel) != aKey) { return(HitResult.miss);//タイプミス } mHitted = true; hitted(this, aType); return(HitResult.consonant); }
private Core() { // Necessary to fix Core.Instance initialization loop when loading grammar _Instance = this; Configuration = Settings.Load(); Keybinder = new KeyMonitor(Configuration); Recognizer = new VoiceRecognizer(); SoundPlayer = new SoundEffectsPlayer(Configuration); Recognizer.CommandAccepted += SoundPlayer.CommandAccepted; Recognizer.CommandRejected += SoundPlayer.CommandRejected; Recognizer.StartedListening += SoundPlayer.StartedListening; Recognizer.StoppedListening += SoundPlayer.StoppedListening; }
private void CellTextEditEnded(NSNotification notification) { DebugOutput("---------------------- CellEdit ended"); #if ENABLE_INPLACEEDIT_TRACE if (notification != null) { var editor = notification.UserInfo.ValueForKey(FieldEditorKey) as NSTextView; var value = editor == null ? "<null editor>" : editor.Value; DebugOutput(" -!-!-!-! CellEdit ended: Notification field editor value: " + value); } #endif // ENABLE_INPLACEEDIT_TRACE #if DO_CLEANUP if (EditingEndedObserver != null) { DebugOutput(" -!-!-!-! CellEdit ended: Removing end edit observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingEndedObserver); EditingEndedObserver.Dispose(); EditingEndedObserver = null; } if (EditingTextChanged != null) { DebugOutput(" -!-!-!-! CellEdit ended: Removing edit text changed observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingTextChanged); EditingTextChanged.Dispose(); EditingTextChanged = null; } if (EditingStartedObserver != null) { DebugOutput(" -!-!-!-! CellEdit ended: Removing edit started observer"); NSNotificationCenter.DefaultCenter.RemoveObserver(EditingStartedObserver); EditingStartedObserver.Dispose(); EditingStartedObserver = null; } #endif // DO_CLEANUP if (KeyMonitor != null) { DebugOutput(" -!-!-!-! CellEdit ended: Removing key event monitor"); NSEvent.RemoveMonitor(KeyMonitor); KeyMonitor.Dispose(); KeyMonitor = null; } EditingObject = null; LiveValue = null; TextStorage = null; // do NOT dispose this - it refers to the storage maintained by Owner DebugOutput("---------------------- CellEdit ended: Finished"); }
public override void update() { if (Input.GetKeyDown(KeyCode.Return))//enterで停止 { parent.changeState(new PracticeState(parent)); return; } if (Input.GetKeyDown(KeyCode.Tab)) //tabでRestart { parent.mPlayer.pause(); parent.mScore.mCurrentQuarterBeat = mQuarterBeat; parent.mScore.resetBars(); parent.mPlayer.play(); return; } //キー入力 foreach (KeyCode tKey in KeyMonitor.getInputKey()) { parent.hit(tKey, parent.getCurrentTime(), Note.HitNoteType.delete, "tambourine", "castanet"); } }
public override HitResult hit(KeyCode aKey, HitNoteType aType) { //子音hit判定 if (!mHittedConsonant) { if (KeyMonitor.convertToCode(mConsonant) == aKey) { mHittedConsonant = true; hitted(findChild <MyBehaviour>("consonant"), aType); return(HitResult.consonant); } } //母音hit判定 if (!mHittedVowel) { if (KeyMonitor.convertToCode(mVowel) == aKey) { mHittedVowel = true; hitted(findChild <MyBehaviour>("vowel"), aType); return(HitResult.vowel); } } return(HitResult.miss); }
public DotNetConsoleTerminal() { mHandler = null; mMonitor = null; mPartialLineQueue = null; }
public Core() { Configuration = Settings.Load(); Keybinder = new KeyMonitor(Configuration); Recognizer = new VoiceRecognizer(); }
public DotNetConsoleTerminal() { handler = null; monitor = null; partialLineQueue = null; }