コード例 #1
0
        private void AddWrapperToList(string hardcodedXmlWrapperToUse, List <XmlObjectsListWrapper> wrappersWithKeysToUse)
        {
            XmlObjectsListWrapper loadedModFileWrapper = LoadedListWrappers.GetValueOrDefault(ModSelectionComboBox.SelectedItem.ToString() + hardcodedXmlWrapperToUse);

            if (loadedModFileWrapper != null)
            {
                wrappersWithKeysToUse.Add(loadedModFileWrapper);
            }
        }
        private void AddEmptyRow_Click(object sender, RoutedEventArgs e)
        {
            //Hard code the wrapper to the items.xml for the mod
            XmlObjectsListWrapper selectedModItemsWrapper = LoadedListWrappers.GetValueOrDefault(ModSelectionComboBox.SelectedItem.ToString() + "_items");
            //Hard code the wrapper to the blocks.xml for the mod
            XmlObjectsListWrapper selectedModBlocksWrapper = LoadedListWrappers.GetValueOrDefault(ModSelectionComboBox.SelectedItem.ToString() + "_blocks");

            ModLocalizationGridUserControl.AddEmptyRow(selectedModItemsWrapper, selectedModBlocksWrapper, GameLocalizationFile);
        }