Advertisement
Advertisement
| 02.11.2008 at 07:50AM PST, ID: 23153271 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 02.11.2008 at 08:11AM PST, ID: 20867464 |
| 02.11.2008 at 08:21AM PST, ID: 20867563 |
| 02.11.2008 at 08:34AM PST, ID: 20867670 |
| 02.11.2008 at 08:50AM PST, ID: 20867802 |
| 02.11.2008 at 08:59AM PST, ID: 20867899 |
| 02.11.2008 at 09:02AM PST, ID: 20867931 |
| 02.11.2008 at 09:10AM PST, ID: 20868024 |
| 02.11.2008 at 11:18AM PST, ID: 20869228 |
| 02.11.2008 at 11:30AM PST, ID: 20869326 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: |
' This is the C# implementation of Data Binding PictureBox converted from
' VB .NET by LZF of www.codeproject.com. The original code and article,
' writen by Duncan Mackenzie of MSDN, can be found at
' "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/custcntrlsamp3.asp"
'
' Following block is the copyright and the description from the original code
'Copyright (C) 2002 Microsoft Corporation
'All rights reserved.
'THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
'EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
'MERCHANTIBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
'Date: May 2002
'Author: Duncan Mackenzie
'Requires the release version of .NET Framework
'This control allows you to provide a file path
'to its ImagePath property and have it load the image
'Having this ImagePath property allows the control
'to be databound, therefore supporting the display
'of a picture based on a path stored in a database.
'thinking that missing files and bad images would be
'common, I am handling those errors simply by
'clearing the image. That way you won't get an exception
'but you also won't see the last record's image
'with the current record's data.
'If you would rather have an exception occur,
'simply rewrite the ImagePath property and the
'UpdateImage functions to remove the Exists check
'and the Try Catch... like this;
'Public Property ImagePath() As String
' Get
' Return m_ImagePath
' End Get
' Set(ByVal Value As String)
' If Value <> m_ImagePath Then
' m_ImagePath = Value
' UpdateImage()
' RaiseEvent ImagePathChanged(CObj(Me), New EventArgs())
' End If
' End Set
'End Property
'Private Sub UpdateImage()
' Me.Image = New Bitmap(ImagePath)
'End Sub
Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Drawing
Imports System.Data
Imports System.Windows.Forms
Namespace ControlLib
Public Class dbImageBox
Inherits System.Windows.Forms.PictureBox
Private m_ImagePath As String
Protected Overloads Overrides Sub OnPaint(ByVal pe As PaintEventArgs)
' TODO: Add custom paint code here
' Calling the base class OnPaint
MyBase.OnPaint(pe)
End Sub
Public Property ImagePath() As String
Get
Return Me.m_ImagePath
End Get
Set(ByVal value As String)
If value <> Me.m_ImagePath Then
Me.m_ImagePath = value
If System.IO.File.Exists(value) Then
UpdateImage()
Else
Me.Image = Nothing
End If
End If
End Set
End Property
Public Sub UpdateImage()
Try
Me.Image = Image.FromFile(ImagePath)
Catch e As System.Exception
MessageBox.Show(e.Message)
Me.Image = Nothing
End Try
End Sub
End Class
End Namespace
|
| 02.11.2008 at 11:33AM PST, ID: 20869360 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 204: 205: 206: 207: 208: 209: 210: 211: 212: 213: 214: 215: 216: 217: 218: 219: 220: 221: 222: 223: 224: 225: 226: 227: 228: 229: 230: 231: 232: 233: 234: 235: 236: 237: 238: 239: 240: 241: 242: 243: 244: 245: 246: 247: 248: 249: 250: 251: 252: 253: 254: 255: 256: 257: 258: 259: 260: 261: 262: 263: 264: 265: 266: 267: 268: 269: 270: 271: 272: 273: 274: 275: 276: 277: 278: 279: 280: 281: 282: 283: 284: 285: 286: 287: 288: 289: 290: 291: 292: 293: 294: 295: 296: 297: 298: 299: 300: 301: 302: 303: 304: 305: 306: 307: 308: 309: 310: 311: 312: 313: 314: 315: 316: 317: 318: 319: 320: 321: 322: 323: 324: 325: 326: 327: 328: 329: 330: 331: 332: 333: 334: 335: 336: 337: 338: 339: 340: 341: 342: 343: 344: 345: 346: 347: 348: 349: 350: 351: 352: 353: 354: 355: 356: 357: 358: 359: 360: 361: 362: 363: 364: 365: 366: 367: 368: 369: 370: 371: 372: 373: 374: 375: 376: 377: 378: 379: 380: 381: 382: 383: 384: 385: 386: 387: 388: 389: 390: 391: 392: 393: 394: 395: 396: 397: 398: 399: 400: 401: 402: 403: 404: 405: 406: 407: 408: 409: 410: 411: 412: 413: 414: 415: 416: 417: 418: 419: 420: 421: 422: 423: 424: 425: 426: 427: 428: 429: 430: 431: 432: 433: 434: 435: 436: 437: 438: 439: 440: 441: 442: 443: 444: 445: 446: 447: 448: 449: 450: 451: 452: 453: 454: 455: 456: 457: 458: 459: 460: 461: 462: 463: 464: 465: 466: 467: 468: 469: 470: 471: 472: 473: 474: 475: 476: 477: 478: 479: 480: 481: 482: 483: 484: 485: 486: 487: 488: 489: 490: 491: 492: 493: 494: 495: 496: 497: 498: 499: 500: 501: 502: 503: 504: 505: 506: 507: 508: 509: 510: 511: 512: 513: 514: 515: 516: 517: 518: 519: 520: 521: 522: 523: 524: 525: 526: 527: 528: 529: 530: 531: 532: 533: 534: 535: 536: 537: |
' This is the C# implementation of Data Binding TreeView Control converted and modified
' from VB .NET by LZF of www.codeproject.com. The original code and article,
' writen by Duncan Mackenzie of MSDN, can be found at
' "http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwinforms/html/custcntrlsamp3.asp"
'
' Following lines are the copyright from the original code
'
' * Copyright (C) 2002 Microsoft Corporation
' * All rights reserved.
' *
' * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' * EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' * MERCHANTIBILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' *
' * Date: May 2002
' * Author: Duncan Mackenzie
' *
' * Requires the release version of .NET Framework
'
Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Drawing
Imports System.Data
Imports System.Windows.Forms
Namespace ControlLib
Public Class dbTreeViewCtrl
Inherits System.Windows.Forms.TreeView
Protected Overloads Overrides Sub OnPaint(ByVal pe As PaintEventArgs)
' TODO: Add custom paint code here
' Calling the base class OnPaint
MyBase.OnPaint(pe)
End Sub
Private m_autoBuild As Boolean = True
Public Property AutoBuildTree() As Boolean
Get
Return Me.m_autoBuild
End Get
Set(ByVal value As Boolean)
Me.m_autoBuild = value
End Set
End Property
#Region "Data Binding"
Private m_currencyManager As CurrencyManager = Nothing
Private m_ValueMember As String
Private m_DisplayMember As String
Private m_oDataSource As Object
<Category("Data")> _
Public Property DataSource() As Object
Get
Return m_oDataSource
End Get
Set(ByVal value As Object)
If value Is Nothing Then
Me.m_currencyManager = Nothing
Me.Nodes.Clear()
Else
If Not (TypeOf value Is IList OrElse TypeOf m_oDataSource Is IListSource) Then
Throw (New System.Exception("Invalid DataSource"))
Else
If TypeOf value Is IListSource Then
Dim myListSource As IListSource = DirectCast(value, IListSource)
If myListSource.ContainsListCollection = True Then
Throw (New System.Exception("Invalid DataSource"))
End If
End If
Me.m_oDataSource = value
Me.m_currencyManager = DirectCast(Me.BindingContext(value), CurrencyManager)
If Me.AutoBuildTree Then
BuildTree()
End If
End If
End If
End Set
End Property
' end of DataSource property
<Category("Data")> _
Public Property ValueMember() As String
Get
Return Me.m_ValueMember
End Get
Set(ByVal value As String)
Me.m_ValueMember = value
End Set
End Property
<Category("Data")> _
Public Property DisplayMember() As String
Get
Return Me.m_DisplayMember
End Get
Set(ByVal value As String)
Me.m_DisplayMember = value
End Set
End Property
Public Function GetValue(ByVal index As Integer) As Object
Dim innerList As IList = Me.m_currencyManager.List
If innerList IsNot Nothing Then
If (Me.ValueMember <> "") AndAlso (index >= 0 AndAlso 0 < innerList.Count) Then
Dim pdValueMember As PropertyDescriptor
pdValueMember = Me.m_currencyManager.GetItemProperties()(Me.ValueMember)
Return pdValueMember.GetValue(innerList(index))
End If
End If
Return Nothing
End Function
Public Function GetDisplay(ByVal index As Integer) As Object
Dim innerList As IList = Me.m_currencyManager.List
If innerList IsNot Nothing Then
If (Me.DisplayMember <> "") AndAlso (index >= 0 AndAlso 0 < innerList.Count) Then
Dim pdDisplayMember As PropertyDescriptor
pdDisplayMember = Me.m_currencyManager.GetItemProperties()(Me.ValueMember)
Return pdDisplayMember.GetValue(innerList(index))
End If
End If
Return Nothing
End Function
#End Region
#Region "Building the Tree"
Private treeGroups As New ArrayList()
Public Sub BuildTree()
Me.Nodes.Clear()
If (Me.m_currencyManager IsNot Nothing) AndAlso (Me.m_currencyManager.List IsNot Nothing) Then
Dim innerList As IList = Me.m_currencyManager.List
Dim currNode As TreeNodeCollection = Me.Nodes
Dim currGroupIndex As Integer = 0
Dim currListIndex As Integer = 0
If Me.treeGroups.Count > currGroupIndex Then
Dim currGroup As Group = DirectCast(treeGroups(currGroupIndex), Group)
Dim myFirstNode As dbTreeNode = Nothing
Dim pdGroupBy As PropertyDescriptor
Dim pdValue As PropertyDescriptor
Dim pdDisplay As PropertyDescriptor
pdGroupBy = Me.m_currencyManager.GetItemProperties()(currGroup.GroupBy)
pdValue = Me.m_currencyManager.GetItemProperties()(currGroup.ValueMember)
pdDisplay = Me.m_currencyManager.GetItemProperties()(currGroup.DisplayMember)
Dim currGroupBy As String = Nothing
If innerList.Count > currListIndex Then
Dim currObject As Object
While currListIndex < innerList.Count
currObject = innerList(currListIndex)
If pdGroupBy.GetValue(currObject).ToString() <> currGroupBy Then
currGroupBy = pdGroupBy.GetValue(currObject).ToString()
myFirstNode = New dbTreeNode(currGroup.Name, pdDisplay.GetValue(currObject).ToString(), currObject, pdValue.GetValue(innerList(currListIndex)), currGroup.ImageIndex, currGroup.SelectedImageIndex, _
currListIndex)
currNode.Add(DirectCast(myFirstNode, TreeNode))
Else
AddNodes(currGroupIndex, currListIndex, myFirstNode.Nodes, currGroup.GroupBy)
End If
' end while
End While
' end if
End If
Else
' end if
While currListIndex < innerList.Count
AddNodes(currGroupIndex, currListIndex, Me.Nodes, "")
End While
End If
' end else
If Me.Nodes.Count > 0 Then
Me.SelectedNode = Me.Nodes(0)
End If
End If
' end if
End Sub
Private Sub AddNodes(ByVal currGroupIndex As Integer, ByRef currentListIndex As Integer, ByVal currNodes As TreeNodeCollection, ByVal prevGroupByField As String)
Dim innerList As IList = Me.m_currencyManager.List
Dim pdPrevGroupBy As System.ComponentModel.PropertyDescriptor = Nothing
Dim prevGroupByValue As String = Nothing
Dim currGroup As Group
If prevGroupByField <> "" Then
pdPrevGroupBy = Me.m_currencyManager.GetItemProperties()(prevGroupByField)
End If
currGroupIndex += 1
If treeGroups.Count > currGroupIndex Then
currGroup = DirectCast(treeGroups(currGroupIndex), Group)
Dim pdGroupBy As PropertyDescriptor = Nothing
Dim pdValue As PropertyDescriptor = Nothing
Dim pdDisplay As PropertyDescriptor = Nothing
pdGroupBy = Me.m_currencyManager.GetItemProperties()(currGroup.GroupBy)
pdValue = Me.m_currencyManager.GetItemProperties()(currGroup.ValueMember)
pdDisplay = Me.m_currencyManager.GetItemProperties()(currGroup.DisplayMember)
Dim currGroupBy As String = Nothing
If innerList.Count > currentListIndex Then
If pdPrevGroupBy IsNot Nothing Then
prevGroupByValue = pdPrevGroupBy.GetValue(innerList(currentListIndex)).ToString()
End If
Dim myFirstNode As dbTreeNode = Nothing
Dim currObject As Object = Nothing
While (currentListIndex < innerList.Count) AndAlso (pdPrevGroupBy IsNot Nothing) AndAlso (pdPrevGroupBy.GetValue(innerList(currentListIndex)).ToString() = prevGroupByValue)
currObject = innerList(currentListIndex)
If pdGroupBy.GetValue(currObject).ToString() <> currGroupBy Then
currGroupBy = pdGroupBy.GetValue(currObject).ToString()
myFirstNode = New dbTreeNode(currGroup.Name, pdDisplay.GetValue(currObject).ToString(), currObject, pdValue.GetValue(innerList(currentListIndex)), currGroup.ImageIndex, currGroup.SelectedImageIndex, _
currentListIndex)
currNodes.Add(DirectCast(myFirstNode, TreeNode))
Else
AddNodes(currGroupIndex, currentListIndex, myFirstNode.Nodes, currGroup.GroupBy)
End If
End While
End If
Else
Dim myNewLeafNode As dbTreeNode
Dim currObject As Object = Me.m_currencyManager.List(currentListIndex)
If (Me.DisplayMember IsNot Nothing) AndAlso (Me.ValueMember IsNot Nothing) AndAlso (Me.DisplayMember <> "") AndAlso (Me.ValueMember <> "") Then
Dim pdDisplayloc As PropertyDescriptor = Me.m_currencyManager.GetItemProperties()(Me.DisplayMember)
Dim pdValueloc As PropertyDescriptor = Me.m_currencyManager.GetItemProperties()(Me.ValueMember)
myNewLeafNode = New dbTreeNode(IIf(Me.Tag Is Nothing, "", Me.Tag.ToString()), pdDisplayloc.GetValue(currObject).ToString(), currObject, pdValueloc.GetValue(currObject), currentListIndex)
Else
myNewLeafNode = New dbTreeNode("", currentListIndex.ToString(), currObject, currObject, Me.ImageIndex, Me.SelectedImageIndex, _
currentListIndex)
End If
currNodes.Add(DirectCast(myNewLeafNode, TreeNode))
currentListIndex += 1
End If
End Sub
#End Region
#Region "Groups"
Public Sub RemoveGroup(ByVal group As Group)
If treeGroups.Contains(group) Then
treeGroups.Remove(group)
If Me.AutoBuildTree Then
BuildTree()
End If
End If
End Sub
Public Sub RemoveGroup(ByVal groupName As String)
For Each group As Group In Me.treeGroups
If group.Name = groupName Then
RemoveGroup(group)
Return
End If
Next
End Sub
Public Sub RemoveAllGroups()
Me.treeGroups.Clear()
If Me.AutoBuildTree Then
Me.BuildTree()
End If
End Sub
Public Sub AddGroup(ByVal group As Group)
Try
treeGroups.Add(group)
If Me.AutoBuildTree Then
Me.BuildTree()
End If
Catch e As NotSupportedException
MessageBox.Show(e.Message)
Catch e As System.Exception
Throw e
End Try
End Sub
Public Sub AddGroup(ByVal name As String, ByVal groupBy As String, ByVal displayMember As String, ByVal valueMember As String, ByVal imageIndex As Integer, ByVal selectedImageIndex As Integer)
Dim myNewGroup As New Group(name, groupBy, displayMember, valueMember, imageIndex, selectedImageIndex)
Me.AddGroup(myNewGroup)
End Sub
Public Function GetGroups() As Group()
Return DirectCast(treeGroups.ToArray(Type.[GetType]("Group")), Group())
End Function
#End Region
Public Sub SetLeafData(ByVal name As String, ByVal displayMember As String, ByVal valueMember As String, ByVal imageIndex As Integer, ByVal selectedImageIndex As Integer)
Me.Tag = name
Me.DisplayMember = displayMember
Me.ValueMember = valueMember
Me.ImageIndex = imageIndex
Me.SelectedImageIndex = selectedImageIndex
End Sub
Public Function IsLeafNode(ByVal node As TreeNode) As Boolean
Return (node.Nodes.Count = 0)
End Function
#Region "Keeping Everything In Sync"
Public Function FindNodeByValue(ByVal value As Object) As TreeNode
Return FindNodeByValue(value, Me.Nodes)
End Function
Public Function FindNodeByValue(ByVal Value As Object, ByVal nodesToSearch As TreeNodeCollection) As TreeNode
Dim i As Integer = 0
Dim currNode As TreeNode
Dim leafNode As dbTreeNode
While i < nodesToSearch.Count
currNode = nodesToSearch(i)
i += 1
If currNode.LastNode Is Nothing Then
leafNode = DirectCast(currNode, dbTreeNode)
If leafNode.Value.ToString() = Value.ToString() Then
Return currNode
End If
Else
currNode = FindNodeByValue(Value, currNode.Nodes)
If currNode IsNot Nothing Then
Return currNode
End If
End If
End While
Return Nothing
End Function
Private Function FindNodeByPosition(ByVal posIndex As Integer) As TreeNode
Return FindNodeByPosition(posIndex, Me.Nodes)
End Function
Private Function FindNodeByPosition(ByVal posIndex As Integer, ByVal nodesToSearch As TreeNodeCollection) As TreeNode
Dim i As Integer = 0
Dim currNode As TreeNode
Dim leafNode As dbTreeNode
While i < nodesToSearch.Count
currNode = nodesToSearch(i)
i += 1
If currNode.Nodes.Count = 0 Then
leafNode = DirectCast(currNode, dbTreeNode)
If leafNode.Position = posIndex Then
Return currNode
Else
currNode = FindNodeByPosition(posIndex, currNode.Nodes)
If currNode IsNot Nothing Then
Return currNode
End If
End If
End If
End While
Return Nothing
End Function
Protected Overloads Overrides Sub OnAfterSelect(ByVal e As TreeViewEventArgs)
Dim leafNode As dbTreeNode = DirectCast(e.Node, dbTreeNode)
If leafNode IsNot Nothing Then
If Me.m_currencyManager.Position <> leafNode.Position Then
Me.m_currencyManager.Position = leafNode.Position
End If
End If
' TODO: Add MyTreeViewCtrl.OnAfterSelect implementation
MyBase.OnAfterSelect(e)
End Sub
#End Region
End Class
Public Class Group
Private groupName As String
Private groupByMember As String
Private groupByDisplayMember As String
Private groupByValueMember As String
Private groupImageIndex As Integer
Private groupSelectedImageIndex As Integer
Public Sub New(ByVal name As String, ByVal groupBy As String, ByVal displayMember As String, ByVal valueMember As String, ByVal imageIndex As Integer, ByVal selectedImageIndex As Integer)
Me.ImageIndex = imageIndex
Me.Name = name
Me.GroupBy = groupBy
Me.DisplayMember = displayMember
Me.ValueMember = valueMember
Me.SelectedImageIndex = selectedImageIndex
End Sub
Public Sub New(ByVal name As String, ByVal groupBy As String, ByVal displayMember As String, ByVal valueMember As String, ByVal imageIndex As Integer)
Me.New(name, groupBy, displayMember, valueMember, imageIndex, imageIndex)
End Sub
Public Sub New(ByVal name As String, ByVal groupBy As String)
Me.New(name, groupBy, groupBy, groupBy, -1, -1)
End Sub
Public Property SelectedImageIndex() As Integer
Get
Return groupSelectedImageIndex
End Get
Set(ByVal value As Integer)
groupSelectedImageIndex = value
End Set
End Property
Public Property ImageIndex() As Integer
Get
Return groupImageIndex
End Get
Set(ByVal value As Integer)
groupImageIndex = value
End Set
End Property
Public Property Name() As String
Get
Return groupName
End Get
Set(ByVal value As String)
groupName = value
End Set
End Property
Public Property GroupBy() As String
Get
Return groupByMember
End Get
Set(ByVal value As String)
groupByMember = value
End Set
End Property
Public Property DisplayMember() As String
Get
Return groupByDisplayMember
End Get
Set(ByVal value As String)
groupByDisplayMember = value
End Set
End Property
Public Property ValueMember() As String
Get
Return groupByValueMember
End Get
Set(ByVal value As String)
groupByValueMember = value
End Set
End Property
End Class
Public Class dbTreeNode
Inherits TreeNode
Private m_groupName As String
Private m_value As Object
Private m_item As Object
Private m_position As Integer
Public Sub New()
End Sub
Public Sub New(ByVal groupName As String, ByVal text As String, ByVal item As Object, ByVal value As Object, ByVal imageIndex As Integer, ByVal selectedImgIndex As Integer, _
ByVal position As Integer)
Me.GroupName = groupName
Me.Text = text
Me.Item = item
Me.Value = value
Me.ImageIndex = imageIndex
Me.SelectedImageIndex = selectedImgIndex
Me.m_position = position
End Sub
Public Sub New(ByVal groupName As String, ByVal text As String, ByVal item As Object, ByVal value As Object, ByVal position As Integer)
Me.GroupName = groupName
Me.Text = text
Me.Item = item
Me.Value = value
Me.m_position = position
End Sub
Public Property GroupName() As String
Get
Return m_groupName
End Get
Set(ByVal value As String)
Me.m_groupName = value
End Set
End Property
Public Property Item() As Object
Get
Return m_item
End Get
Set(ByVal value As Object)
m_item = value
End Set
End Property
Public Property Value() As Object
Get
Return m_value
End Get
Set(ByVal value As Object)
m_value = value
End Set
End Property
Public ReadOnly Property Position() As Integer
Get
Return m_position
End Get
End Property
End Class
End Namespace
|
| 02.11.2008 at 11:34AM PST, ID: 20869377 |