home *** CD-ROM | disk | FTP | other *** search
- Imports System
- Imports System.Drawing
- Imports System.Collections
- Imports System.ComponentModel
- Imports System.Windows.Forms
- Imports System.Data
-
- Namespace TaskPane
- Public Class Form1
- Inherits System.Windows.Forms.Form
- Private xpTaskPane1 As NETXP.Controls.TaskPane.XPTaskPane
- Private xpTaskPaneGroup1 As NETXP.Controls.TaskPane.XPTaskPaneGroup
- Private xpTaskPaneGroup2 As NETXP.Controls.TaskPane.XPTaskPaneGroup
- Private xpLink1 As NETXP.Controls.TaskPane.XPLink
- Private xpLink2 As NETXP.Controls.TaskPane.XPLink
- Private xpLink3 As NETXP.Controls.TaskPane.XPLink
- Private xpLink4 As NETXP.Controls.TaskPane.XPLink
- Private panel1 As System.Windows.Forms.Panel
- Private splitter1 As System.Windows.Forms.Splitter
- Private WithEvents radioButton1 As System.Windows.Forms.RadioButton
- Private WithEvents radioButton2 As System.Windows.Forms.RadioButton
- Private components As System.ComponentModel.Container
-
- Public Sub New()
- '
- ' Required for Windows Form Designer support
- '
- InitializeComponent()
-
- '
- ' TODO: Add any constructor code after InitializeComponent call
- '
- End Sub
-
- Protected Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing Then
- If Not components Is Nothing Then
- components.Dispose()
- End If
- End If
- MyBase.Dispose(disposing)
- End Sub
-
- #Region "Windows Form Designer generated code"
- Private Sub InitializeComponent()
- Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
- Me.xpTaskPane1 = New NETXP.Controls.TaskPane.XPTaskPane
- Me.xpTaskPaneGroup2 = New NETXP.Controls.TaskPane.XPTaskPaneGroup
- Me.xpLink2 = New NETXP.Controls.TaskPane.XPLink
- Me.xpLink1 = New NETXP.Controls.TaskPane.XPLink
- Me.xpTaskPaneGroup1 = New NETXP.Controls.TaskPane.XPTaskPaneGroup
- Me.xpLink4 = New NETXP.Controls.TaskPane.XPLink
- Me.xpLink3 = New NETXP.Controls.TaskPane.XPLink
- Me.panel1 = New System.Windows.Forms.Panel
- Me.radioButton2 = New System.Windows.Forms.RadioButton
- Me.radioButton1 = New System.Windows.Forms.RadioButton
- Me.splitter1 = New System.Windows.Forms.Splitter
- Me.xpTaskPane1.SuspendLayout()
- Me.xpTaskPaneGroup2.SuspendLayout()
- Me.xpTaskPaneGroup1.SuspendLayout()
- Me.panel1.SuspendLayout()
- Me.SuspendLayout()
- '
- ' xpTaskPane1
- '
- Me.xpTaskPane1.AutoScroll = True
- Me.xpTaskPane1.Controls.Add(Me.xpTaskPaneGroup2)
- Me.xpTaskPane1.Controls.Add(Me.xpTaskPaneGroup1)
- Me.xpTaskPane1.Dock = System.Windows.Forms.DockStyle.Left
- Me.xpTaskPane1.Location = New System.Drawing.Point(0, 0)
- Me.xpTaskPane1.Name = "xpTaskPane1"
- Me.xpTaskPane1.Size = New System.Drawing.Size(200, 414)
- Me.xpTaskPane1.TabIndex = 0
- Me.xpTaskPane1.Text = "xpTaskPane1"
- '
- ' xpTaskPaneGroup2
- '
- Me.xpTaskPaneGroup2.Controls.Add(Me.xpLink2)
- Me.xpTaskPaneGroup2.Controls.Add(Me.xpLink1)
- Me.xpTaskPaneGroup2.Image = (CType((resources.GetObject("xpTaskPaneGroup2.Image")), System.Drawing.Image))
- Me.xpTaskPaneGroup2.Location = New System.Drawing.Point(16, 128)
- Me.xpTaskPaneGroup2.Name = "xpTaskPaneGroup2"
- Me.xpTaskPaneGroup2.Size = New System.Drawing.Size(168, 80)
- Me.xpTaskPaneGroup2.TabIndex = 1
- Me.xpTaskPaneGroup2.Text = "Normal Tasks"
- '
- ' xpLink2
- '
- Me.xpLink2.BackColor = System.Drawing.Color.Transparent
- Me.xpLink2.Cursor = System.Windows.Forms.Cursors.Hand
- Me.xpLink2.Image = (CType((resources.GetObject("xpLink2.Image")), System.Drawing.Image))
- Me.xpLink2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
- Me.xpLink2.Location = New System.Drawing.Point(8, 56)
- Me.xpLink2.Name = "xpLink2"
- Me.xpLink2.Size = New System.Drawing.Size(136, 16)
- Me.xpLink2.TabIndex = 1
- Me.xpLink2.Text = "Connect to Network"
- Me.xpLink2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
- '
- ' xpLink1
- '
- Me.xpLink1.BackColor = System.Drawing.Color.Transparent
- Me.xpLink1.Cursor = System.Windows.Forms.Cursors.Hand
- Me.xpLink1.Image = (CType((resources.GetObject("xpLink1.Image")), System.Drawing.Image))
- Me.xpLink1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
- Me.xpLink1.Location = New System.Drawing.Point(8, 32)
- Me.xpLink1.Name = "xpLink1"
- Me.xpLink1.Size = New System.Drawing.Size(136, 16)
- Me.xpLink1.TabIndex = 0
- Me.xpLink1.Text = "Clean Hard Disk"
- Me.xpLink1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
- '
- ' xpTaskPaneGroup1
- '
- Me.xpTaskPaneGroup1.Controls.Add(Me.xpLink4)
- Me.xpTaskPaneGroup1.Controls.Add(Me.xpLink3)
- Me.xpTaskPaneGroup1.Image = (CType((resources.GetObject("xpTaskPaneGroup1.Image")), System.Drawing.Image))
- Me.xpTaskPaneGroup1.Location = New System.Drawing.Point(16, 16)
- Me.xpTaskPaneGroup1.Name = "xpTaskPaneGroup1"
- Me.xpTaskPaneGroup1.Size = New System.Drawing.Size(168, 88)
- Me.xpTaskPaneGroup1.SpecialTasks = True
- Me.xpTaskPaneGroup1.TabIndex = 0
- Me.xpTaskPaneGroup1.Text = "Special Tasks"
- '
- ' xpLink4
- '
- Me.xpLink4.BackColor = System.Drawing.Color.Transparent
- Me.xpLink4.Cursor = System.Windows.Forms.Cursors.Hand
- Me.xpLink4.Image = (CType((resources.GetObject("xpLink4.Image")), System.Drawing.Image))
- Me.xpLink4.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
- Me.xpLink4.Location = New System.Drawing.Point(8, 64)
- Me.xpLink4.Name = "xpLink4"
- Me.xpLink4.Size = New System.Drawing.Size(144, 16)
- Me.xpLink4.TabIndex = 1
- Me.xpLink4.Text = "Disk Backup"
- Me.xpLink4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
- '
- ' xpLink3
- '
- Me.xpLink3.BackColor = System.Drawing.Color.Transparent
- Me.xpLink3.Cursor = System.Windows.Forms.Cursors.Hand
- Me.xpLink3.Image = (CType((resources.GetObject("xpLink3.Image")), System.Drawing.Image))
- Me.xpLink3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
- Me.xpLink3.Location = New System.Drawing.Point(8, 40)
- Me.xpLink3.Name = "xpLink3"
- Me.xpLink3.Size = New System.Drawing.Size(144, 16)
- Me.xpLink3.TabIndex = 0
- Me.xpLink3.Text = "Open Shortcut"
- Me.xpLink3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
- '
- ' panel1
- '
- Me.panel1.BackColor = System.Drawing.SystemColors.Window
- Me.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
- Me.panel1.Controls.Add(Me.radioButton2)
- Me.panel1.Controls.Add(Me.radioButton1)
- Me.panel1.Controls.Add(Me.splitter1)
- Me.panel1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.panel1.Location = New System.Drawing.Point(200, 0)
- Me.panel1.Name = "panel1"
- Me.panel1.Size = New System.Drawing.Size(360, 414)
- Me.panel1.TabIndex = 1
- '
- ' radioButton2
- '
- Me.radioButton2.Location = New System.Drawing.Point(64, 72)
- Me.radioButton2.Name = "radioButton2"
- Me.radioButton2.Size = New System.Drawing.Size(168, 24)
- Me.radioButton2.TabIndex = 2
- Me.radioButton2.Text = "Custom Colors"
- '
- ' radioButton1
- '
- Me.radioButton1.Checked = True
- Me.radioButton1.Location = New System.Drawing.Point(64, 48)
- Me.radioButton1.Name = "radioButton1"
- Me.radioButton1.Size = New System.Drawing.Size(168, 24)
- Me.radioButton1.TabIndex = 1
- Me.radioButton1.TabStop = True
- Me.radioButton1.Text = "Windows Default Colors"
- '
- ' splitter1
- '
- Me.splitter1.Location = New System.Drawing.Point(0, 0)
- Me.splitter1.Name = "splitter1"
- Me.splitter1.Size = New System.Drawing.Size(3, 410)
- Me.splitter1.TabIndex = 0
- Me.splitter1.TabStop = False
- '
- ' Form1
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
- Me.ClientSize = New System.Drawing.Size(560, 414)
- Me.Controls.Add(Me.panel1)
- Me.Controls.Add(Me.xpTaskPane1)
- Me.Icon = (CType((resources.GetObject("$this.Icon")), System.Drawing.Icon))
- Me.Name = "Form1"
- Me.Text = "Test Form"
- Me.xpTaskPane1.ResumeLayout(False)
- Me.xpTaskPaneGroup2.ResumeLayout(False)
- Me.xpTaskPaneGroup1.ResumeLayout(False)
- Me.panel1.ResumeLayout(False)
- Me.ResumeLayout(False)
- End Sub
- #End Region
-
- <STAThread()> _
- Public Shared Sub Main(ByVal args As String())
- Application.Run(New Form1)
- End Sub
-
- Private Sub radioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles radiobutton1.checkedchanged
- If radioButton1.Checked Then
- Me.xpTaskPane1.ColorTable = NETXP.Library.ColorTables.Dynamic
- End If
- End Sub
-
- Private Sub radioButton2_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles radiobutton2.checkedchanged
- If radioButton2.Checked Then
- Me.xpTaskPane1.ColorTable = New CustomColors
- End If
- End Sub
- End Class
- Friend Class CustomColors
- Implements NETXP.Library.IColorTable
- #Region "IColorTable Members"
-
- Private icolors As NETXP.Library.ColorCollection
-
- Public Sub New()
- icolors = New NETXP.Library.ColorCollection
- Dim clr As Color
- For Each clr In NETXP.Library.ColorTables.XPOlive.Colors
- icolors.Add(Color.FromArgb(clr.G, clr.B, clr.B))
- Next
- End Sub
-
- Public Overridable ReadOnly Property Colors() As NETXP.Library.ColorCollection Implements NETXP.Library.IColorTable.Colors
- Get
- Return icolors
- End Get
- End Property
-
- #End Region
- End Class
- End Namespace
-