private void MyWindow_Loaded(object sender, RoutedEventArgs e) { string openingText = "Thank you for downloading the 7 days to die Mod Creator! \n" + "If you have any issues please report them in the comments on the nexus page.\n\n" + "IMPORTANT: If you lose work check the log.txt in the Output folder.\n" + "Any time you close the app or clear the object view, the xml that could be generated is output in that log.\n\n" + "If you like the application don't forget to leave me a comment or better yet drop an endorsment!\n" + "Good luck with your mods!"; this.XmlOutputBox.Text = openingText; this.LoadedListWrappers = new Dictionary <string, XmlObjectsListWrapper>(); this.MainWindowFileController = new MainWindowFileController(this.LoadedListWrappers); this.MainWindowViewController = new MainWindowViewController(); MainWindowViewController.XmlOutputBox = this.XmlOutputBox; MainWindowViewController.LoadedListWrappers = this.LoadedListWrappers; SetPanels(); SetCustomModViewElements(); SetEvents(); MainWindowViewController.IncludeAllModsCheckBox = this.IncludeAllModsInBoxesCheckBox; this.IncludeCommentsCheckBox.IsChecked = Properties.Settings.Default.IncludeCommentsSearchTreeTooltip; this.IncludeChildrenInOnHoverCheckBox.IsChecked = Properties.Settings.Default.IncludeChildrenSearchTreeTooltip; this.IncludeAllModsInBoxesCheckBox.IsChecked = Properties.Settings.Default.IncludeAllModsObjectTreeAttributes; this.IgnoreAllAttributesCheckBox.IsChecked = Properties.Settings.Default.IgnoreAllAttributesCheckbox; this.IgnoreAllAttributesCheckBox.Click += IgnoreAllAttributesCheckBox_Click; MainWindowFileController.LoadStartingDirectory(SearchTreeLoadedFilesComboBox, NewObjectViewLoadedFilesComboBox, CurrentModFilesCenterViewComboBox, LoadedModsSearchViewComboBox, CurrentGameFilesCenterViewComboBox); this.LoadedModsCenterViewComboBox.SetComboBox(XmlFileManager.GetCustomModFoldersInOutput()); this.CurrentModFilesCenterViewComboBox.SetComboBox(XmlFileManager.GetCustomModFilesInOutput(Properties.Settings.Default.ModTagSetting, Properties.Settings.Default.ModTagSetting + "_")); this.LoadedModsCenterViewComboBox.Text = Properties.Settings.Default.ModTagSetting; SetMainWindowToolTips(); SetBackgroundFromSetting(); }
internal void RefreshMainUIComboboxes(ComboBox currentModLoadedFilesCenterViewComboBox, ComboBox loadedModsCenterViewComboBox, ComboBox loadedModsSearchViewComboBox) { currentModLoadedFilesCenterViewComboBox.SetComboBox(XmlFileManager.GetCustomModFilesInOutput(Properties.Settings.Default.ModTagSetting, Properties.Settings.Default.ModTagSetting + "_")); loadedModsCenterViewComboBox.SetComboBox(XmlFileManager.GetCustomModFoldersInOutput()); loadedModsSearchViewComboBox.SetComboBox(XmlFileManager.GetCustomModFoldersInOutput()); loadedModsCenterViewComboBox.Text = Properties.Settings.Default.ModTagSetting; }
private void DirectEdit_Closed(object sender, EventArgs e) { string currentLoadedMod = Properties.Settings.Default.ModTagSetting; this.MainWindowFileController.LoadCustomTagWrappers(currentLoadedMod, this.CurrentModFilesCenterViewComboBox); this.CurrentModFilesCenterViewComboBox.SetComboBox(XmlFileManager.GetCustomModFilesInOutput(currentLoadedMod, currentLoadedMod + "_")); }
private void LoadedModsCenterViewComboBox_DropDownClosed(object sender, EventArgs e) { ComboBox senderAsBox = sender as ComboBox; string customModFile = senderAsBox.Text; if (!String.IsNullOrEmpty(customModFile)) { Properties.Settings.Default.ModTagSetting = customModFile; Properties.Settings.Default.Save(); this.CurrentModFilesCenterViewComboBox.SetComboBox(XmlFileManager.GetCustomModFilesInOutput(customModFile, Properties.Settings.Default.ModTagSetting + "_")); } }
private void DeleteModFileXmlViewButton_Click(object sender, RoutedEventArgs e) { string currentModName = Properties.Settings.Default.ModTagSetting; bool didDeleteFile = MainWindowFileController.DeleteModFile(currentModName, this.CurrentModFilesCenterViewComboBox.Text); if (didDeleteFile) { this.MainWindowFileController.LoadCustomTagWrappers(currentModName, this.CurrentModFilesCenterViewComboBox); this.CurrentModFilesCenterViewComboBox.SetComboBox(XmlFileManager.GetCustomModFilesInOutput(currentModName, currentModName + "_")); //Reset the search view mod UI components as the files have changed. this.SearchViewModSelectionPanel.Children.Remove(this.LoadedModFilesSearchViewComboBox); this.SearchViewModSelectionPanel.Children.Remove(this.LoadedModFilesButton); } }
private void LoadedModsComboBox_DropDownClosed(object sender, EventArgs e) { ComboBox senderAsBox = sender as ComboBox; string modToLoad = senderAsBox.Text; if (!String.IsNullOrEmpty(modToLoad)) { if (!this.SearchViewModSelectionPanel.Children.Contains(this.LoadedModFilesSearchViewComboBox) && !this.SearchViewModSelectionPanel.Children.Contains(this.LoadedModFilesButton)) { this.SearchViewModSelectionPanel.Children.Add(this.LoadedModFilesSearchViewComboBox); this.SearchViewModSelectionPanel.Children.Add(this.LoadedModFilesButton); } this.LoadedModFilesSearchViewComboBox.SetComboBox(XmlFileManager.GetCustomModFilesInOutput(modToLoad, modToLoad + "_")); this.MainWindowFileController.LoadCustomTagWrappers(Properties.Settings.Default.ModTagSetting, this.CurrentModFilesCenterViewComboBox); } else { this.SearchViewModSelectionPanel.Children.Remove(this.LoadedModFilesSearchViewComboBox); this.SearchViewModSelectionPanel.Children.Remove(this.LoadedModFilesButton); } }
private void LoadModDirectoryMenuItem_Click(object sender, RoutedEventArgs e) { MainWindowFileController.LoadDirectoryViewControl(this.LoadedModsSearchViewComboBox, this.LoadedModsCenterViewComboBox, this.CurrentModFilesCenterViewComboBox); this.LoadedModFilesSearchViewComboBox.SetComboBox(XmlFileManager.GetCustomModFilesInOutput(Properties.Settings.Default.ModTagSetting, Properties.Settings.Default.ModTagSetting + "_")); }