SIL.FieldWorks.XWorks.ExportDialog.DoFlexExports C# (CSharp) Method

DoFlexExports() protected method

Export process from Fieldworks Language explorer
protected DoFlexExports ( string expCss, string mainFullName, string revFullXhtml ) : bool
expCss string Style sheet exported
mainFullName string Source of main dictionary
revFullXhtml string source of reversal Index if available in Xhtml format
return bool
		protected bool DoFlexExports(string expCss, string mainFullName, string revFullXhtml)
		{
			if (File.Exists(mainFullName))
				File.Delete(mainFullName);

			if (File.Exists(revFullXhtml))
				File.Delete(revFullXhtml);

			string currInput = string.Empty;
			try
			{
				if (mainFullName != "")
					ExportFor("ConfiguredXHTML", mainFullName);
				if (revFullXhtml != "")
					ExportFor("ReversalIndexXHTML", revFullXhtml);
			}
			catch (FileNotFoundException)
			{
				IApp app = (IApp)m_mediator.PropertyTable.GetValue("App");
				MessageBox.Show("The " + currInput + " Section may be Empty (or) Not exported", app.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Error);
				return false;

			}
			catch (Exception)
			{
				return false;
			}

			return true;
		}