static void Main(string[] args) { if (args.Length > 0) { Console.WriteLine("First argument is input folder path, second is output mapname.w3x"); MapPublisher.PackMap(args[0], args[1], null); return; } else { // Add the event handler for handling UI thread exceptions to the event. Application.ThreadException += new ThreadExceptionEventHandler(Program.UIThreadExceptionHandler); // Set the unhandled exception mode to force all Windows Forms errors to go through // our handler. Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); // Add the event handler for handling non-UI thread exceptions to the event. AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new MapPublisherForm()); return; } }
private void buttonUnpackMap_Click(object sender, EventArgs e) { string inputMapPath = textBoxUnpackMapSourcePath.Text; string outputFolderPath = textBoxUnpackMapTargetPath.Text; MapPublisher.UnpackMap(inputMapPath, outputFolderPath); }
private void buttonPackMap_Click(object sender, EventArgs e) { string inputFolderPath = textBoxPackMapSourcePath.Text; string outputMapPath = textBoxPackMapTargetPath.Text; var postProcessors = new List <PostProcessing.IPostProcessor>(); if (checkBoxRecordFunctionTimings.Checked) { postProcessors.Add(new PostProcessing.FunctionTimings()); } MapPublisher.PackMap(inputFolderPath, outputMapPath, postProcessors); }