public TimelineView(TimelineController controller_) { controller = controller_; controller.TimelineUpdate += controller_TimelineUpdate; controller.CurrentTimeUpdate += controller_CurrentTimeUpdate; textWidth = 100; barWidth = 100; SetupUI(); this.MouseDown += TimelineView_MouseDown; this.VisibleChanged += TimelineView_VisibleChanged; this.Move += TimelineView_Move; this.FormClosing += TimelineView_FormClosing; typeof(DataGridView). GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic). SetValue(dataGridView, true, null); dataGridView.SelectionChanged += (object sender, EventArgs args) => dataGridView.ClearSelection(); dataGridView.AutoGenerateColumns = false; dataGridView.Columns.Add(textColumn = new DataGridViewTextBoxColumn { DataPropertyName = "Name", AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill }); dataGridView.Columns.Add(timeLeftColumn = new TimeLeftColumn { Controller = controller_ }); MyOpacity = 0.8; NumberOfRowsToDisplay = 3; MoveByDrag = true; ShowOverlayButtons = true; UpdateLayout(); soundplayer = new CachedSoundPlayer(); TimelineFont = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Bold); }
public TimelineView(TimelineController controller_) { controller = controller_; controller.TimelineUpdate += controller_TimelineUpdate; controller.CurrentTimeUpdate += controller_CurrentTimeUpdate; barHeight = 25; barWidth = 200; ShowIcon = false; ShowInTaskbar = false; SetupUI(); MouseDown += TimelineView_MouseDown; VisibleChanged += TimelineView_VisibleChanged; Move += TimelineView_Move; FormClosing += TimelineView_FormClosing; typeof(DataGridView). GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic). SetValue(dataGridView, true, null); dataGridView.SelectionChanged += (object sender, EventArgs args) => dataGridView.ClearSelection(); dataGridView.AutoGenerateColumns = false; dataGridView.Columns.Add(timeLeftColumn = new TimeLeftColumn { Controller = controller_ }); MyOpacity = 0.8; NumberOfRowsToDisplay = 3; MoveByDrag = true; ShowOverlayButtons = true; Over10 = true; Under10 = true; ShowCasting = true; PopupMode = false; UpdateLayout(); soundplayer = new CachedSoundPlayer(); TimelineFont = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Bold); }