/// <summary> /// Handles the xWorks message for Edit Parser Parameters /// </summary> /// <param name="argument">The xCore Command object.</param> /// <returns>false</returns> public bool OnEditParserParameters(object argument) { CheckDisposed(); FdoCache cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); if (cache == null) { throw new ArgumentException("no cache!"); } using (ParserParametersDlg dlg = new ParserParametersDlg(m_mediator.HelpTopicProvider)) { IMoMorphData md = cache.LangProject.MorphologicalDataOA; dlg.SetDlgInfo(ParserUIStrings.ksParserParameters, ParserUIStrings.ks_OK, md.ParserParameters); if (dlg.ShowDialog((XWindow)m_mediator.PropertyTable.GetValue("window")) == DialogResult.OK) { using (UndoableUnitOfWorkHelper helper = new UndoableUnitOfWorkHelper( cache.ActionHandlerAccessor, ParserUIStrings.ksUndoEditingParserParameters, ParserUIStrings.ksRedoEditingParserParameters)) { md.ParserParameters = dlg.XMLRep; helper.RollBack = false; } } } return(true); }
/// <summary> /// Handles the xWorks message for Edit Parser Parameters /// </summary> /// <param name="argument">The xCore Command object.</param> /// <returns>false</returns> public bool OnEditParserParameters(object argument) { CheckDisposed(); FdoCache cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); if (cache == null) { throw new ArgumentException("no cache!"); } using (ParserParametersDlg dlg = new ParserParametersDlg()) { IMoMorphData md = cache.LangProject.MorphologicalDataOA; dlg.SetDlgInfo(ParserUIStrings.ksParserParameters, ParserUIStrings.ks_OK, md.ParserParameters); if (dlg.ShowDialog((XWindow)m_mediator.PropertyTable.GetValue("window")) == DialogResult.OK) { md.ParserParameters = dlg.XMLRep; } } return(true); }
/// <summary> /// Handles the xWorks message for Edit Parser Parameters /// </summary> /// <param name="argument">The xCore Command object.</param> /// <returns>false</returns> public bool OnEditParserParameters(object argument) { CheckDisposed(); FdoCache cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); if (cache == null) throw new ArgumentException("no cache!"); using (ParserParametersDlg dlg = new ParserParametersDlg()) { IMoMorphData md = cache.LangProject.MorphologicalDataOA; dlg.SetDlgInfo(ParserUIStrings.ksParserParameters, ParserUIStrings.ks_OK, md.ParserParameters); if (dlg.ShowDialog((XWindow)m_mediator.PropertyTable.GetValue("window")) == DialogResult.OK) md.ParserParameters = dlg.XMLRep; } return true; }
/// <summary> /// Handles the xWorks message for Edit Parser Parameters /// </summary> /// <param name="argument">The xCore Command object.</param> /// <returns>false</returns> public bool OnEditParserParameters(object argument) { CheckDisposed(); FdoCache cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); if (cache == null) throw new ArgumentException("no cache!"); using (ParserParametersDlg dlg = new ParserParametersDlg(m_mediator.HelpTopicProvider)) { IMoMorphData md = cache.LangProject.MorphologicalDataOA; dlg.SetDlgInfo(ParserUIStrings.ksParserParameters, ParserUIStrings.ks_OK, md.ParserParameters); if (dlg.ShowDialog((XWindow)m_mediator.PropertyTable.GetValue("window")) == DialogResult.OK) { using (UndoableUnitOfWorkHelper helper = new UndoableUnitOfWorkHelper( cache.ActionHandlerAccessor, ParserUIStrings.ksUndoEditingParserParameters, ParserUIStrings.ksRedoEditingParserParameters)) { md.ParserParameters = dlg.XMLRep; helper.RollBack = false; } } } return true; }