public bool OnExport(object argument)
        {
            CheckDisposed();

            using (var dlg = new ExportDialog(m_mediator))
            {
                dlg.ShowDialog();
            }
            return(true);               // handled
        }
        public bool OnExport(object argument)
        {
            CheckDisposed();

                using (var dlg = new ExportDialog(m_mediator))
                {
                    dlg.ShowDialog();
                }
            return true;	// handled
        }
Example #3
0
		public bool OnExport(object argument)
		{
			CheckDisposed();

			string areaChoice = m_mediator.PropertyTable.GetStringProperty("areaChoice", null);
			if (areaChoice == "notebook")
			{
				if (AreCustomFieldsAProblem(new int[] { RnGenericRecTags.kClassId}))
					return true;
				using (var dlg = new NotebookExportDialog(m_mediator))
				{
					dlg.ShowDialog();
				}
			}
			else
			{
				// It's somewhat unfortunate that this bit of code knows what classes can have custom fields.
				// However, we put in code to prevent punctuation in custom field names at the same time as this check (which is therefore
				// for the benefit of older projects), so it should not be necessary to check any additional classes we allow to have them.
				if (AreCustomFieldsAProblem(new int[] { LexEntryTags.kClassId, LexSenseTags.kClassId, LexExampleSentenceTags.kClassId, MoFormTags.kClassId }))
					return true;
				using (var dlg = new ExportDialog(m_mediator))
				{
					dlg.ShowDialog();
				}
				this.ActivateUI(true);
			}
			return true;	// handled
		}