public BeatmapBeat(BeatmapTimeline timeline, int height, int targetBeat)
        {
            InitializeComponent();

            this.targetBeat       = targetBeat;
            this.timeline         = timeline;
            outerRectangle.Height = height;
            innerRectangle.Height = height;
            canvas.ToolTip        = targetBeat.ToString();

            MouseEnter          += BeatmapBeat_MouseEnter;
            MouseLeave          += BeatmapBeat_MouseLeave;
            MouseLeftButtonDown += BeatmapBeat_MouseLeftButtonDown;
        }
        public MainWindow()
        {
            InitializeComponent();

            MediaPlayer.Volume = VolumeSlider.Value;
            dispatcherTimer    = new DispatcherTimer
            {
                Interval = TimeSpan.FromMilliseconds(UpdateInterval)
            };
            dispatcherTimer.Tick += new EventHandler(UpdateTimelineSlider);
            dispatcherTimer.Tick += new EventHandler(UpdateMetronome);
            dispatcherTimer.Start();

            BeatmapTimeline timeline = new BeatmapTimeline(1145, 295);

            timeline.Setup(256, 80, 4);
            TimelineViewer.Children.Add(timeline);
            timeline.AddBeat(12);
            timeline.AddBeat(14);
            timeline.AddBeat(16);
        }