ProjectsForTest/WinForm.NET5TeeChart-NET-Pro-Samples/Tools/GanttTool.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Steema.TeeChart.Samples
{
public class Tool_GanttTool : Steema.TeeChart.Samples.BaseForm
{
private Steema.TeeChart.Styles.Gantt ganttSeries1;
private Steema.TeeChart.Tools.GanttTool ganttTool1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.ComponentModel.IContainer components = null;
public Tool_GanttTool()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
// Disable automatic sorting by date
this.ganttSeries1.XValues.Order = TeeChart.Styles.ValueListOrder.None;
// Fill Gantt with sample date-time values:
this.ganttSeries1.Add(new System.DateTime(2002,4,1),new System.DateTime(2002,4,10),0,"A");
this.ganttSeries1.Add(new System.DateTime(2002,4,5),new System.DateTime(2002,4,15),1,"B");
this.ganttSeries1.Add(new System.DateTime(2002,4,2),new System.DateTime(2002,4,8),2,"C");
this.ganttSeries1.Add(new System.DateTime(2002,4,9),new System.DateTime(2002,4,21),3,"D");
// Make marks visible
this.ganttSeries1.Marks.Visible = true;
this.ganttSeries1.Marks.Shadow.Height = 0;
this.ganttSeries1.Marks.Shadow.Width = 0;
this.ganttSeries1.Marks.Gradient.Visible = true;
// Set horizontal bottom axis minimum and maximum
this.tChart1.Axes.Bottom.SetMinMax(new System.DateTime(2002,4,1),new System.DateTime(2002,5,1));
// Set vertical left axis minimum and maximum
this.tChart1.Axes.Left.SetMinMax( -2, 5 );
this.tChart1.Axes.Left.Grid.Centered = false;
// Disable zoom
tChart1.Zoom.Direction = ZoomDirections.None;
// Set horizontal daily Increment for labels and grids:
this.tChart1.Axes.Bottom.Increment = Convert.ToDouble(TeeChart.DateTimeSteps.OneDay); // one day
this.tChart1.Axes.Bottom.Labels.Angle = 90;
this.tChart1.Axes.Bottom.Labels.DateTimeFormat = "dd-mmm";
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。