RadGanttViewIndicatingSpecialDays
This commit is contained in:
Родитель
5193db1708
Коммит
371e278c2c
|
@ -0,0 +1,42 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RadGanttViewIndicatingSpecialDays", "RadGanttViewIndicatingSpecialDays\RadGanttViewIndicatingSpecialDays.csproj", "{B7C88BDE-7297-435A-B7E5-0872650841B7}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "RadGanttViewIndicatingSpecialDaysVB", "RadGanttViewIndicatingSpecialDaysVB\RadGanttViewIndicatingSpecialDaysVB.vbproj", "{3D4B7941-0028-449A-972A-910CC6628084}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Debug|x86.Build.0 = Debug|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Release|x86.ActiveCfg = Release|x86
|
||||
{B7C88BDE-7297-435A-B7E5-0872650841B7}.Release|x86.Build.0 = Release|x86
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{3D4B7941-0028-449A-972A-910CC6628084}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Telerik.WinControls.UI;
|
||||
|
||||
namespace RadGanttViewIndicatingSpecialDays
|
||||
{
|
||||
public class CustomGanttView : RadGanttView
|
||||
{
|
||||
protected override RadGanttViewElement CreateGanttViewElement()
|
||||
{
|
||||
return new CustomGanttViewElement();
|
||||
}
|
||||
|
||||
public override string ThemeClassName
|
||||
{
|
||||
get { return typeof(RadGanttView).FullName; }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Telerik.WinControls.UI;
|
||||
|
||||
namespace RadGanttViewIndicatingSpecialDays
|
||||
{
|
||||
public class CustomGanttViewElement : RadGanttViewElement
|
||||
{
|
||||
protected override GanttViewGraphicalViewElement CreateGraphicalViewElement(RadGanttViewElement ganttView)
|
||||
{
|
||||
return new CustomGanttViewGraphicalViewElement(this);
|
||||
}
|
||||
|
||||
protected override Type ThemeEffectiveType
|
||||
{
|
||||
get { return typeof(RadGanttViewElement); }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using Telerik.WinControls.UI;
|
||||
|
||||
namespace RadGanttViewIndicatingSpecialDays
|
||||
{
|
||||
public class CustomGanttViewGraphicalViewElement : GanttViewGraphicalViewElement
|
||||
{
|
||||
private List<DateTime> specialDates = new List<DateTime>();
|
||||
|
||||
public CustomGanttViewGraphicalViewElement(RadGanttViewElement ganttView)
|
||||
: base(ganttView)
|
||||
{ }
|
||||
|
||||
public List<DateTime> SpecialDates
|
||||
{
|
||||
get { return specialDates; }
|
||||
set { specialDates = value; }
|
||||
}
|
||||
|
||||
protected override Type ThemeEffectiveType
|
||||
{
|
||||
get { return typeof(GanttViewGraphicalViewElement); }
|
||||
}
|
||||
|
||||
//Logic for painting the elements
|
||||
protected override void PaintElement(Telerik.WinControls.Paint.IGraphics graphics, float angle, System.Drawing.SizeF scale)
|
||||
{
|
||||
base.PaintElement(graphics, angle, scale);
|
||||
|
||||
Rectangle clipRect = this.Bounds;
|
||||
Graphics g = graphics.UnderlayGraphics as Graphics;
|
||||
|
||||
g.SetClip(clipRect);
|
||||
|
||||
DateTime currentDate = this.TimelineBehavior.AdjustedTimelineStart;
|
||||
|
||||
while (currentDate <= this.TimelineBehavior.AdjustedTimelineEnd)
|
||||
{
|
||||
float x = (float)((currentDate - this.TimelineBehavior.AdjustedTimelineStart).TotalSeconds / this.OnePixelTime.TotalSeconds);
|
||||
x -= this.HorizontalScrollBarElement.Value;
|
||||
float y = this.GanttViewElement.HeaderHeight;
|
||||
float y2 = this.Bounds.Height;
|
||||
|
||||
if (currentDate.DayOfWeek == DayOfWeek.Saturday || currentDate.DayOfWeek == DayOfWeek.Sunday)
|
||||
{
|
||||
graphics.FillRectangle(new RectangleF(x, y, 100f, y2), Color.LightGray);
|
||||
}
|
||||
else if (this.SpecialDates.Contains(currentDate.Date))
|
||||
{
|
||||
graphics.FillRectangle(new RectangleF(x, y, 100f, y2), Color.Orange);
|
||||
}
|
||||
else
|
||||
{
|
||||
graphics.FillRectangle(new RectangleF(x, y, 100f, y2), Color.White);
|
||||
}
|
||||
|
||||
graphics.DrawLine(Color.LightBlue, x, y, x, y2);
|
||||
|
||||
currentDate = currentDate.AddDays(1);
|
||||
}
|
||||
|
||||
g.ResetClip();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace RadGanttViewIndicatingSpecialDays
|
||||
{
|
||||
static class Entry
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new RadGanttViewForm());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("RadGanttViewIndicatingSpecialDays")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("RadGanttViewIndicatingSpecialDays")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("63459879-9321-452d-85f2-91315fbcd1fb")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDays/Properties/Resources.Designer.cs
сгенерированный
Normal file
71
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDays/Properties/Resources.Designer.cs
сгенерированный
Normal file
|
@ -0,0 +1,71 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34011
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace RadGanttViewIndicatingSpecialDays.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RadGanttViewIndicatingSpecialDays.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
30
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDays/Properties/Settings.Designer.cs
сгенерированный
Normal file
30
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDays/Properties/Settings.Designer.cs
сгенерированный
Normal file
|
@ -0,0 +1,30 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34011
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace RadGanttViewIndicatingSpecialDays.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
63
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDays/RadGanttViewForm.Designer.cs
сгенерированный
Normal file
63
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDays/RadGanttViewForm.Designer.cs
сгенерированный
Normal file
|
@ -0,0 +1,63 @@
|
|||
namespace RadGanttViewIndicatingSpecialDays
|
||||
{
|
||||
partial class RadGanttViewForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.customRadGanttView = new RadGanttViewIndicatingSpecialDays.CustomGanttView();
|
||||
((System.ComponentModel.ISupportInitialize)(this.customRadGanttView)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// customRadGanttView
|
||||
//
|
||||
this.customRadGanttView.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.customRadGanttView.Location = new System.Drawing.Point(0, 0);
|
||||
this.customRadGanttView.Name = "customRadGanttView";
|
||||
this.customRadGanttView.Size = new System.Drawing.Size(1165, 399);
|
||||
this.customRadGanttView.SplitterWidth = 7;
|
||||
this.customRadGanttView.TabIndex = 0;
|
||||
this.customRadGanttView.Text = "radGanttView1";
|
||||
//
|
||||
// RadGanttViewForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1165, 399);
|
||||
this.Controls.Add(this.customRadGanttView);
|
||||
this.Name = "RadGanttViewForm";
|
||||
this.Text = "Form1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.customRadGanttView)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private CustomGanttView customRadGanttView;//Telerik.WinControls.UI.RadGanttView radGanttView1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using Telerik.WinControls;
|
||||
using Telerik.WinControls.UI;
|
||||
|
||||
namespace RadGanttViewIndicatingSpecialDays
|
||||
{
|
||||
public partial class RadGanttViewForm : Form
|
||||
{
|
||||
public RadGanttViewForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.Load += RadGanttViewForm_Load;
|
||||
this.customRadGanttView.GraphicalViewItemFormatting += radGanttView1_GraphicalViewItemFormatting;
|
||||
this.customRadGanttView.TimelineItemFormatting += radGanttView1_TimelineItemFormatting;
|
||||
|
||||
((CustomGanttViewGraphicalViewElement)this.customRadGanttView.GanttViewElement.GraphicalViewElement).SpecialDates.Add(new DateTime(2014, 12, 25));
|
||||
((CustomGanttViewGraphicalViewElement)this.customRadGanttView.GanttViewElement.GraphicalViewElement).SpecialDates.Add(new DateTime(2014, 12, 26));
|
||||
}
|
||||
|
||||
private void RadGanttViewForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.customRadGanttView.EnableCustomPainting = true;
|
||||
this.customRadGanttView.GanttViewElement.GraphicalViewElement.TimelineStart = new DateTime(2014, 12, 15);
|
||||
this.customRadGanttView.GanttViewElement.GraphicalViewElement.TimelineEnd = new DateTime(2015, 1, 15);
|
||||
|
||||
this.AddTasks();
|
||||
}
|
||||
|
||||
private void radGanttView1_TimelineItemFormatting(object sender, GanttViewTimelineItemFormattingEventArgs e)
|
||||
{
|
||||
DateTime date;
|
||||
LightVisualElement element;
|
||||
for (int i = 0; i < e.ItemElement.Children[1].Children.Count; i++)
|
||||
{
|
||||
date = e.ItemElement.Data.Start.AddDays(i);
|
||||
element = e.ItemElement.Children[1].Children[i] as LightVisualElement;
|
||||
if (element != null)
|
||||
{
|
||||
element.Text = date.Day + "\n" + date.DayOfWeek.ToString().Substring(0, 2);
|
||||
element.Font = new Font("Arial", 7.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void radGanttView1_GraphicalViewItemFormatting(object sender, GanttViewGraphicalViewItemFormattingEventArgs e)
|
||||
{
|
||||
e.ItemElement.DrawFill = false;
|
||||
}
|
||||
|
||||
private void AddTasks()
|
||||
{
|
||||
//Setup data items
|
||||
GanttViewDataItem item1 = new GanttViewDataItem();
|
||||
item1.Start = new DateTime(2014, 12, 15);
|
||||
item1.End = new DateTime(2014, 12, 20);
|
||||
item1.Progress = 30m;
|
||||
item1.Title = "Summary task.1. title";
|
||||
|
||||
GanttViewDataItem subItem11 = new GanttViewDataItem();
|
||||
subItem11.Start = new DateTime(2014, 12, 16);
|
||||
subItem11.End = new DateTime(2014, 12, 18);
|
||||
subItem11.Progress = 10m;
|
||||
subItem11.Title = "Sub-task.1.1 title";
|
||||
|
||||
GanttViewDataItem subItem12 = new GanttViewDataItem();
|
||||
subItem12.Start = new DateTime(2014, 12, 21);
|
||||
subItem12.End = new DateTime(2014, 12, 23);
|
||||
subItem12.Progress = 20m;
|
||||
subItem12.Title = "Sub-task.1.2 title";
|
||||
|
||||
//Add subitems
|
||||
item1.Items.Add(subItem11);
|
||||
item1.Items.Add(subItem12);
|
||||
|
||||
this.customRadGanttView.Items.Add(item1);
|
||||
|
||||
GanttViewDataItem item2 = new GanttViewDataItem();
|
||||
item2.Start = new DateTime(2014, 12, 21);
|
||||
item2.End = new DateTime(2014, 12, 12);
|
||||
item2.Progress = 40m;
|
||||
item2.Title = "Summary task.2. title";
|
||||
|
||||
GanttViewDataItem subitem21 = new GanttViewDataItem();
|
||||
subitem21.Start = new DateTime(2014, 12, 17);
|
||||
subitem21.End = new DateTime(2014, 12, 20);
|
||||
subitem21.Progress = 10m;
|
||||
subitem21.Title = "Sub-task.2.1 title";
|
||||
|
||||
GanttViewDataItem subitem22 = new GanttViewDataItem();
|
||||
subitem22.Start = new DateTime(2014, 12, 21);
|
||||
subitem22.End = new DateTime(2014, 12, 23);
|
||||
subitem22.Progress = 30m;
|
||||
subitem22.Title = "Sub-task.2.2 title";
|
||||
|
||||
GanttViewDataItem subitem23 = new GanttViewDataItem();
|
||||
subitem23.Start = new DateTime(2014, 12, 18);
|
||||
subitem23.End = new DateTime(2014, 12, 20);
|
||||
subitem23.Title = "Sub-task.2.3 title";
|
||||
|
||||
//Add subitems
|
||||
item2.Items.Add(subitem21);
|
||||
item2.Items.Add(subitem22);
|
||||
item2.Items.Add(subitem23);
|
||||
|
||||
this.customRadGanttView.Items.Add(item2);
|
||||
|
||||
//Add links between items
|
||||
GanttViewLinkDataItem link1 = new GanttViewLinkDataItem();
|
||||
link1.StartItem = subItem11;
|
||||
link1.EndItem = subItem12;
|
||||
link1.LinkType = TasksLinkType.FinishToStart;
|
||||
this.customRadGanttView.Links.Add(link1);
|
||||
|
||||
GanttViewLinkDataItem link2 = new GanttViewLinkDataItem();
|
||||
link2.StartItem = subitem21;
|
||||
link2.EndItem = subitem22;
|
||||
link2.LinkType = TasksLinkType.StartToStart;
|
||||
this.customRadGanttView.Links.Add(link2);
|
||||
|
||||
GanttViewLinkDataItem link3 = new GanttViewLinkDataItem();
|
||||
link3.StartItem = subitem22;
|
||||
link3.EndItem = subitem23;
|
||||
link3.LinkType = TasksLinkType.FinishToStart;
|
||||
this.customRadGanttView.Links.Add(link3);
|
||||
|
||||
GanttViewTextViewColumn titleColumn = new GanttViewTextViewColumn("Title");
|
||||
GanttViewTextViewColumn startColumn = new GanttViewTextViewColumn("Start");
|
||||
GanttViewTextViewColumn endColumn = new GanttViewTextViewColumn("End");
|
||||
|
||||
this.customRadGanttView.GanttViewElement.Columns.Add(titleColumn);
|
||||
this.customRadGanttView.GanttViewElement.Columns.Add(startColumn);
|
||||
this.customRadGanttView.GanttViewElement.Columns.Add(endColumn);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -0,0 +1,90 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{B7C88BDE-7297-435A-B7E5-0872650841B7}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>RadGanttViewIndicatingSpecialDays</RootNamespace>
|
||||
<AssemblyName>RadGanttViewIndicatingSpecialDays</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Telerik.WinControls, Version=2014.3.1202.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e" />
|
||||
<Reference Include="Telerik.WinControls.UI, Version=2014.3.1202.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />
|
||||
<Reference Include="TelerikCommon, Version=2014.3.1202.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CustomGanttView.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CustomGanttViewElement.cs" />
|
||||
<Compile Include="CustomGanttViewGraphicalViewElement.cs" />
|
||||
<Compile Include="RadGanttViewForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RadGanttViewForm.Designer.cs">
|
||||
<DependentUpon>RadGanttViewForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Entry.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="RadGanttViewForm.resx">
|
||||
<DependentUpon>RadGanttViewForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
|
@ -0,0 +1,18 @@
|
|||
Imports Telerik.WinControls.UI
|
||||
|
||||
Public Class CustomGanttView
|
||||
Inherits RadGanttView
|
||||
|
||||
Protected Overrides Function CreateGanttViewElement() As RadGanttViewElement
|
||||
Return New CustomGanttViewElement()
|
||||
End Function
|
||||
|
||||
Public Overrides Property ThemeClassName As String
|
||||
Get
|
||||
Return GetType(RadGanttView).FullName
|
||||
End Get
|
||||
Set(value As String)
|
||||
MyBase.ThemeClassName = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
|
@ -0,0 +1,15 @@
|
|||
Imports Telerik.WinControls.UI
|
||||
|
||||
Public Class CustomGanttViewElement
|
||||
Inherits RadGanttViewElement
|
||||
|
||||
Protected Overrides Function CreateGraphicalViewElement(ganttView As RadGanttViewElement) As GanttViewGraphicalViewElement
|
||||
Return New CustomGanttViewGraphicalViewElement(Me)
|
||||
End Function
|
||||
|
||||
Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
|
||||
Get
|
||||
Return GetType(RadGanttViewElement)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
|
@ -0,0 +1,59 @@
|
|||
Imports Telerik.WinControls.UI
|
||||
|
||||
Public Class CustomGanttViewGraphicalViewElement
|
||||
Inherits GanttViewGraphicalViewElement
|
||||
|
||||
Private m_specialDates As New List(Of DateTime)()
|
||||
|
||||
Public Sub New(ganttView As RadGanttViewElement)
|
||||
MyBase.New(ganttView)
|
||||
End Sub
|
||||
|
||||
Public Property SpecialDates() As List(Of DateTime)
|
||||
Get
|
||||
Return m_specialDates
|
||||
End Get
|
||||
Set(value As List(Of DateTime))
|
||||
m_specialDates = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Overrides ReadOnly Property ThemeEffectiveType() As Type
|
||||
Get
|
||||
Return GetType(GanttViewGraphicalViewElement)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Logic for painting the elements
|
||||
Protected Overrides Sub PaintElement(graphics As Telerik.WinControls.Paint.IGraphics, angle As Single, scale As System.Drawing.SizeF)
|
||||
MyBase.PaintElement(graphics, angle, scale)
|
||||
|
||||
Dim clipRect As Rectangle = Me.Bounds
|
||||
Dim g As Graphics = TryCast(graphics.UnderlayGraphics, Graphics)
|
||||
|
||||
g.SetClip(clipRect)
|
||||
|
||||
Dim currentDate As DateTime = Me.TimelineBehavior.AdjustedTimelineStart
|
||||
|
||||
While currentDate <= Me.TimelineBehavior.AdjustedTimelineEnd
|
||||
Dim x As Single = CSng((currentDate - Me.TimelineBehavior.AdjustedTimelineStart).TotalSeconds / Me.OnePixelTime.TotalSeconds)
|
||||
x -= Me.HorizontalScrollBarElement.Value
|
||||
Dim y As Single = Me.GanttViewElement.HeaderHeight
|
||||
Dim y2 As Single = Me.Bounds.Height
|
||||
|
||||
If currentDate.DayOfWeek = DayOfWeek.Saturday OrElse currentDate.DayOfWeek = DayOfWeek.Sunday Then
|
||||
graphics.FillRectangle(New RectangleF(x, y, 100.0F, y2), Color.LightGray)
|
||||
ElseIf Me.SpecialDates.Contains(currentDate.[Date]) Then
|
||||
graphics.FillRectangle(New RectangleF(x, y, 100.0F, y2), Color.Orange)
|
||||
Else
|
||||
graphics.FillRectangle(New RectangleF(x, y, 100.0F, y2), Color.White)
|
||||
End If
|
||||
|
||||
graphics.DrawLine(Color.LightBlue, x, y, x, y2)
|
||||
|
||||
currentDate = currentDate.AddDays(1)
|
||||
End While
|
||||
|
||||
g.ResetClip()
|
||||
End Sub
|
||||
End Class
|
38
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDaysVB/My Project/Application.Designer.vb
сгенерированный
Normal file
38
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDaysVB/My Project/Application.Designer.vb
сгенерированный
Normal file
|
@ -0,0 +1,38 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.34011
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
' or if you encounter build errors in this file, go to the Project Designer
|
||||
' (go to Project Properties or double-click the My Project node in
|
||||
' Solution Explorer), and make changes on the Application tab.
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.RadGanttViewIndicatingSpecialDaysVB.RadGanttViewForm
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-16"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>RadGanttViewForm</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
|
@ -0,0 +1,35 @@
|
|||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("RadGanttViewIndicatingSpecialDaysVB")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("RadGanttViewIndicatingSpecialDaysVB")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("5e0a5b35-1a15-4e64-846e-7c0c58112cd8")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
63
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDaysVB/My Project/Resources.Designer.vb
сгенерированный
Normal file
63
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDaysVB/My Project/Resources.Designer.vb
сгенерированный
Normal file
|
@ -0,0 +1,63 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.34011
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("RadGanttViewIndicatingSpecialDaysVB.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
73
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDaysVB/My Project/Settings.Designer.vb
сгенерированный
Normal file
73
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDaysVB/My Project/Settings.Designer.vb
сгенерированный
Normal file
|
@ -0,0 +1,73 @@
|
|||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.34011
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.RadGanttViewIndicatingSpecialDaysVB.My.MySettings
|
||||
Get
|
||||
Return Global.RadGanttViewIndicatingSpecialDaysVB.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
53
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDaysVB/RadGanttViewForm.Designer.vb
сгенерированный
Normal file
53
GanttView/RadGanttViewIndicatingSpecialDays/RadGanttViewIndicatingSpecialDaysVB/RadGanttViewForm.Designer.vb
сгенерированный
Normal file
|
@ -0,0 +1,53 @@
|
|||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class RadGanttViewForm
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.CustomRadGanttView = New CustomGanttView() 'New Telerik.WinControls.UI.RadGanttView()
|
||||
CType(Me.CustomRadGanttView, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'CustomRadGanttView
|
||||
'
|
||||
Me.CustomRadGanttView.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CustomRadGanttView.Location = New System.Drawing.Point(0, 0)
|
||||
Me.CustomRadGanttView.Name = "CustomRadGanttView"
|
||||
Me.CustomRadGanttView.Size = New System.Drawing.Size(1115, 644)
|
||||
Me.CustomRadGanttView.SplitterWidth = 7
|
||||
Me.CustomRadGanttView.TabIndex = 0
|
||||
Me.CustomRadGanttView.Text = "RadGanttView1"
|
||||
'
|
||||
'RadGanttViewForm
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1115, 644)
|
||||
Me.Controls.Add(Me.CustomRadGanttView)
|
||||
Me.Name = "RadGanttViewForm"
|
||||
Me.Text = "Form1"
|
||||
CType(Me.CustomRadGanttView, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents CustomRadGanttView As CustomGanttView 'Telerik.WinControls.UI.RadGanttView
|
||||
|
||||
End Class
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
|
@ -0,0 +1,127 @@
|
|||
Imports Telerik.WinControls.UI
|
||||
|
||||
Public Class RadGanttViewForm
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
|
||||
AddHandler Me.Load, AddressOf RadGanttViewForm_Load
|
||||
AddHandler Me.CustomRadGanttView.GraphicalViewItemFormatting, AddressOf CustomRadGanttView_GraphicalViewItemFormatting
|
||||
AddHandler Me.CustomRadGanttView.TimelineItemFormatting, AddressOf CustomRadGanttView_TimelineItemFormatting
|
||||
|
||||
DirectCast(Me.CustomRadGanttView.GanttViewElement.GraphicalViewElement, CustomGanttViewGraphicalViewElement).SpecialDates.Add(New DateTime(2014, 12, 25))
|
||||
DirectCast(Me.CustomRadGanttView.GanttViewElement.GraphicalViewElement, CustomGanttViewGraphicalViewElement).SpecialDates.Add(New DateTime(2014, 12, 26))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RadGanttViewForm_Load(sender As Object, e As EventArgs)
|
||||
Me.CustomRadGanttView.EnableCustomPainting = True
|
||||
Me.CustomRadGanttView.GanttViewElement.GraphicalViewElement.TimelineStart = New DateTime(2014, 12, 15)
|
||||
Me.CustomRadGanttView.GanttViewElement.GraphicalViewElement.TimelineEnd = New DateTime(2015, 1, 15)
|
||||
|
||||
Me.AddTasks()
|
||||
End Sub
|
||||
|
||||
Private Sub CustomRadGanttView_TimelineItemFormatting(sender As Object, e As GanttViewTimelineItemFormattingEventArgs)
|
||||
Dim tlDate As DateTime
|
||||
Dim element As LightVisualElement
|
||||
For i As Integer = 0 To e.ItemElement.Children(1).Children.Count - 1
|
||||
tlDate = e.ItemElement.Data.Start.AddDays(i)
|
||||
element = TryCast(e.ItemElement.Children(1).Children(i), LightVisualElement)
|
||||
If element IsNot Nothing Then
|
||||
element.Text = tlDate.Day & vbLf & tlDate.DayOfWeek.ToString().Substring(0, 2)
|
||||
element.Font = New Font("Arial", 7.5F)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub CustomRadGanttView_GraphicalViewItemFormatting(sender As Object, e As GanttViewGraphicalViewItemFormattingEventArgs)
|
||||
e.ItemElement.DrawFill = False
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub AddTasks()
|
||||
'Setup data items
|
||||
Dim item1 As New GanttViewDataItem()
|
||||
item1.Start = New DateTime(2014, 12, 15)
|
||||
item1.[End] = New DateTime(2014, 12, 20)
|
||||
item1.Progress = 30D
|
||||
item1.Title = "Summary task.1. title"
|
||||
|
||||
Dim subItem11 As New GanttViewDataItem()
|
||||
subItem11.Start = New DateTime(2014, 12, 16)
|
||||
subItem11.[End] = New DateTime(2014, 12, 18)
|
||||
subItem11.Progress = 10D
|
||||
subItem11.Title = "Sub-task.1.1 title"
|
||||
|
||||
Dim subItem12 As New GanttViewDataItem()
|
||||
subItem12.Start = New DateTime(2014, 12, 21)
|
||||
subItem12.[End] = New DateTime(2014, 12, 23)
|
||||
subItem12.Progress = 20D
|
||||
subItem12.Title = "Sub-task.1.2 title"
|
||||
|
||||
'Add subitems
|
||||
item1.Items.Add(subItem11)
|
||||
item1.Items.Add(subItem12)
|
||||
|
||||
Me.CustomRadGanttView.Items.Add(item1)
|
||||
|
||||
Dim item2 As New GanttViewDataItem()
|
||||
item2.Start = New DateTime(2014, 12, 21)
|
||||
item2.[End] = New DateTime(2014, 12, 12)
|
||||
item2.Progress = 40D
|
||||
item2.Title = "Summary task.2. title"
|
||||
|
||||
Dim subitem21 As New GanttViewDataItem()
|
||||
subitem21.Start = New DateTime(2014, 12, 17)
|
||||
subitem21.[End] = New DateTime(2014, 12, 20)
|
||||
subitem21.Progress = 10D
|
||||
subitem21.Title = "Sub-task.2.1 title"
|
||||
|
||||
Dim subitem22 As New GanttViewDataItem()
|
||||
subitem22.Start = New DateTime(2014, 12, 21)
|
||||
subitem22.[End] = New DateTime(2014, 12, 23)
|
||||
subitem22.Progress = 30D
|
||||
subitem22.Title = "Sub-task.2.2 title"
|
||||
|
||||
Dim subitem23 As New GanttViewDataItem()
|
||||
subitem23.Start = New DateTime(2014, 12, 18)
|
||||
subitem23.[End] = New DateTime(2014, 12, 20)
|
||||
subitem23.Title = "Sub-task.2.3 title"
|
||||
|
||||
'Add subitems
|
||||
item2.Items.Add(subitem21)
|
||||
item2.Items.Add(subitem22)
|
||||
item2.Items.Add(subitem23)
|
||||
|
||||
Me.CustomRadGanttView.Items.Add(item2)
|
||||
|
||||
'Add links between items
|
||||
Dim link1 As New GanttViewLinkDataItem()
|
||||
link1.StartItem = subItem11
|
||||
link1.EndItem = subItem12
|
||||
link1.LinkType = TasksLinkType.FinishToStart
|
||||
Me.CustomRadGanttView.Links.Add(link1)
|
||||
|
||||
Dim link2 As New GanttViewLinkDataItem()
|
||||
link2.StartItem = subitem21
|
||||
link2.EndItem = subitem22
|
||||
link2.LinkType = TasksLinkType.StartToStart
|
||||
Me.CustomRadGanttView.Links.Add(link2)
|
||||
|
||||
Dim link3 As New GanttViewLinkDataItem()
|
||||
link3.StartItem = subitem22
|
||||
link3.EndItem = subitem23
|
||||
link3.LinkType = TasksLinkType.FinishToStart
|
||||
Me.CustomRadGanttView.Links.Add(link3)
|
||||
|
||||
Dim titleColumn As New GanttViewTextViewColumn("Title")
|
||||
Dim startColumn As New GanttViewTextViewColumn("Start")
|
||||
Dim endColumn As New GanttViewTextViewColumn("End")
|
||||
|
||||
Me.CustomRadGanttView.GanttViewElement.Columns.Add(titleColumn)
|
||||
Me.CustomRadGanttView.GanttViewElement.Columns.Add(startColumn)
|
||||
Me.CustomRadGanttView.GanttViewElement.Columns.Add(endColumn)
|
||||
End Sub
|
||||
|
||||
End Class
|
|
@ -0,0 +1,137 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{3D4B7941-0028-449A-972A-910CC6628084}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>RadGanttViewIndicatingSpecialDaysVB.My.MyApplication</StartupObject>
|
||||
<RootNamespace>RadGanttViewIndicatingSpecialDaysVB</RootNamespace>
|
||||
<AssemblyName>RadGanttViewIndicatingSpecialDaysVB</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>RadGanttViewIndicatingSpecialDaysVB.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>RadGanttViewIndicatingSpecialDaysVB.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Telerik.WinControls, Version=2014.3.1202.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />
|
||||
<Reference Include="Telerik.WinControls.UI, Version=2014.3.1202.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />
|
||||
<Reference Include="Telerik.WinControls.UI.Design, Version=2014.3.1202.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />
|
||||
<Reference Include="TelerikCommon, Version=2014.3.1202.20, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="CustomGanttView.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CustomGanttViewElement.vb" />
|
||||
<Compile Include="CustomGanttViewGraphicalViewElement.vb" />
|
||||
<Compile Include="RadGanttViewForm.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="RadGanttViewForm.Designer.vb">
|
||||
<DependentUpon>RadGanttViewForm.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="RadGanttViewForm.resx">
|
||||
<DependentUpon>RadGanttViewForm.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче