private Guid CreateNewReversalIndex() { if (Cache == null) { return(Guid.Empty); } if (Cache.LanguageProject == null) { return(Guid.Empty); } if (Cache.LanguageProject.LexDbOA == null) { return(Guid.Empty); } using (CreateReversalIndexDlg dlg = new CreateReversalIndexDlg()) { dlg.Init(Cache); // Don't bother if all languages already have a reversal index! if (dlg.PossibilityCount > 0) { if (dlg.ShowDialog(Form.ActiveForm) == DialogResult.OK) { int hvo = dlg.NewReversalIndexHvo; return(Cache.ServiceLocator.GetObject(hvo).Guid); } } } return(Guid.Empty); }
private int CreateNewReversalIndex() { if (m_cache == null) { m_cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); } if (m_cache == null) { return(0); } if (m_cache.LangProject == null) { return(0); } if (m_cache.LangProject.LexDbOA == null) { return(0); } using (CreateReversalIndexDlg dlg = new CreateReversalIndexDlg()) { dlg.Init(m_cache); // Don't bother if all languages already have a reversal index! if (dlg.PossibilityCount > 0) { if (dlg.ShowDialog() == DialogResult.OK) { return(dlg.NewReversalIndexHvo); } } } return(0); }
private int CreateNewReversalIndex(bool allowCancel) { //if (m_cache == null) // m_cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); //if (m_cache == null) // return 0; //if (m_cache.LangProject == null) // return 0; //if (m_cache.LangProject.LexDbOA == null) // return 0; using (CreateReversalIndexDlg dlg = new CreateReversalIndexDlg()) { FdoCache cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); dlg.Init(cache, allowCancel); // Don't bother if all languages already have a reversal index! if (dlg.PossibilityCount > 0) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { return(dlg.NewReversalIndexHvo); } } } return(0); }
private Guid CreateNewReversalIndex(bool allowCancel) { using (var dlg = new CreateReversalIndexDlg()) { var cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); dlg.Init(cache, allowCancel); // Don't bother if all languages already have a reversal index! if (dlg.PossibilityCount > 0) { if (dlg.ShowDialog() == DialogResult.OK) { int hvo = dlg.NewReversalIndexHvo; return(cache.ServiceLocator.GetInstance <ICmObjectRepository>().GetObject(hvo).Guid); } } } return(Guid.Empty); }
private Guid CreateNewReversalIndex() { if (Cache == null) return Guid.Empty; if (Cache.LanguageProject == null) return Guid.Empty; if (Cache.LanguageProject.LexDbOA == null) return Guid.Empty; using (CreateReversalIndexDlg dlg = new CreateReversalIndexDlg()) { dlg.Init(Cache); // Don't bother if all languages already have a reversal index! if (dlg.PossibilityCount > 0) { if (dlg.ShowDialog(Form.ActiveForm) == DialogResult.OK) { int hvo = dlg.NewReversalIndexHvo; return Cache.ServiceLocator.GetObject(hvo).Guid; } } } return Guid.Empty; }
private Guid CreateNewReversalIndex(bool allowCancel) { using (var dlg = new CreateReversalIndexDlg()) { var cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); dlg.Init(cache, allowCancel); // Don't bother if all languages already have a reversal index! if (dlg.PossibilityCount > 0) { if (dlg.ShowDialog() == DialogResult.OK) { int hvo = dlg.NewReversalIndexHvo; return cache.ServiceLocator.GetInstance<ICmObjectRepository>().GetObject(hvo).Guid; } } } return Guid.Empty; }
private int CreateNewReversalIndex() { if (m_cache == null) m_cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); if (m_cache == null) return 0; if (m_cache.LangProject == null) return 0; if (m_cache.LangProject.LexDbOA == null) return 0; using (CreateReversalIndexDlg dlg = new CreateReversalIndexDlg()) { dlg.Init(m_cache); // Don't bother if all languages already have a reversal index! if (dlg.PossibilityCount > 0) { if (dlg.ShowDialog() == DialogResult.OK) return dlg.NewReversalIndexHvo; } } return 0; }
private int CreateNewReversalIndex(bool allowCancel) { //if (m_cache == null) // m_cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); //if (m_cache == null) // return 0; //if (m_cache.LangProject == null) // return 0; //if (m_cache.LangProject.LexDbOA == null) // return 0; using (CreateReversalIndexDlg dlg = new CreateReversalIndexDlg()) { FdoCache cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); dlg.Init(cache, allowCancel); // Don't bother if all languages already have a reversal index! if (dlg.PossibilityCount > 0) { if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) return dlg.NewReversalIndexHvo; } } return 0; }