예제 #1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            StringTable gender = new StringTable();
            gender.setIndexes(
                StringTableEntry.NumericCode,
                StringTableEntry.LetterCode,
                StringTableEntry.FullText,
                "requireSecondOfficer"
                );
            gender.addItem("1", "m", "Male", "false");
            gender.addItem("2", "f", "Female", "true");
            gender.addItem("99", "u", "Unknown", "true");

            gender["Male", StringTableEntry.FullText][StringTableEntry.NumericCode] = "3";

            int value = int.Parse(gender["Male", StringTableEntry.FullText][StringTableEntry.NumericCode]); //retrieve numeric code for a Male

            StringTable bob = new StringTable();

            MessageBox.Show(value.ToString());
        }