void GanttView_BarDraw(object sender, BarDrawEventArgs args) { var bar = args.Bar as ToolBar; args.Background = _gantt.GetBrushInfo(bar, string.Empty); args.DrawFrame = _gantt.EnableSelect && _gantt.SelectedBar != null && !_gantt.CompareToSelectedBar(bar, string.Empty); args.FrameColor = Color.White; args.DrawFrame = true; args.ForeColor = bar.IsGhostBar && bar.State != EqpState.PM ? Color.Gray : bar.State == EqpState.DOWN ? Color.White : Color.Black; if (bar.State == EqpState.PM) { args.ForeColor = Color.White; } if (_gantt.IsOnlyToolMode) { args.Text = bar.GetTitle(true); } else { args.Text = bar.GetTitle(false); } args.DrawDefault = true; }
void GanttView_BarDraw(object sender, BarDrawEventArgs args) { var bar = args.Bar as GanttBar; args.Background = _gantt.GetBrushInfo(bar); args.DrawFrame = _gantt.EnableSelect && _gantt.SelectedBar != null && !_gantt.CompareToSelectedBar(bar); args.FrameColor = Color.Gray; //Color.White;//Color.Gray; args.DrawFrame = true; args.ForeColor = Color.Black; args.Text = bar.GetTitle(); args.DrawDefault = true; }
void GanttView_BarDraw(object sender, BarDrawEventArgs args) { var bar = args.Bar as GanttBar; args.Background = this.gantt.GetBrushInfo(bar); args.DrawFrame = this.gantt.EnableSelect && this.gantt.SelectedBar != null && !this.gantt.IsSameTypeBar(bar); args.FrameColor = Color.Black; args.ForeColor = (bar.State == EqpState.PM || bar.State == EqpState.DOWN) ? Color.White : Color.Black; args.Text = bar.GetTitle(); if (this.currentBar != null && this.currentBar == args.Bar) { if (prebar != bar) { prebar = bar; prebarwidth = bar.Bounds.Width; bar.Bounds.Width = bar.Bounds.Width - 2.5f; } var p = new Pen(Color.Black, 4); args.Graphics.DrawRectangle(p, bar.Bounds.X, bar.Bounds.Y, bar.Bounds.Width + 0.5f, bar.Bounds.Height); } args.DrawDefault = true; }