/// <summary> /// Handles note off events. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="NoteEventArgs"/> instance containing the event data.</param> private void NoteOffHandler(object sender, NoteEventArgs e) { if (e.Pitch != null) { _midiOutAdapter.SendNoteOff(e.Pitch.Value, Get7bitMidiRange(e.Velocity)); } }
void notebook_NoteAdded(object sender, NoteEventArgs e) { if (AllNoteControls.Any(c => c.Note == e.Note)) { return; } var ctrlNote = new ucNote() { Note = e.Note, WordWrap = WordWrap }; foreach (var otherCtrlNote in AllNoteControls) { if (otherCtrlNote.Note.CreatedDate > ctrlNote.Note.CreatedDate) { pnlNotes.Children.Insert(pnlNotes.Children.IndexOf(otherCtrlNote), ctrlNote); break; } } if (!pnlNotes.Children.Contains(ctrlNote)) { pnlNotes.Children.Add(ctrlNote); } //pnlNotes.UpdateLayout(); scrollNotes.UpdateLayout(); scrollNotes.ScrollToVerticalOffset(ctrlNote.TranslatePoint(new Point(0, 0), pnlNotes).Y); }
void notebook_NoteRemoved(object sender, NoteEventArgs e) { var ctrlNote = pnlNotes.Children.OfType <ucNote>().FirstOrDefault(c => c.Note == e.Note); if (ctrlNote != null) { pnlNotes.Children.Remove(ctrlNote); } }
/// <summary> /// Add note to current track /// </summary> private ToDoNote OnAddedNote(object sender, NoteEventArgs e) { var note = e.Note; note.SampleRef = _currentSample; DataBaseContext.Notes.InsertOnSubmit(note); DataBaseContext.SubmitChanges(); CurrentSample.Notes.Add(note); return(note); }
/// <summary> /// Add note to current track /// </summary> private ToDoNote OnDeletedNote(object sender, NoteEventArgs e) { var note = e.Note; CurrentSample.Notes.Remove(note); DataBaseContext.Notes.DeleteOnSubmit(note); DataBaseContext.SubmitChanges(); //// Restore references _currentSample.TrackRef = DataBaseContext.Tracks.First(x => x.Id == _currentSample.TrackId); return(null); }
/// <summary> /// Handles the Click event of the NoteEditor control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> protected void note_SaveButtonClick(object sender, NoteEventArgs e) { _noteId = e.NoteId; LaunchWorkflow(); if (GetAttributeValue("StartNewSearch").AsBoolean()) { Response.Redirect(Request.Path); } else { ShowPersonInfo(); ShowNotes(); } }
protected void OnNoteModified(NoteEventArgs e) { try { if (this.NoteModified == null) { return; } this.NoteModified((object)this, e); } catch (Exception ex) { LabyrinthData.Log((object)ex); } }
void OnDestroyedNote(object sender, NoteEventArgs e) { if (e.WasHit) { multiplier += 0.1f; score += Mathf.FloorToInt(multiplier * 100); scoreDisplay.text = score.ToString(); multiplierDisplay.text = multiplier.ToString(); } else { multiplier = 1f; scoreDisplay.text = score.ToString(); multiplierDisplay.text = multiplier.ToString(); } spawnedNotes.Remove(e.Sender); Destroy(e.Sender); }
private void OnNoteParsed(object sender, NoteEventArgs e) { noteWindow.AddNote(e.Note); if (e.Note.IsFirstNote) { if (handlePolyphony) { handlePolyphony = false; } } else { handlePolyphony = !e.Note.IsHarmonicNote; } if (noteWindow.SecondPreviousNote != null) { Save(false); } }
/// <summary> /// Handles the SaveButtonClick event of the noteEditor control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="NoteEventArgs"/> instance containing the event data.</param> private void noteEditor_SaveButtonClick(object sender, NoteEventArgs e) { noteEditor.Visible = false; noteEditor.ShowEditMode = false; }
public void OnNotePressed(object sender, NoteEventArgs e) { Print($"Note pressed: value = {e.Note.Value} onVelocity = {e.Note.OnVelocity}"); }
void OnNotePickup(object sender, NoteEventArgs args) { NoteUI.gameObject.SetActive(true); }
/// <summary> /// Raises the NoteOffEvent. /// </summary> /// <param name="eventArgs">The <see cref="NoteEventArgs"/> instance containing the event data.</param> protected virtual void OnNoteOffEvent(NoteEventArgs eventArgs) { NoteOff(this, eventArgs); PlayingPitch = null; }
/// <summary> /// Raises the NoteOnEvent. /// </summary> /// <param name="eventArgs">The <see cref="NoteEventArgs"/> instance containing the event data.</param> protected virtual void OnNoteOnEvent(NoteEventArgs eventArgs) { NoteOn(this, eventArgs); PlayingPitch = eventArgs.Pitch; }
public void OnNotePickup(object sender, NoteEventArgs args) { text.GetComponent <Text>().text = args.description; }
public void OnDestroyObject(NoteEventArgs args) { NoteDestoyed?.Invoke(this, args); }
public void OnNoteReleased(object sender, NoteEventArgs e) { Print($"Note released: value = {e.Note.Value} offVelocity = {e.Note.OffVelocity}"); }
public void OnNoteParsed(object sender, NoteEventArgs e) { Print($"Note parsed: value = {e.Note.Value} duration = {e.Note.Duration} onVelocity = {e.Note.OnVelocity} offVelocity = {e.Note.OffVelocity}"); }
public void NotePressedFromUI(NoteEventArgs noteEventArgs) { OnNoteOn?.Invoke(this, noteEventArgs); }
public void NoteReleasedFromUI(NoteEventArgs noteEventArgs) { OnNoteOff?.Invoke(this, noteEventArgs); }
private void NoteChangedHandler(object sender, NoteEventArgs e) { OnTimetableDocumentChanged(); }
private void NoteOn(NoteEventArgs noteEventArgs) { _pressedNotes.Add(noteEventArgs.NoteAbsolute); OnNoteOn?.Invoke(this, noteEventArgs); }
private void NoteOff(NoteEventArgs noteEventArgs) { _pressedNotes.Remove(noteEventArgs.NoteAbsolute); OnNoteOff?.Invoke(this, noteEventArgs); }