Subversion Repositories Code-Repo

Rev

Rev 68 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68 Rev 101
Line 15... Line 15...
15
    {
15
    {
16
        public DateTime time;   // Time of insertion
16
        public DateTime time;   // Time of insertion
17
        public string drive;    // Drive letter of the drive
17
        public string drive;    // Drive letter of the drive
18
        public string label;    // Label of the drive
18
        public string label;    // Label of the drive
19
        public string size;     // Size of the drive in bytes (I think)
19
        public string size;     // Size of the drive in bytes (I think)
20
        public string owner;    // Owner to be specified
20
        public string owner;    // Owner to be specified (optional)
21
        public string dock;     // Dock number as choosen
21
        public string dock;     // Dock number as choosen
22
    }
22
    }
23
    public partial class DriveLogger_Form : Form
23
    public partial class DriveLogger_Form : Form
24
    {
24
    {
25
        private static List<DriveEntry> driveEntryList= new List<DriveEntry>();
25
        private static List<DriveEntry> driveEntryList= new List<DriveEntry>();
Line 100... Line 100...
100
                        // Check for non-matching entries
100
                        // Check for non-matching entries
101
                        if (!drivesPreviouslyDetectedList.Contains(drive.Name))
101
                        if (!drivesPreviouslyDetectedList.Contains(drive.Name))
102
                        {
102
                        {
103
                            // Creates and populates a new DriveEntry
103
                            // Creates and populates a new DriveEntry
104
                            DriveEntry newEntry = new DriveEntry();
104
                            DriveEntry newEntry = new DriveEntry();
-
 
105
 
105
                            if (newDrivesDetected == false)
106
                            //if (newDrivesDetected == false)
106
                            {
107
                            //{
107
                                // First entry detected is prompted for dock label and owner name
108
                            //    // First entry detected is prompted for dock label and owner name
108
                                newDrivesDetected = true;
109
                            //    newDrivesDetected = true;
109
                                DriveLogger_LabelPrompt_Form newPrompt = new DriveLogger_LabelPrompt_Form();
110
                            //    DriveLogger_LabelPrompt_Form newPrompt = new DriveLogger_LabelPrompt_Form();
110
                                newPrompt.ShowDialog();
111
                            //    newPrompt.ShowDialog();
111
                                newEntry.owner = newPrompt.driveOwner;
112
                            //    newEntry.owner = newPrompt.driveOwner;
112
                                driveOwner = newPrompt.driveOwner;
113
                            //    driveOwner = newPrompt.driveOwner;
113
                                newEntry.dock = newPrompt.driveDock;
114
                            //    newEntry.dock = newPrompt.driveDock;
114
                                driveDock = newPrompt.driveDock;
115
                            //    driveDock = newPrompt.driveDock;
115
                            }
116
                            //}
116
                            else
117
                            //else
117
                            {
118
                            //{
118
                                // Subsequent entries use the previously entered dock label and owner
119
                            //    // Subsequent entries use the previously entered dock label and owner
119
                                newDrivesDetected = true;
120
                            //    newDrivesDetected = true;
120
                                newEntry.owner = driveOwner;
121
                            //    newEntry.owner = driveOwner;
121
                                newEntry.dock = driveDock;
122
                            //    newEntry.dock = driveDock;
122
                            }
123
                            //}
123
                            
124
                            
124
                            // Sets other drive details for the drive
125
                            // Sets other drive details for the drive
125
                            newEntry.time = DateTime.Now;
126
                            newEntry.time = DateTime.Now;
126
                            newEntry.drive = drive.Name;
127
                            newEntry.drive = drive.Name;
127
 
128