public MainWindow() { InitializeComponent(); console = new ConsoleWindowHandler(consoleWindow); ConsoleOutput.consoleHandler = console; string pluginDirectory = AppContext.BaseDirectory; /*for(int i = 0; i < 4; i++) * { * pluginDirectory = Directory.GetParent(pluginDirectory).FullName; * } * pluginDirectory = Path.Combine(pluginDirectory, @"HMConConsole\bin\Debug\netcoreapp3.1");*/ HMConManager.Initialize(pluginDirectory); InputList.ItemsSource = job.InputFileList; RemoveFileButton.IsEnabled = false; PreviewFileButton.IsEnabled = false; foreach (var mod in CommandHandler.ModificationCommands) { supportedModifiers.Add(mod); var cbi = new ComboBoxItem() { Content = mod.command }; modificatorDropDown.Items.Add(cbi); } foreach (var ff in ExportUtility.supportedFormats) { var toggle = new CheckBox() { Content = ff.Identifier, Tag = ff, }; toggle.Checked += OnExportFormatChecked; toggle.Unchecked += OnExportFormatUnchecked; exportFormatToggleList.Children.Add(toggle); } UpdateModificationStack(); }
public void Start() { Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); string filePath = AppDomain.CurrentDomain.BaseDirectory; for (int i = 0; i < 4; i++) { filePath = Directory.GetParent(filePath).FullName; } inputPath = Path.Combine(filePath, "TestFiles", "in"); outputPath = Path.Combine(filePath, "TestFiles", "out"); string loc = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", "HMConApp", "bin", "Debug", "netcoreapp3.1")); HMConManager.Initialize(loc); if (PluginLoader.NumPluginsLoaded == 0) { throw new FileLoadException($"No plugins were loaded from location '{loc}'."); } }