Пример #1
0
        private void Cancel2DExport()
        {
            CloseLoadingWindow();

            if (imageExportRunner != null)
            {
                imageExportRunner.Kill();
                imageExportRunner = null;
            }
        }
Пример #2
0
        private void UI_ExportImageButton_Click(object sender, EventArgs e)
        {
            if (selectedMapName == null)
            {
                UI_ExportImageButton.Enabled = false;
                return;
            }

            UI_SaveDialog.Filter = "Portal Network Graphics (*.png)|*.png";
            UI_SaveDialog.FileName = selectedMapName + ".png";

            if (UI_SaveDialog.ShowDialog() == DialogResult.OK)
            {
                imageExportRunner = new RunnerExport2DMap(UI_SaveDialog.FileName, canvas);
                imageExportRunner.Begin();

                loadingWindow = new LoadingWindow(string.Format("Exporting {0} as a 2D image...", selectedMapName), "This probably won't take too long!", true, imageExportCancelCallback);
                loadingWindow.ShowDialog();
            }
        }