Load_ListBox_Class
1| using System;
2| using System.Collections.Generic;
3| using System.Linq;
4| using System.Text;
5|
6| //add references
7| using System.Windows.Forms;
8|
9| namespace MyDesktop
10| {
11| class Load_ListBox_Class
12| {
13| //Load the list box with drive object descriptions.
14| public static void Load_ListBox_Drives(ListBox lbxItems, Drives_Class[] oDrive)
15| {
16| lbxItems.Items.Clear();
17|
18| for (int x = 0; x < Drives_Class.iNextDriveObj; x++)
19| {
20| lbxItems.Items.Add(oDrive[x].Get_Description());
21| }
22| }
23|
24| public static void Load_ListBox_Apps(ListBox lbxItems, Apps_Class[] oApp)
25| {
26| lbxItems.Items.Clear();
27|
28| for (int x = 0; x < Apps_Class.iNextAppObj; x++)
29| {
30| lbxItems.Items.Add(oApp[x].Get_Description());
31| }
32| }
33|
34| public static void Load_ListBox_Sites(ListBox lbxItems, Sites_Class[] oSite)
35| {
36| lbxItems.Items.Clear();
37|
38| for (int x = 0; x < Sites_Class.iNextSiteObj; x++)
39| {
40| lbxItems.Items.Add(oSite[x].Get_Description());
41| }
42| }
43| }//end of class
44| }