• 大小: 3.37MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-11-16
  • 语言: C#
  • 标签: C#  gantt  

资源简介

C# gantt 甘特图, 完整源代码 , VS2010 C# 运行通过, 可以自由扩展。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GanttControls
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
            GanttControls.ProjectViewBox.ProjectNode p1 =new ProjectViewBox.ProjectNode(DateTime.Parse(“2012-04-12“) 2 “新任务1“);
            GanttControls.ProjectViewBox.ProjectNode p2 = new ProjectViewBox.ProjectNode(DateTime.Parse(“2012-04-13“) 3 “新任务2“);
            GanttControls.ProjectViewBox.ProjectNode p3 = new ProjectViewBox.ProjectNode(DateTime.Parse(“2012-04-13“) 2 “新任务3“);
            GanttControls.ProjectViewBox.ProjectNode p4 = new ProjectViewBox.ProjectNode(DateTime.Parse(“2012-04-14“) 5 “新任务4“);
            GanttControls.ProjectViewBox.ProjectNode p5 = new ProjectViewBox.ProjectNode(DateTime.Parse(“2012-04-15“) 8 “新任务5“);

            p1.Complete = 10;
            p2.Complete = 80;
            p3.Complete = 60;
            p4.Complete = 20;
            p5.Complete = 25;
        


            //projectViewBox1.ProjectSelectData.HolidayList.Add(DateTime.Parse(“2012-04-01“));
            //projectViewBox1.ProjectSelectData.HolidayList.Add(DateTime.Parse(“2012-04-12“));
            //projectViewBox1.ProjectSelectData.HolidayList.Add(DateTime.Parse(“2012-04-14“));
            //projectViewBox1.ProjectSelectData.HolidayList.Add(DateTime.Parse(“2012-04-15“));
            //projectViewBox1.ProjectSelectData.HolidayList.Add(DateTime.Parse(“2012-04-16“));
            //projectViewBox1.ProjectSelectData.HolidayList.Add(DateTime.Parse(“2012-04-17“));
            //projectViewBox1.ProjectSelectData.HolidayList.Remove(DateTime.Parse(“2012-04-14“));
            //projectViewBox1.ProjectSelectData.HolidayList.Remove(DateTime.Parse(“2012-04-15“));
            
            
            
            projectViewBox1.ProjectSelectData.SaturdayOfWork= true;
            //projectViewBox1.ProjectSelectData.


            projectViewBox1.ProjectSelectData.Add(p1);
            projectViewBox1.ProjectSelectData.Add(p2);
            projectViewBox1.ProjectSelectData.Add(p3);
            projectViewBox1.ProjectSelectData.Add(p4);
            projectViewBox1.ProjectSelectData.Add(p5);

            
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2546  2012-04-12 13:35  Gantt\WinGantt\Backup\WinGantt\Form1.cs

     文件       2638  2012-04-12 09:27  Gantt\WinGantt\Backup\WinGantt\Form1.Designer.cs

     文件       5814  2012-04-12 09:27  Gantt\WinGantt\Backup\WinGantt\Form1.resx

     文件        497  2012-04-12 09:28  Gantt\WinGantt\Backup\WinGantt\Program.cs

     文件       1398  2012-04-12 08:50  Gantt\WinGantt\Backup\WinGantt\Properties\AssemblyInfo.cs

     文件        143  2012-04-12 08:55  Gantt\WinGantt\Backup\WinGantt\Properties\licenses.licx

     文件       2902  2012-04-12 08:50  Gantt\WinGantt\Backup\WinGantt\Properties\Resources.Designer.cs

     文件       5612  2012-04-12 08:50  Gantt\WinGantt\Backup\WinGantt\Properties\Resources.resx

     文件       1093  2012-04-12 08:50  Gantt\WinGantt\Backup\WinGantt\Properties\Settings.Designer.cs

     文件        249  2012-04-12 08:50  Gantt\WinGantt\Backup\WinGantt\Properties\Settings.settings

     文件      28557  2012-04-12 08:55  Gantt\WinGantt\Backup\WinGantt\UserControl1.cs

     文件       3883  2012-04-12 09:02  Gantt\WinGantt\Backup\WinGantt\WinGantt.csproj

     文件        914  2012-04-12 08:50  Gantt\WinGantt\Backup\WinGantt.sln

    ..A..H.     18432  2012-04-12 16:51  Gantt\WinGantt\Backup\WinGantt.suo

     文件       3915  2015-06-13 22:16  Gantt\WinGantt\UpgradeLog.xml

     文件     871936  2015-08-28 12:55  Gantt\WinGantt\WinGantt\bin\Debug\WinGantt.exe

     文件      56832  2015-08-28 12:55  Gantt\WinGantt\WinGantt\bin\Debug\WinGantt.pdb

     文件      11608  2015-08-28 12:56  Gantt\WinGantt\WinGantt\bin\Debug\WinGantt.vshost.exe

     文件        490  2012-06-06 18:06  Gantt\WinGantt\WinGantt\bin\Debug\WinGantt.vshost.exe.manifest

     文件       2748  2015-08-28 12:55  Gantt\WinGantt\WinGantt\Form1.cs

     文件       5657  2015-08-28 10:34  Gantt\WinGantt\WinGantt\Form1.Designer.cs

     文件    1274992  2015-08-28 10:34  Gantt\WinGantt\WinGantt\Form1.resx

     文件      24574  2015-08-28 12:55  Gantt\WinGantt\WinGantt\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6442  2015-08-28 12:55  Gantt\WinGantt\WinGantt\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件     846408  2015-08-28 10:34  Gantt\WinGantt\WinGantt\obj\Debug\GanttControls.Form1.resources

     文件        180  2015-08-27 09:52  Gantt\WinGantt\WinGantt\obj\Debug\GanttControls.ProjectViewBox.resources

     文件       4608  2015-06-13 22:16  Gantt\WinGantt\WinGantt\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

     文件       1621  2015-08-28 12:56  Gantt\WinGantt\WinGantt\obj\Debug\WinGantt.csproj.FileListAbsolute.txt

     文件        912  2015-08-28 10:34  Gantt\WinGantt\WinGantt\obj\Debug\WinGantt.csproj.GenerateResource.Cache

     文件      19828  2015-08-27 15:19  Gantt\WinGantt\WinGantt\obj\Debug\WinGantt.csprojResolveAssemblyReference.cache

............此处省略38个文件信息

评论

共有 条评论