public void drawEllipses(Scales scale) { clearEllipses(); String[] strScale = MusicMaster.getScale(scale); for (int j = 0; j < GraphicsChest.getChest().netytarWidth; j++) { for (int k = 0; k < GraphicsChest.getChest().netytarWidth; k++) { for (int i = 0; i < strScale.Length; i++) { string notainstringa = MusicMaster.getNote(netytarButtons[j, k].Note).ToString(); notainstringa = notainstringa.Remove(notainstringa.Length - 1); if (notainstringa.Equals(strScale[i])) { Ellipse ellipse = new Ellipse(); ellipse.StrokeThickness = ellipseStrokeDim; ellipse.Stroke = new SolidColorBrush(colorsEllipse[i]); ellipse.Width = netytarButtons[j, k].Width + ellipseStrokeSpacer * 2; ellipse.Height = netytarButtons[j, k].Height + ellipseStrokeSpacer * 2; Canvas.SetLeft(ellipse, Canvas.GetLeft(netytarButtons[j, k]) - ellipseStrokeSpacer + 0.4); Canvas.SetTop(ellipse, Canvas.GetTop(netytarButtons[j, k]) - ellipseStrokeSpacer + 0.2); Canvas.SetZIndex(ellipse, 2); drawnEllipses.Add(ellipse); } } } } foreach (Ellipse ellipse in drawnEllipses) { canvas.Children.Add(ellipse); } }
public void receiveNote(int note) { txtNote.Text = note.ToString(); txtNoteName.Text = MusicMaster.getNote(note).ToString(); txtWickiNoteName.Text = MusicMaster.getNote(note).ToString(); txtWickiNote.Text = note.ToString(); }
public WickiEyedenButton(int pitch) { this.pitch = pitch; BorderBrush = new SolidColorBrush(borderColor); BorderThickness = new Thickness(2); FontWeight = FontWeights.Bold; FontSize = 18; Note = MusicMaster.getNote(pitch); if (Note.ToString().StartsWith("s")) { Content = Note.ToString().Remove(0, 1) + "#"; Background = new SolidColorBrush(blackKeysColor); Foreground = new SolidColorBrush(blackKeysText); } else { Content = Note.ToString(); Background = new SolidColorBrush(whiteKeysColor); Foreground = new SolidColorBrush(whiteKeysText); } }