public ProjectPlanner()
        {
            tChart1                            = new Chart();
            this.gantt1                        = new Steema.TeeChart.Styles.Gantt();
            this.ganttTool1                    = new Steema.TeeChart.Tools.GanttTool();
            this.tChart1.Aspect.View3D         = false;
            this.tChart1.Zoom.Active           = true;
            this.tChart1.Panning.Active        = true;
            this.tChart1.Axes.Bottom.Increment = 30D;
            this.tChart1.Axes.Bottom.Labels.Font.Brush.Color = Color.Gray;
            this.tChart1.Axes.Bottom.Labels.Font.Size        = 16;
            this.tChart1.Axes.Bottom.Title.Caption           = "Time";
            this.tChart1.Axes.Bottom.Title.Font.Brush.Color  = Color.Gray;
            this.tChart1.Axes.Bottom.Title.Font.Name         = "Segoe UI";
            this.tChart1.Axes.Bottom.Title.Lines             = new string[] { "Time" };
            this.tChart1.Axes.Left.AxisPen.Visible           = false;
            this.tChart1.Axes.Left.Labels.Font.Brush.Color   = Color.Gray;
            this.tChart1.Axes.Left.Labels.Font.Size          = 13;
            this.tChart1.Axes.Left.MinorTicks.Visible        = false;
            this.tChart1.Axes.Left.Title.Caption             = "Task";
            this.tChart1.Axes.Left.Title.Font.Brush.Color    = Color.Gray;
            this.tChart1.Axes.Left.Title.Font.Name           = "Segoe UI";
            this.tChart1.Axes.Left.Title.Lines         = new string[] { "Task" };
            this.tChart1.Footer.Font.Brush.Color       = Color.Blue;
            this.tChart1.Header.Font.Brush.Color       = Color.Gray;
            this.tChart1.Header.Font.Size              = 21;
            this.tChart1.Header.Lines                  = new string[] { "Project Planner" };
            this.tChart1.Legend.Visible                = false;
            this.tChart1.Panel.Brush.Color             = Color.White;
            this.tChart1.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart1.Series.Add(this.gantt1);
            this.tChart1.Tools.Add(this.ganttTool1);
            this.tChart1.Walls.Back.Brush.Gradient.EndColor = Color.White;
            this.tChart1.Walls.Back.Visible = false;
            this.tChart1.AfterDraw         += new Steema.TeeChart.PaintChartEventHandler(this.tChart1_AfterDraw);
            //this.tChart1.Click += new System.EventHandler(this.tChart1_Click);
            // gantt1
            this.gantt1.Color                = Color.FromRgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.gantt1.ColorEach            = true;
            this.gantt1.EndValues.DataMember = "End";
            this.gantt1.EndValues.DateTime   = true;
            this.gantt1.LabelMember          = "Labels";
            this.gantt1.LinePen.Color        = Color.FromRgb(((int)(((byte)(41)))), ((int)(((byte)(61)))), ((int)(((byte)(98)))));
            this.gantt1.Marks.Brush.Visible  = false;
            this.gantt1.Marks.Transparent    = true;
            this.gantt1.Marks.Visible        = true;
            this.gantt1.Pointer.Brush.Gradient.StartColor = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.gantt1.Pointer.Pen.Visible    = false;
            this.gantt1.Pointer.SizeDouble     = 0D;
            this.gantt1.Pointer.SizeUnits      = Steema.TeeChart.Styles.PointerSizeUnits.Pixels;
            this.gantt1.StartValues.DataMember = "Start";
            this.gantt1.StartValues.DateTime   = true;
            this.gantt1.StartValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.gantt1.Title = "gantt1";
            this.gantt1.YValues.DataMember = "Y";
            // ganttTool1
            //this.ganttTool1.Gantt = this.gantt1;
            //this.ganttTool1.Series = this.gantt1;
            this.ganttTool1.DragBar   += new Steema.TeeChart.Tools.GanttDragEventHandler(this.ganttTool1_DragBar);
            this.ganttTool1.ResizeBar += new Steema.TeeChart.Tools.GanttResizeEventHandler(this.ganttTool1_ResizeBar);

            tChart1.Panel.Gradient.Visible = false;
            gantt1.Add(new DateTime(2014, 6, 7), new DateTime(2014, 9, 23), 0, "Production");
            gantt1.Add(new DateTime(2014, 9, 3), new DateTime(2014, 11, 10), 1, "Marketing");
            gantt1.Add(new DateTime(2014, 3, 13), new DateTime(2014, 3, 31), 2, "Approve");
            gantt1.Add(new DateTime(2014, 5, 7), new DateTime(2014, 6, 5), 3, "Prototype");
            gantt1.Add(new DateTime(2014, 10, 11), new DateTime(2014, 11, 5), 4, "Evaluation");
            gantt1.Add(new DateTime(2014, 4, 2), new DateTime(2014, 4, 29), 5, "Design");

            gantt1.AddMultipleNextTasks(2, 4);
            gantt1.AddMultipleNextTasks(2, 3);

            gantt1.ConnectingPen.Color = Color.FromRgb(49, 44, 59);
            gantt1.ConnectingPen.Width = 2;

            gantt1.Pointer.Style    = Steema.TeeChart.Styles.PointerStyles.Rectangle;
            gantt1.Pointer.VertSize = 25;

            this.tChart1.Aspect.ZoomText = true;

            Steema.TeeChart.Themes.ColorPalettes.ApplyPalette(tChart1.Chart, 21);

            chartView = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView.Model = tChart1;

            Content = new StackLayout
            {
                Children =
                {
                    chartView
                }
            };
        }
示例#2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.ganttSeries1 = new Steema.TeeChart.Styles.Gantt();
     this.ganttTool1   = new Steema.TeeChart.Tools.GanttTool();
     this.comboBox1    = new System.Windows.Forms.ComboBox();
     this.button1      = new System.Windows.Forms.Button();
     this.button2      = new System.Windows.Forms.Button();
     this.button3      = new System.Windows.Forms.Button();
     this.button4      = new System.Windows.Forms.Button();
     this.panel1.SuspendLayout();
     this.SuspendLayout();
     //
     // textBox1
     //
     this.textBox1.Name = "textBox1";
     this.textBox1.Size = new System.Drawing.Size(504, 32);
     this.textBox1.Text = "Gantt Tool offers mouse interaction to drag and resize Gantt bars.";
     //
     // panel1
     //
     this.panel1.Controls.Add(this.button4);
     this.panel1.Controls.Add(this.button3);
     this.panel1.Controls.Add(this.button2);
     this.panel1.Controls.Add(this.button1);
     this.panel1.Controls.Add(this.comboBox1);
     this.panel1.Location = new System.Drawing.Point(0, 32);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(504, 33);
     //
     // tChart1
     //
     //
     // tChart1.Aspect
     //
     this.tChart1.Aspect.SmoothingMode     = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
     this.tChart1.Aspect.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
     this.tChart1.Aspect.View3D            = false;
     //
     // tChart1.Header
     //
     this.tChart1.Header.Lines = new string[0];
     this.tChart1.Location     = new System.Drawing.Point(0, 65);
     this.tChart1.Name         = "tChart1";
     //
     // tChart1.Panel
     //
     //
     // tChart1.Panel.Brush
     //
     this.tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(255)));
     this.tChart1.Series.Add(this.ganttSeries1);
     this.tChart1.Size = new System.Drawing.Size(504, 276);
     this.tChart1.Tools.Add(this.ganttTool1);
     this.tChart1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tChart1_MouseUp);
     //
     // ganttSeries1
     //
     this.ganttSeries1.ColorEach = true;
     //
     // ganttSeries1.EndValues
     //
     this.ganttSeries1.EndValues.DataMember = "End";
     this.ganttSeries1.EndValues.DateTime   = true;
     this.ganttSeries1.LabelMember          = "Labels";
     //
     // ganttSeries1.Marks
     //
     //
     // ganttSeries1.Marks.Symbol
     //
     //
     // ganttSeries1.Marks.Symbol.Shadow
     //
     this.ganttSeries1.Marks.Symbol.Shadow.Height  = 1;
     this.ganttSeries1.Marks.Symbol.Shadow.Visible = true;
     this.ganttSeries1.Marks.Symbol.Shadow.Width   = 1;
     //
     // ganttSeries1.NextTasks
     //
     this.ganttSeries1.NextTasks.DataMember = "NextTask";
     //
     // ganttSeries1.Pointer
     //
     //
     // ganttSeries1.Pointer.Brush
     //
     this.ganttSeries1.Pointer.Brush.Color           = System.Drawing.Color.Red;
     this.ganttSeries1.Pointer.Brush.ForegroundColor = System.Drawing.Color.Empty;
     this.ganttSeries1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
     //
     // ganttSeries1.StartValues
     //
     this.ganttSeries1.StartValues.DataMember = "Start";
     this.ganttSeries1.StartValues.DateTime   = true;
     this.ganttSeries1.Title = "ganttSeries1";
     //
     // ganttSeries1.StartValues
     //
     this.ganttSeries1.XValues.DataMember = "Start";
     this.ganttSeries1.XValues.DateTime   = true;
     //
     // ganttSeries1.YValues
     //
     this.ganttSeries1.YValues.DataMember = "Y";
     this.ganttSeries1.GetSeriesMark     += new Steema.TeeChart.Styles.Series.GetSeriesMarkEventHandler(this.ganttSeries1_GetSeriesMark);
     //
     // ganttTool1
     //
     this.ganttTool1.Series   = this.ganttSeries1;
     this.ganttTool1.DragBar += new Steema.TeeChart.Tools.GanttDragEventHandler(this.ganttTool1_DragBar);
     //
     // comboBox1
     //
     this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.comboBox1.Items.AddRange(new object[] {
         "One day",
         "One week",
         "Half month",
         "One month"
     });
     this.comboBox1.Location              = new System.Drawing.Point(13, 6);
     this.comboBox1.Name                  = "comboBox1";
     this.comboBox1.Size                  = new System.Drawing.Size(101, 21);
     this.comboBox1.TabIndex              = 0;
     this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
     //
     // button1
     //
     this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.button1.Location  = new System.Drawing.Point(153, 6);
     this.button1.Name      = "button1";
     this.button1.Size      = new System.Drawing.Size(34, 23);
     this.button1.TabIndex  = 1;
     this.button1.Text      = "<<";
     this.button1.Click    += new System.EventHandler(this.button1_Click);
     //
     // button2
     //
     this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.button2.Location  = new System.Drawing.Point(193, 6);
     this.button2.Name      = "button2";
     this.button2.Size      = new System.Drawing.Size(34, 23);
     this.button2.TabIndex  = 2;
     this.button2.Text      = ">>";
     this.button2.Click    += new System.EventHandler(this.button2_Click);
     //
     // button3
     //
     this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.button3.Location  = new System.Drawing.Point(253, 6);
     this.button3.Name      = "button3";
     this.button3.Size      = new System.Drawing.Size(34, 23);
     this.button3.TabIndex  = 3;
     this.button3.Text      = "><";
     this.button3.Click    += new System.EventHandler(this.button3_Click);
     //
     // button4
     //
     this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.button4.Location  = new System.Drawing.Point(293, 6);
     this.button4.Name      = "button4";
     this.button4.Size      = new System.Drawing.Size(34, 23);
     this.button4.TabIndex  = 4;
     this.button4.Text      = "<>";
     this.button4.Click    += new System.EventHandler(this.button4_Click);
     //
     // Tool_GanttTool
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(504, 341);
     this.Name  = "Tool_GanttTool";
     this.Load += new System.EventHandler(this.Tool_GanttTool_Load);
     this.panel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }