Exemplo n.º 1
0
		public void Initialize(FdoCache cache, IHelpTopicProvider helpTopicProvider,
			IApp app, IVwStylesheet stylesheet, NotebookImportWiz.CharMapping charMapping)
		{
			m_cache = cache;
			m_helpTopicProvider = helpTopicProvider;
			m_app = app;
			m_stylesheet = stylesheet;
			if (charMapping == null)
			{
				m_tbBeginMkr.Text = String.Empty;
				m_tbEndMkr.Text = String.Empty;
				m_rbEndOfWord.Checked = false;
				m_rbEndOfField.Checked = true;
				FillWritingSystemCombo(null);
				FillStylesCombo(null);
				m_chkIgnore.Checked = false;
			}
			else
			{
				m_tbBeginMkr.Text = charMapping.BeginMarker;
				m_tbEndMkr.Text = charMapping.EndMarker;
				m_rbEndOfWord.Checked = charMapping.EndWithWord;
				m_rbEndOfField.Checked = !charMapping.EndWithWord;
				FillWritingSystemCombo(charMapping.DestinationWritingSystemId);
				FillStylesCombo(charMapping.DestinationStyle);
				m_chkIgnore.Checked = charMapping.IgnoreMarkerOnImport;
			}
		}
Exemplo n.º 2
0
 internal void Initialize(LcmCache cache, IHelpTopicProvider helpTopicProvider, IApp app,
                          NotebookImportWiz.RnSfMarker rsfm)
 {
     m_cache = cache;
     m_btnAddWritingSystem.Initialize(cache, helpTopicProvider, app);
     NotebookImportWiz.InitializeWritingSystemCombo(rsfm.m_sto.m_wsId, cache,
                                                    m_cbWritingSystem);
 }
Exemplo n.º 3
0
		internal void Initialize(FdoCache cache, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet,
			NotebookImportWiz.RnSfMarker rsfm)
		{
			m_cache = cache;
			m_helpTopicProvider = helpTopicProvider;
			m_btnAddWritingSystem.Initialize(cache, helpTopicProvider, app, stylesheet);
			NotebookImportWiz.InitializeWritingSystemCombo(rsfm.m_sto.m_wsId, cache,
				m_cbWritingSystem);
		}
Exemplo n.º 4
0
 internal void Initialize(FdoCache cache, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet,
                          NotebookImportWiz.RnSfMarker rsfm)
 {
     m_cache             = cache;
     m_helpTopicProvider = helpTopicProvider;
     m_btnAddWritingSystem.Initialize(cache, helpTopicProvider, app, stylesheet);
     NotebookImportWiz.InitializeWritingSystemCombo(rsfm.m_sto.m_wsId, cache,
                                                    m_cbWritingSystem);
 }
Exemplo n.º 5
0
        private void m_btnAddWritingSystem_WritingSystemAdded(object sender, EventArgs e)
        {
            IWritingSystem ws = m_btnAddWritingSystem.NewWritingSystem;

            if (ws != null)
            {
                NotebookImportWiz.InitializeWritingSystemCombo(ws.Id, m_cache,
                                                               m_cbWritingSystem);
            }
        }
Exemplo n.º 6
0
        internal void Initialize(LcmCache cache, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet,
                                 NotebookImportWiz.RnSfMarker rsfm)
        {
            m_cache                     = cache;
            m_stylesheet                = stylesheet;
            m_chkForEachLine.Checked    = rsfm.m_txo.m_fStartParaNewLine;
            m_chkAfterBlankLine.Checked = rsfm.m_txo.m_fStartParaBlankLine;
            m_chkWhenIndented.Checked   = rsfm.m_txo.m_fStartParaIndented;
            m_chkAfterShortLine.Checked = rsfm.m_txo.m_fStartParaShortLine;
            m_tbShortLength.Text        = rsfm.m_txo.m_cchShortLim.ToString();
            m_tbShortLength.Enabled     = rsfm.m_txo.m_fStartParaShortLine;

            m_btnAddWritingSystem.Initialize(m_cache, helpTopicProvider, app);
            NotebookImportWiz.InitializeWritingSystemCombo(rsfm.m_txo.m_wsId, m_cache,
                                                           m_cbWritingSystem);
            InitializeStylesCombo(rsfm.m_txo.m_sStyle);
        }
Exemplo n.º 7
0
        internal void Initialize(FdoCache cache, XCore.IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet,
                                 NotebookImportWiz.RnSfMarker rsfm, CellarPropertyType cpt)
        {
            m_cache             = cache;
            m_helpTopicProvider = helpTopicProvider;
            m_btnAddWritingSystem.Initialize(m_cache, helpTopicProvider, app, stylesheet);
            NotebookImportWiz.InitializeWritingSystemCombo(rsfm.m_tlo.m_wsId, cache,
                                                           m_cbWritingSystem);

            bool fNotAtomic = (cpt != CellarPropertyType.ReferenceAtomic);

            m_tbDefaultValue.Text = rsfm.m_tlo.m_sEmptyDefault;

            m_chkDelimMultiEnable.Checked = rsfm.m_tlo.m_fHaveMulti && fNotAtomic;
            m_chkDelimMultiEnable.Enabled = fNotAtomic;
            m_tbDelimMulti.Text           = rsfm.m_tlo.m_sDelimMulti;
            m_tbDelimMulti.Enabled        = rsfm.m_tlo.m_fHaveMulti && fNotAtomic;

            m_chkDelimSubEnable.Checked = rsfm.m_tlo.m_fHaveSub;
            m_tbDelimSub.Text           = rsfm.m_tlo.m_sDelimSub;
            m_tbDelimSub.Enabled        = rsfm.m_tlo.m_fHaveSub;

            m_chkBetweenEnable.Checked = rsfm.m_tlo.m_fHaveBetween;
            m_tbBetweenBefore.Text     = rsfm.m_tlo.m_sMarkStart;
            m_tbBetweenAfter.Text      = rsfm.m_tlo.m_sMarkEnd;
            m_tbBetweenBefore.Enabled  = rsfm.m_tlo.m_fHaveBetween;
            m_tbBetweenAfter.Enabled   = rsfm.m_tlo.m_fHaveBetween;

            m_chkOnlyBeforeEnable.Checked = rsfm.m_tlo.m_fHaveBefore;
            m_tbOnlyBefore.Text           = rsfm.m_tlo.m_sBefore;
            m_tbOnlyBefore.Enabled        = rsfm.m_tlo.m_fHaveBefore;

            m_chkDiscardNewStuff.Checked = rsfm.m_tlo.m_fIgnoreNewStuff;

            m_rbMatchName.Checked = rsfm.m_tlo.m_pnt == PossNameType.kpntName;
            m_rbMatchAbbr.Checked = rsfm.m_tlo.m_pnt != PossNameType.kpntName;

            Debug.Assert(rsfm.m_tlo.m_rgsMatch.Count == rsfm.m_tlo.m_rgsReplace.Count);
            m_lvSubstitutions.Items.Clear();
            for (int i = 0; i < rsfm.m_tlo.m_rgsMatch.Count; ++i)
            {
                var lvi = new ListViewItem(new[] { rsfm.m_tlo.m_rgsMatch[i], rsfm.m_tlo.m_rgsReplace[i] });
                m_lvSubstitutions.Items.Add(lvi);
            }
        }
Exemplo n.º 8
0
		internal void Initialize(FdoCache cache, IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet,
			NotebookImportWiz.RnSfMarker rsfm)
		{
			m_cache = cache;
			m_helpTopicProvider = helpTopicProvider;
			m_stylesheet = stylesheet;
			m_chkForEachLine.Checked = rsfm.m_txo.m_fStartParaNewLine;
			m_chkAfterBlankLine.Checked = rsfm.m_txo.m_fStartParaBlankLine;
			m_chkWhenIndented.Checked = rsfm.m_txo.m_fStartParaIndented;
			m_chkAfterShortLine.Checked = rsfm.m_txo.m_fStartParaShortLine;
			m_tbShortLength.Text = rsfm.m_txo.m_cchShortLim.ToString();
			m_tbShortLength.Enabled = rsfm.m_txo.m_fStartParaShortLine;

			m_btnAddWritingSystem.Initialize(m_cache, helpTopicProvider, app, stylesheet);
			NotebookImportWiz.InitializeWritingSystemCombo(rsfm.m_txo.m_wsId, m_cache,
				m_cbWritingSystem);
			InitializeStylesCombo(rsfm.m_txo.m_sStyle);
		}
Exemplo n.º 9
0
		internal void Initialize(FdoCache cache, XCore.IHelpTopicProvider helpTopicProvider, IApp app, IVwStylesheet stylesheet,
			NotebookImportWiz.RnSfMarker rsfm, CellarPropertyType cpt)
		{
			m_cache = cache;
			m_helpTopicProvider = helpTopicProvider;
			m_btnAddWritingSystem.Initialize(m_cache, helpTopicProvider, app, stylesheet);
			NotebookImportWiz.InitializeWritingSystemCombo(rsfm.m_tlo.m_wsId, cache,
				m_cbWritingSystem);

			bool fNotAtomic = (cpt != CellarPropertyType.ReferenceAtomic);
			m_tbDefaultValue.Text = rsfm.m_tlo.m_sEmptyDefault;

			m_chkDelimMultiEnable.Checked = rsfm.m_tlo.m_fHaveMulti && fNotAtomic;
			m_chkDelimMultiEnable.Enabled = fNotAtomic;
			m_tbDelimMulti.Text = rsfm.m_tlo.m_sDelimMulti;
			m_tbDelimMulti.Enabled = rsfm.m_tlo.m_fHaveMulti && fNotAtomic;

			m_chkDelimSubEnable.Checked = rsfm.m_tlo.m_fHaveSub;
			m_tbDelimSub.Text = rsfm.m_tlo.m_sDelimSub;
			m_tbDelimSub.Enabled = rsfm.m_tlo.m_fHaveSub;

			m_chkBetweenEnable.Checked = rsfm.m_tlo.m_fHaveBetween;
			m_tbBetweenBefore.Text = rsfm.m_tlo.m_sMarkStart;
			m_tbBetweenAfter.Text = rsfm.m_tlo.m_sMarkEnd;
			m_tbBetweenBefore.Enabled = rsfm.m_tlo.m_fHaveBetween;
			m_tbBetweenAfter.Enabled = rsfm.m_tlo.m_fHaveBetween;

			m_chkOnlyBeforeEnable.Checked = rsfm.m_tlo.m_fHaveBefore;
			m_tbOnlyBefore.Text = rsfm.m_tlo.m_sBefore;
			m_tbOnlyBefore.Enabled = rsfm.m_tlo.m_fHaveBefore;

			m_chkDiscardNewStuff.Checked = rsfm.m_tlo.m_fIgnoreNewStuff;

			m_rbMatchName.Checked = rsfm.m_tlo.m_pnt == PossNameType.kpntName;
			m_rbMatchAbbr.Checked = rsfm.m_tlo.m_pnt != PossNameType.kpntName;

			Debug.Assert(rsfm.m_tlo.m_rgsMatch.Count == rsfm.m_tlo.m_rgsReplace.Count);
			m_lvSubstitutions.Items.Clear();
			for (int i = 0; i < rsfm.m_tlo.m_rgsMatch.Count; ++i)
			{
				var lvi = new ListViewItem(new[] { rsfm.m_tlo.m_rgsMatch[i], rsfm.m_tlo.m_rgsReplace[i] });
				m_lvSubstitutions.Items.Add(lvi);
			}
		}
Exemplo n.º 10
0
		private void FillInContentsPane(NotebookImportWiz.RnSfMarker rsf, Sfm2Xml.SfmFile sfmFile)
		{
			m_groupContents.Text = String.Format(m_sContentsGroupFmt, rsf.m_sMkr);
			m_lvContents.Items.Clear();
			Set<string> setContents = new Set<string>();
			foreach (Sfm2Xml.SfmField field in m_sfmFile.Lines)
			{
				if (field.Marker == rsf.m_sMkr)
				{
					if (!setContents.Contains(field.Data))
					{
						setContents.Add(field.Data);
						ListViewItem lvi = new ListViewItem(String.Format("\\{0} {1}", field.Marker,
							String.IsNullOrEmpty(field.Data) ? String.Empty : field.Data));
						m_lvContents.Items.Add(lvi);
					}
				}
			}
			m_lblContents.Text = String.Format(m_sContentsLabelFmt, rsf.m_sMkr,
				sfmFile.GetSFMCount(rsf.m_sMkr), m_lvContents.Items.Count);
		}
Exemplo n.º 11
0
		public void Initialize(FdoCache cache, IHelpTopicProvider helpTopicProvider, IApp app,
			NotebookImportWiz.RnSfMarker rsf, Sfm2Xml.SfmFile sfmFile,
			Dictionary<int, string> mapFlidName, IVwStylesheet stylesheet,
			Mediator mediator)
		{
			m_cache = cache;
			m_helpTopicProvider = helpTopicProvider;
			m_app = app;
			m_rsfm = rsf;
			m_sfmFile = sfmFile;
			m_stylesheet = stylesheet;
			m_mdc = cache.ServiceLocator.GetInstance<IFwMetaDataCacheManaged>();
			m_mediator = mediator;
			m_mapFlidName = mapFlidName;

			FillInFieldList();
			FillInContentsPane(rsf, sfmFile);
			SetSubControl();
		}