/[MorrowindCustomClothingSlotCreator]/trunk/MorrowindCustomClothingSlotCreator/Form1.cs
ViewVC logotype

Diff of /trunk/MorrowindCustomClothingSlotCreator/Form1.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/MorrowindCustomClothingSlotCreator/Form1.cs	2011/07/30 09:15:16	30
+++ trunk/MorrowindCustomClothingSlotCreator/Form1.cs	2011/07/30 09:16:04	31
@@ -30,9 +30,9 @@
 
             if (loaded)
             {
-                foreach (ClothingEntry entry in this.TES3PluginLoader.ClothingSection.ClothingEntries)
+                foreach (KeyValuePair<string,ClothingEntry> entry in this.TES3PluginLoader.ClothingSection.ClothingEntries)
                 {
-                    lstClothingEntries.Items.Add(entry.CLOT_NAME);
+                    lstClothingEntries.Items.Add(entry.Key);
                 }
                 MessageBox.Show("Successfully Loaded Plugin: " + pluginFile, "Successfully Loaded File:", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
@@ -63,7 +63,14 @@
 
         private void lstClothingEntries_SelectedIndexChanged(object sender, EventArgs e)
         {
+            ClothingEntry chosen_entry = null;
 
+            foreach (KeyValuePair<string, ClothingEntry> entry in this.TES3PluginLoader.ClothingSection.ClothingEntries)
+            {
+                string key = lstClothingEntries.Items[lstClothingEntries.SelectedIndex].ToString();
+                if (key == entry.Key) { chosen_entry = entry.Value; break; }
+            }
+            if (chosen_entry == null) return;
         }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22