SelectItem() public method

Select the item containing exportFormat in the path name of the xml file name.
public SelectItem ( string exportFormat ) : bool
exportFormat string The file name of the export xml file
return bool
示例#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);
			}
		}
示例#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);
			}
		}