コード例 #1
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());
     UpdateThumbHeight();
     SetText(book.Path);
     LastExportData = null;
     if (!string.IsNullOrEmpty(book.Path))
     {
         SoundSettings.Default.ScoreSound.TryGetValue(book.Path, out CurrentMusicSource);
     }
     else
     {
         CurrentMusicSource = null;
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: vvvtrvs/Ched
 protected void LoadBook(ScoreBook book)
 {
     ScoreBook = book;
     OperationManager.Clear();
     ExportManager.Load(book);
     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);
     CurrentMusicSource = new SoundSource();
     if (!string.IsNullOrEmpty(book.Path))
     {
         SoundSettings.Default.ScoreSound.TryGetValue(book.Path, out SoundSource src);
         if (src != null)
         {
             CurrentMusicSource = src;
         }
     }
 }