public ReSizeNoteOperation(Note note, int sizeBefore, int sizeAfter, NoteArea noteArea) { Invoke += () => { NoteArea tmp = Status.SelectedNoteArea; Status.SelectedNoteArea = noteArea; note.ReSize(sizeAfter); Status.SelectedNoteArea = tmp; }; Undo += () => { NoteArea tmp = Status.SelectedNoteArea; Status.SelectedNoteArea = noteArea; note.ReSize(sizeBefore); Status.SelectedNoteArea = tmp; }; }
public void ChangeNoteDirection(NoteArea direction) { if (direction == NoteArea.Left) { if (noteType == NoteType.AIRDOWNC) { noteType = NoteType.AIRDOWNL; } else if (noteType == NoteType.AIRUPC) { noteType = NoteType.AIRUPL; } else if (noteType == NoteType.AIRDOWNR) { noteType = NoteType.AIRDOWNC; } else if (noteType == NoteType.AIRUPR) { noteType = NoteType.AIRUPC; } } else if (direction == NoteArea.Right) { if (noteType == NoteType.AIRDOWNC) { noteType = NoteType.AIRDOWNR; } else if (noteType == NoteType.AIRUPC) { noteType = NoteType.AIRUPR; } else if (noteType == NoteType.AIRDOWNL) { noteType = NoteType.AIRDOWNC; } else if (noteType == NoteType.AIRUPL) { noteType = NoteType.AIRUPC; } } Status.Note = noteType; }
/// <summary> /// クリックされてるノーツがあったら投げる /// なかったらnullを投げる /// ノーツのどのへんがクリックされたかも特定する /// </summary> public Note SelectedNote(PointF location, ref NoteArea noteArea) { Note selectedNote; //AirHold foreach (AirHold airHold in airHoldNotes.Reverse <AirHold>()) { if (!Status.IsAirHoldVisible) { break; } selectedNote = airHold.Find(x => x.Contains(location)); if (selectedNote != null && !(selectedNote is AirHoldBegin)) { MyUtil.SetNoteArea(selectedNote, location, ref noteArea); return(selectedNote); } } //Air selectedNote = airNotes.FindLast(x => x.Contains(location)); if (selectedNote != null && Status.IsAirVisible) { MyUtil.SetNoteArea(selectedNote, location, ref noteArea); return(selectedNote); } //ShortNote selectedNote = shortNotes.FindLast(x => x.Contains(location)); if (selectedNote != null && Status.IsShortNoteVisible) { MyUtil.SetNoteArea(selectedNote, location, ref noteArea); return(selectedNote); } //Slide foreach (Slide slide in slideNotes.Reverse <Slide>()) { if (!Status.IsSlideVisible) { break; } selectedNote = slide.Find(x => x.Contains(location)); if (selectedNote != null) { MyUtil.SetNoteArea(selectedNote, location, ref noteArea); return(selectedNote); } } //Hold foreach (Hold hold in holdNotes.Reverse <Hold>()) { if (!Status.IsHoldVisible) { break; } selectedNote = hold.Find(x => x.Contains(location)); if (selectedNote != null) { MyUtil.SetNoteArea(selectedNote, location, ref noteArea); return(selectedNote); } } //AttributeNote selectedNote = attributeNotes.FindLast(x => x.Contains(location)); if (selectedNote != null) { noteArea = NoteArea.Center; return(selectedNote); } return(null); }