C# VS2010 甘特图


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  GanttWinGanttBackupWinGanttForm1.cs

     文件       2638  2012-04-12 09:27  GanttWinGanttBackupWinGanttForm1.Designer.cs

     文件       5814  2012-04-12 09:27  GanttWinGanttBackupWinGanttForm1.resx

     文件        497  2012-04-12 09:28  GanttWinGanttBackupWinGanttProgram.cs

     文件       1398  2012-04-12 08:50  GanttWinGanttBackupWinGanttPropertiesAssemblyInfo.cs

     文件        143  2012-04-12 08:55  GanttWinGanttBackupWinGanttPropertieslicenses.licx

     文件       2902  2012-04-12 08:50  GanttWinGanttBackupWinGanttPropertiesResources.Designer.cs

     文件       5612  2012-04-12 08:50  GanttWinGanttBackupWinGanttPropertiesResources.resx

     文件       1093  2012-04-12 08:50  GanttWinGanttBackupWinGanttPropertiesSettings.Designer.cs

     文件        249  2012-04-12 08:50  GanttWinGanttBackupWinGanttPropertiesSettings.settings

     文件      28557  2012-04-12 08:55  GanttWinGanttBackupWinGanttUserControl1.cs

     文件       3883  2012-04-12 09:02  GanttWinGanttBackupWinGanttWinGantt.csproj

     文件        914  2012-04-12 08:50  GanttWinGanttBackupWinGantt.sln

    ..A..H.     18432  2012-04-12 16:51  GanttWinGanttBackupWinGantt.suo

     文件       3915  2015-06-13 22:16  GanttWinGanttUpgradeLog.xml

     文件     871936  2015-08-28 12:55  GanttWinGanttWinGanttinDebugWinGantt.exe

     文件      56832  2015-08-28 12:55  GanttWinGanttWinGanttinDebugWinGantt.pdb

     文件      11608  2015-08-28 12:56  GanttWinGanttWinGanttinDebugWinGantt.vshost.exe

     文件        490  2012-06-06 18:06  GanttWinGanttWinGanttinDebugWinGantt.vshost.exe.manifest

     文件       2748  2015-08-28 12:55  GanttWinGanttWinGanttForm1.cs

     文件       5657  2015-08-28 10:34  GanttWinGanttWinGanttForm1.Designer.cs

     文件    1274992  2015-08-28 10:34  GanttWinGanttWinGanttForm1.resx

     文件      24574  2015-08-28 12:55  GanttWinGanttWinGanttobjDebugDesignTimeResolveAssemblyReferences.cache

     文件       6442  2015-08-28 12:55  GanttWinGanttWinGanttobjDebugDesignTimeResolveAssemblyReferencesInput.cache

     文件     846408  2015-08-28 10:34  GanttWinGanttWinGanttobjDebugGanttControls.Form1.resources

     文件        180  2015-08-27 09:52  GanttWinGanttWinGanttobjDebugGanttControls.ProjectViewBox.resources

     文件       4608  2015-06-13 22:16  GanttWinGanttWinGanttobjDebugTempPEProperties.Resources.Designer.cs.dll

     文件       1621  2015-08-28 12:56  GanttWinGanttWinGanttobjDebugWinGantt.csproj.FileListAbsolute.txt

     文件        912  2015-08-28 10:34  GanttWinGanttWinGanttobjDebugWinGantt.csproj.GenerateResource.Cache

     文件      19828  2015-08-27 15:19  GanttWinGanttWinGanttobjDebugWinGantt.csprojResolveAssemblyReference.cache

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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)