public Keyboard(NotePanel notePannel, UILogic uiLogic, TimeSpan creationTime) : base(uiLogic, notePannel, creationTime) { Alive = true; Visible = true; _notePannel = notePannel; Rec = new Rectangle((int)notePannel.leftPartWidth, notePannel.Rec.Top, (int)((float)notePannel.Rec.Width - notePannel.leftPartWidth), (int)notePannel.Rec.Height); CreateNoteTable(); CreateKeys(); MouseManager mouseRightButton = AddMouse(MouseButtons.RightButton); mouseRightButton.MouseFirstPressed += new MouseManager.MouseFirstPressedHandler(mouseRightButton_MouseFirstPressed); mouseRightButton.MousePressed += new MouseManager.MousePressedHandler(mouseRightButton_MousePressed); mouseRightButton.MouseReleased += new MouseManager.MouseReleasedHandler(mouseRightButton_MouseReleased); UI.GameEngine.Sound.MidiNoteEvent += new SoundLogic.MidiNoteEventHandler(Sound_MidiNoteEvent); }
public void OpenKeyboard(GameTime gameTime, Cell cell) { NotePanel notePanel = new NotePanel(this, TimeSpan.FromDays(1)); this.ListUIComponent.Add(notePanel); }