This creates a special version of ExportDialog so we can export without displaying dialogs
Inheritance: ExportDialog
Ejemplo n.º 1
0
		protected bool ContentsExists(string areaChoice, string toolChoice, string exportFormat)
		{
			if (!ChangeAreaTool(areaChoice, toolChoice))
				return false;
			Mediator mediator = exportDialog.Mediator;
			using (DeExportDialog ed = new DeExportDialog(mediator))
			{
				ed.Show();
				ed.Visible = false;
				return ed.SelectItem(exportFormat);
			}
		}
Ejemplo n.º 2
0
		protected void ExportTool(string areaChoice, string toolChoice, string exportFormat, string filePath)
		{
			if (File.Exists(filePath))
				File.Delete(filePath);
			if (!ChangeAreaTool(areaChoice, toolChoice))
				return;
			Mediator mediator = exportDialog.Mediator;
			mediator.PropertyTable.SetProperty("ExportDir", Path.GetDirectoryName(filePath));
			mediator.PropertyTable.SetPropertyPersistence("ExportDir", true);
			using (DeExportDialog ed = new DeExportDialog(mediator))
			{
				ed.Show();
				ed.Visible = false;
				if (ed.SelectItem(exportFormat))
					ed.DeDoExport(filePath);
			}
		}