Пример #1
0
 protected void LoadBook(ScoreBook book)
 {
     ScoreBook = book;
     NoteView.LoadScore(book.Score);
     NoteViewScrollBar.Value   = NoteViewScrollBar.GetMaximumValue();
     NoteViewScrollBar.Minimum = -Math.Max(NoteView.UnitBeatTick * 4 * 20, NoteView.Notes.GetLastTick());
     UpdateThumbHeight();
     SetText(book.Path);
     LastExportData = null;
     if (!string.IsNullOrEmpty(book.Path))
     {
         SoundConfiguration.Default.ScoreSound.TryGetValue(book.Path, out CurrentMusicSource);
     }
     else
     {
         CurrentMusicSource = null;
     }
 }
Пример #2
0
 protected void LoadBook(ScoreBook book)
 {
     ScoreBook = book;
     OperationManager.Clear();
     NoteView.Initialize(book.Score);
     NoteViewScrollBar.Value       = NoteViewScrollBar.GetMaximumValue();
     NoteViewScrollBar.Minimum     = -Math.Max(NoteView.UnitBeatTick * 4 * 20, NoteView.Notes.GetLastTick());
     NoteViewScrollBar.SmallChange = NoteView.UnitBeatTick;
     UpdateThumbHeight();
     SetText(book.Path);
     LastExportData = null;
     if (!string.IsNullOrEmpty(book.Path))
     {
         SoundSettings.Default.ScoreSound.TryGetValue(book.Path, out CurrentMusicSource);
     }
     else
     {
         CurrentMusicSource = null;
     }
 }
Пример #3
0
 private void InitializeScrollBar(int maxTick)
 {
     NoteViewScrollBar.Value       = NoteViewScrollBar.GetMaximumValue();
     NoteViewScrollBar.Minimum     = -Math.Max(maxTick, NoteView.TicksPerBeat * 4 * 20);
     NoteViewScrollBar.SmallChange = NoteView.TicksPerBeat;
 }