Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports PlexityHide.GTP
Imports PlexityHide.GTP.WEB

Namespace Sample2
	''' <summary>
	''' Summary description for WebForm1.
	''' </summary>
	Public Class WebForm1 : Inherits System.Web.UI.Page
	Protected gantt_ASPSettings1 As PlexityHide.GTP.WEB.Gantt_ASPSettings
	Protected HyperLink1 As System.Web.UI.WebControls.HyperLink
	Protected Gantt_ASP1 As PlexityHide.GTP.WEB.Gantt_ASP

	Private Function AddDemoRow(ByVal parent As GridNode, ByVal s1 As String, ByVal s2 As String, ByVal s3 As String) As GridNode

	  Dim gn As GridNode
	  If Not parent Is Nothing Then
		gn=parent.SubNodes.AddNode()
	  Else
		gn=Gantt_ASP1.Gantt.Grid.GridStructure.RootNodes.AddNode()
	  End If

	  gn.GetCell(0).Content.Value=s1
	  gn.GetCell(1).Content.Value=s2
	  gn.GetCell(2).Content.Value=s3
	  Return gn

	End Function

'TODO: INSTANT VB TODO TASK: stop is a keyword in VB.NET. Change the name or use square brackets to override it:
'INSTANT VB NOTE: The parameter stop was renamed since it is a keyword in VB:
	Private Function AddDemoTimeItem(ByVal gn As GridNode, ByVal start As Integer, ByVal stop_Renamed As Integer, ByVal c1 As Color, ByVal c2 As Color, ByVal ts As TimeItemStyle) As TimeItem
	  Dim ti As TimeItem=GanttRow.FromGridNode(gn).Layers(0).AddNewTimeItem()
	  ti.Start=Gantt_ASP1.Gantt.DateScaler.StartTime.AddDays(start)
	  ti.Stop=ti.Start.AddDays(stop_Renamed)
	  ti.TimeItemLayout = New TimeItemLayout()
	  ti.TimeItemLayout.Color=c1
	  ti.TimeItemLayout.GradientColor=c2
	  ti.TimeItemLayout.BrushKind=BrushKind.GradientHorizontal
	  ti.TimeItemLayout.TimeItemStyle=ts
	  ti.TimeItemLayout.TopInset=10
	  ti.TimeItemLayout.BottomInset=10
	  Return ti
	End Function

		Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load

		  If (Not IsPostBack) Then
		'Gantt_ASP1.StartTime=DateTime.Now;
		'Gantt_ASP1.StopTime=DateTime.Now.AddDays(30);

		  End If
	  'Gantt_ASP1.Gantt.DateScaler.TimeSpanSet(Gantt_ASP1.StartTime,Gantt_ASP1.StopTime);

			' Put user code to initialize the page here
			Gantt_ASP1.Gantt.Grid.RootNodes.Clear()
	  Dim p1 As GridNode=AddDemoRow(Nothing,"High","x1","")
	  AddDemoTimeItem(p1,1,10,Color.Azure,Color.Aquamarine,TimeItemStyle.Span)
		Dim p11 As GridNode=AddDemoRow(p1,"High","x11","")
		AddDemoTimeItem(p11,5,13,Color.Brown,Color.BurlyWood,TimeItemStyle.Square)
		Dim p12 As GridNode=AddDemoRow(p1,"High","x12","")
		AddDemoTimeItem(p12,5,13,Color.Brown,Color.BurlyWood,TimeItemStyle.Square)
		Dim p13 As GridNode=AddDemoRow(p1,"High","x13","")
		AddDemoTimeItem(p13,5,5,Color.Brown,Color.BurlyWood,TimeItemStyle.Square)
		AddDemoTimeItem(p13,11,17,Color.Brown,Color.BurlyWood,TimeItemStyle.Square)
		Dim p14 As GridNode=AddDemoRow(p1,"High","x14","")
		AddDemoTimeItem(p14,11,1,Color.Black,Color.DarkGray,TimeItemStyle.Romb)
		Dim p15 As GridNode=AddDemoRow(p1,"High","x15","")
	  Dim p2 As GridNode=AddDemoRow(Nothing,"High","x2","")
	  Dim p3 As GridNode=AddDemoRow(Nothing,"High","x3","")
	  Dim p4 As GridNode=AddDemoRow(Nothing,"High","x4","")
	  Dim p5 As GridNode=AddDemoRow(Nothing,"High","x5","")
	  Dim p6 As GridNode=AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")
	  AddDemoRow(Nothing,"High","x6","")

		End Sub

		#Region "Web Form Designer generated code"
		Overrides Protected Sub OnInit(ByVal e As EventArgs)
			'
			' CODEGEN: This call is required by the ASP.NET Web Form Designer.
			'
			InitializeComponent()
			MyBase.OnInit(e)
		End Sub

		''' <summary>
		''' Required method for Designer support - do not modify
		''' the contents of this method with the code editor.
		''' </summary>
		Private Sub InitializeComponent()
	  Dim cellLayout1 As PlexityHide.GTP.CellLayout = New PlexityHide.GTP.CellLayout()
	  Dim lineOption1 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption2 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption3 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption4 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim cellLayout2 As PlexityHide.GTP.CellLayout = New PlexityHide.GTP.CellLayout()
	  Dim lineOption5 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption6 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption7 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption8 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim cellLayout3 As PlexityHide.GTP.CellLayout = New PlexityHide.GTP.CellLayout()
	  Dim lineOption9 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption10 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption11 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim lineOption12 As PlexityHide.GTP.LineOption = New PlexityHide.GTP.LineOption()
	  Dim gridColumn1 As PlexityHide.GTP.GridColumn = New PlexityHide.GTP.GridColumn()
	  Dim gridColumn2 As PlexityHide.GTP.GridColumn = New PlexityHide.GTP.GridColumn()
	  Dim gridColumn3 As PlexityHide.GTP.GridColumn = New PlexityHide.GTP.GridColumn()
	  Me.gantt_ASPSettings1 = New PlexityHide.GTP.WEB.Gantt_ASPSettings()
	  ' 
	  ' gantt_ASPSettings1
	  ' 
	  ' 
	  ' gantt_ASPSettings1.Gantt
	  ' 
	  Me.gantt_ASPSettings1.Gantt.BackColor = System.Drawing.Color.White
	  Me.gantt_ASPSettings1.Gantt.CollisionDetectionSyncron = False
	  Me.gantt_ASPSettings1.Gantt.DateScalerHeight = 48
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.FishEyeColor = System.Drawing.Color.AliceBlue
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.FishEyeenabled = False
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.FishEyeMagnification = PlexityHide.GTP.FishEyeMagnification.M1
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.LowerBound = New System.DateTime(1000, 1, 1, 0, 0, 0, 0)
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.MarkerTextColor = System.Drawing.Color.Blue
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.ResizeType = PlexityHide.GTP.ResizingType.StartAndStopLocked
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.ScaleMarkerColor = System.Drawing.Color.Black
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.ShowWeekNumbers = False
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.SpanTextColor = System.Drawing.Color.SlateGray
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.StartOfWeek = System.DayOfWeek.Sunday
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.StartTime = New System.DateTime(2004, 3, 5, 0, 0, 0, 0)
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.StopTime = New System.DateTime(2004, 4, 3, 0, 0, 0, 0)
	  Me.gantt_ASPSettings1.Gantt.DateScalerProperties.UpperBound = New System.DateTime(8000, 1, 1, 0, 0, 0, 0)
	  Me.gantt_ASPSettings1.Gantt.DrawPyjamas = True
	  Me.gantt_ASPSettings1.Gantt.FocusedTimeItem = Nothing
	  Me.gantt_ASPSettings1.Gantt.GridProperties.AutoCreateColumnsFromDataset = False
	  Me.gantt_ASPSettings1.Gantt.GridProperties.BackColor = System.Drawing.Color.White
	  Me.gantt_ASPSettings1.Gantt.GridProperties.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
	  Me.gantt_ASPSettings1.Gantt.GridProperties.BottomColor = System.Drawing.Color.White
	  cellLayout1.BackgroundColor = System.Drawing.Color.BlanchedAlmond
	  cellLayout1.BackgroundUse = True
	  cellLayout1.DeSelectedColor = System.Drawing.SystemColors.Highlight
	  cellLayout1.EndEllipsis = False
	  cellLayout1.Font = New System.Drawing.Font("Times New Roman", 8F, System.Drawing.FontStyle.Underline)
	  cellLayout1.FontColor = System.Drawing.SystemColors.ControlText
	  cellLayout1.HeaderBackgroundColor = System.Drawing.Color.LightCoral
	  cellLayout1.HeaderBackgroundGradiantColor = System.Drawing.Color.FromArgb((CByte(255)), (CByte(192)), (CByte(128)))
	  cellLayout1.HorzAlign = System.Drawing.StringAlignment.Near
	  cellLayout1.ImageIndex_Select = -1
	  cellLayout1.ImageIndex_UnSelect = -1
	  lineOption1.Color = System.Drawing.Color.LightGray
	  lineOption1.Use = True
	  lineOption1.Width = 1
	  cellLayout1.LineBottom = lineOption1
	  lineOption2.Color = System.Drawing.Color.Brown
	  lineOption2.Use = True
	  lineOption2.Width = 1
	  cellLayout1.LineLeft = lineOption2
	  lineOption3.Color = System.Drawing.Color.Brown
	  lineOption3.Use = False
	  lineOption3.Width = 1
	  cellLayout1.LineRight = lineOption3
	  lineOption4.Color = System.Drawing.Color.LightGray
	  lineOption4.Use = False
	  lineOption4.Width = 1
	  cellLayout1.LineTop = lineOption4
	  cellLayout1.MinHeight = 19
	  cellLayout1.Name = "Default"
	  cellLayout1.Padding = New System.Drawing.Rectangle(2, 2, 2, 2)
	  cellLayout1.SelectedColor = System.Drawing.SystemColors.Highlight
	  cellLayout1.Spacing = New System.Drawing.Rectangle(2, 2, 2, 2)
	  cellLayout1.VertAlign = System.Drawing.StringAlignment.Near
	  cellLayout2.BackgroundColor = System.Drawing.Color.White
	  cellLayout2.BackgroundUse = False
	  cellLayout2.DeSelectedColor = System.Drawing.SystemColors.Highlight
	  cellLayout2.EndEllipsis = False
	  cellLayout2.Font = New System.Drawing.Font("Times New Roman", 14F)
	  cellLayout2.FontColor = System.Drawing.SystemColors.ControlText
	  cellLayout2.HeaderBackgroundColor = System.Drawing.Color.Purple
	  cellLayout2.HeaderBackgroundGradiantColor = System.Drawing.SystemColors.ControlLight
	  cellLayout2.HorzAlign = System.Drawing.StringAlignment.Near
	  cellLayout2.ImageIndex_Select = -1
	  cellLayout2.ImageIndex_UnSelect = -1
	  lineOption5.Color = System.Drawing.Color.LightGray
	  lineOption5.Use = True
	  lineOption5.Width = 1
	  cellLayout2.LineBottom = lineOption5
	  lineOption6.Color = System.Drawing.Color.LightGray
	  lineOption6.Use = False
	  lineOption6.Width = 1
	  cellLayout2.LineLeft = lineOption6
	  lineOption7.Color = System.Drawing.Color.LightGray
	  lineOption7.Use = True
	  lineOption7.Width = 1
	  cellLayout2.LineRight = lineOption7
	  lineOption8.Color = System.Drawing.Color.LightGray
	  lineOption8.Use = False
	  lineOption8.Width = 1
	  cellLayout2.LineTop = lineOption8
	  cellLayout2.MinHeight = 19
	  cellLayout2.Name = "Anotherone"
	  cellLayout2.Padding = New System.Drawing.Rectangle(0, 0, 0, 0)
	  cellLayout2.SelectedColor = System.Drawing.SystemColors.Highlight
	  cellLayout2.Spacing = New System.Drawing.Rectangle(0, 0, 0, 0)
	  cellLayout2.VertAlign = System.Drawing.StringAlignment.Near
	  cellLayout3.BackgroundColor = System.Drawing.Color.White
	  cellLayout3.BackgroundUse = False
	  cellLayout3.DeSelectedColor = System.Drawing.SystemColors.Highlight
	  cellLayout3.EndEllipsis = False
	  cellLayout3.Font = New System.Drawing.Font("Times New Roman", 14F)
	  cellLayout3.FontColor = System.Drawing.SystemColors.ControlText
	  cellLayout3.HeaderBackgroundColor = System.Drawing.SystemColors.ControlDark
	  cellLayout3.HeaderBackgroundGradiantColor = System.Drawing.SystemColors.ControlLight
	  cellLayout3.HorzAlign = System.Drawing.StringAlignment.Near
	  cellLayout3.ImageIndex_Select = -1
	  cellLayout3.ImageIndex_UnSelect = -1
	  lineOption9.Color = System.Drawing.Color.LightGray
	  lineOption9.Use = True
	  lineOption9.Width = 1
	  cellLayout3.LineBottom = lineOption9
	  lineOption10.Color = System.Drawing.Color.LightGray
	  lineOption10.Use = False
	  lineOption10.Width = 1
	  cellLayout3.LineLeft = lineOption10
	  lineOption11.Color = System.Drawing.Color.LightGray
	  lineOption11.Use = True
	  lineOption11.Width = 1
	  cellLayout3.LineRight = lineOption11
	  lineOption12.Color = System.Drawing.Color.LightGray
	  lineOption12.Use = False
	  lineOption12.Width = 1
	  cellLayout3.LineTop = lineOption12
	  cellLayout3.MinHeight = 19
	  cellLayout3.Name = "<new>"
	  cellLayout3.Padding = New System.Drawing.Rectangle(0, 0, 0, 0)
	  cellLayout3.SelectedColor = System.Drawing.SystemColors.Highlight
	  cellLayout3.Spacing = New System.Drawing.Rectangle(0, 0, 0, 0)
	  cellLayout3.VertAlign = System.Drawing.StringAlignment.Near
	  Me.gantt_ASPSettings1.Gantt.GridProperties.CellLayouts.Add(cellLayout1)
	  Me.gantt_ASPSettings1.Gantt.GridProperties.CellLayouts.Add(cellLayout2)
	  Me.gantt_ASPSettings1.Gantt.GridProperties.CellLayouts.Add(cellLayout3)
	  gridColumn1.AllowMove = True
	  gridColumn1.AllowResize = True
	  gridColumn1.ColumnDerivedFromDS = False
	  gridColumn1.DataSourceColumn = Nothing
	  gridColumn1.DataSourceColumnType = Nothing
	  gridColumn1.Hide = False
	  gridColumn1.LayoutName = "Default"
	  gridColumn1.ReadOnly = False
	  gridColumn1.SortEnable = False
	  gridColumn1.Title = "Col1"
	  gridColumn1.Tree = False
	  gridColumn1.Type = PlexityHide.GTP.CellType.SingleText
	  gridColumn1.Width = 50
	  gridColumn2.AllowMove = True
	  gridColumn2.AllowResize = True
	  gridColumn2.ColumnDerivedFromDS = False
	  gridColumn2.DataSourceColumn = Nothing
	  gridColumn2.DataSourceColumnType = Nothing
	  gridColumn2.Hide = False
	  gridColumn2.LayoutName = "Default"
	  gridColumn2.ReadOnly = False
	  gridColumn2.SortEnable = False
	  gridColumn2.Title = "Tree"
	  gridColumn2.Tree = True
	  gridColumn2.Type = PlexityHide.GTP.CellType.SingleText
	  gridColumn2.Width = 50
	  gridColumn3.AllowMove = True
	  gridColumn3.AllowResize = True
	  gridColumn3.ColumnDerivedFromDS = False
	  gridColumn3.DataSourceColumn = Nothing
	  gridColumn3.DataSourceColumnType = Nothing
	  gridColumn3.Hide = False
	  gridColumn3.LayoutName = "Default"
	  gridColumn3.ReadOnly = False
	  gridColumn3.SortEnable = False
	  gridColumn3.Title = "Col3"
	  gridColumn3.Tree = False
	  gridColumn3.Type = PlexityHide.GTP.CellType.SingleText
	  gridColumn3.Width = 50
	  Me.gantt_ASPSettings1.Gantt.GridProperties.Columns.Add(gridColumn1)
	  Me.gantt_ASPSettings1.Gantt.GridProperties.Columns.Add(gridColumn2)
	  Me.gantt_ASPSettings1.Gantt.GridProperties.Columns.Add(gridColumn3)
	  Me.gantt_ASPSettings1.Gantt.GridProperties.DrawPyjamas = True
	  Me.gantt_ASPSettings1.Gantt.GridProperties.HasHeader = True
	  Me.gantt_ASPSettings1.Gantt.GridProperties.ImageList = Nothing
	  Me.gantt_ASPSettings1.Gantt.GridProperties.PyjamasColor = System.Drawing.SystemColors.ControlLight
	  Me.gantt_ASPSettings1.Gantt.GridProperties.PyjamasGradientColor = System.Drawing.SystemColors.ControlLightLight
	  Me.gantt_ASPSettings1.Gantt.GridProperties.RootNodes_DataMember = Nothing
	  Me.gantt_ASPSettings1.Gantt.GridProperties.RootNodes_DataSource = Nothing
	  Me.gantt_ASPSettings1.Gantt.GridProperties.RootNodes_DataSourceList = Nothing
	  Me.gantt_ASPSettings1.Gantt.GridWidth = 150
	  Me.gantt_ASPSettings1.Gantt.ImageList = Nothing
	  Me.gantt_ASPSettings1.Gantt.Location = New System.Drawing.Point(0, 0)
	  Me.gantt_ASPSettings1.Gantt.Name = "Gantt"
	  Me.gantt_ASPSettings1.Gantt.PyjamasColor = System.Drawing.Color.Snow
	  Me.gantt_ASPSettings1.Gantt.PyjamasGradientColor = System.Drawing.Color.FromArgb((CByte(255)), (CByte(192)), (CByte(128)))
	  Me.gantt_ASPSettings1.Gantt.Size = New System.Drawing.Size(432, 456)
	  Me.gantt_ASPSettings1.Gantt.TabIndex = 0
	  Me.gantt_ASPSettings1.Gantt.TodayLine = True
	  Me.gantt_ASPSettings1.Gantt.VerticalDayStripes = False
	  Me.gantt_ASPSettings1.Gantt.VerticalDayStripes_Days = New Boolean() { True, False, False, False, False, False, True}
	  Me.gantt_ASPSettings1.Gantt.VerticalLines = True
	  Me.gantt_ASPSettings1.Gantt_ASP = Me.Gantt_ASP1
'	  Me.Load += New System.EventHandler(Me.Page_Load);

		End Sub
		#End Region
	End Class
End Namespace
