/// ------------------------------------------------------------------------------------ /// <summary> /// Make the root box. /// </summary> /// ------------------------------------------------------------------------------------ public override void MakeRoot() { CheckDisposed(); if (m_fdoCache == null || DesignMode) { return; } m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); m_vc = new InterlinVc(m_fdoCache); // Theory has it that the slices that have 'true' in this attribute will allow the sandbox to be used. // We'll see how the theory goes, when I get to the point of wanting to see the sandbox. var isEditable = IsEditable; m_vc.ShowMorphBundles = true; m_vc.ShowDefaultSense = true; // JohnT: kwsVernInParagraph is rather weird here, where we don't have a paragraph, but it allows the // VC to deduce the WS of the wordform, not from the paragraph, but from the best vern WS of the wordform itself. if (isEditable) { m_vc.LineChoices = new EditableInterlinLineChoices(m_fdoCache.LanguageProject, WritingSystemServices.kwsVernInParagraph, m_fdoCache.DefaultAnalWs); } else { m_vc.LineChoices = new InterlinLineChoices(m_fdoCache.LanguageProject, WritingSystemServices.kwsVernInParagraph, m_fdoCache.DefaultAnalWs); } m_vc.LineChoices.Add(InterlinLineChoices.kflidMorphemes); // 1 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexEntries); //2 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexGloss); //3 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexPos); //4 m_rootb.DataAccess = m_fdoCache.MainCacheAccessor; FixWs(); // AFTER setting DA! const int selectorId = InterlinVc.kfragSingleInterlinearAnalysisWithLabelsLeftAlign; if (m_wfiAnalysis != null) { m_rootb.SetRootObject(m_wfiAnalysis.Hvo, m_vc, selectorId, m_styleSheet); } base.MakeRoot(); if (!IsEditable) { return; } m_oneAnalSandbox = new OneAnalysisSandbox(m_fdoCache, Mediator, StyleSheet, m_vc.LineChoices, m_wfiAnalysis.Hvo) { Visible = false }; Controls.Add(m_oneAnalSandbox); if (m_oneAnalSandbox.RootBox == null) { m_oneAnalSandbox.MakeRoot(); // adding sandbox to Controls doesn't make rootbox. } InitSandbox(); m_oneAnalSandbox.SizeChanged += (HandleSandboxSizeChanged); if (m_fSliceIsCurrent) { TurnOnSandbox(); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Make the root box. /// </summary> /// ------------------------------------------------------------------------------------ public override void MakeRoot() { CheckDisposed(); if (m_fdoCache == null || DesignMode || m_wfiAnalysis == null) return; m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); m_vc = new InterlinVc(m_fdoCache); // Theory has it that the slices that have 'true' in this attribute will allow the sandbox to be used. // We'll see how the theory goes, when I get to the point of wanting to see the sandbox. var isEditable = IsEditable; m_vc.ShowMorphBundles = true; m_vc.ShowDefaultSense = true; if ((m_wfiAnalysis.GetAgentOpinion(m_fdoCache.LanguageProject.DefaultParserAgent) == Opinions.approves) && (m_wfiAnalysis.GetAgentOpinion(m_fdoCache.LanguageProject.DefaultUserAgent) != Opinions.approves)) { m_vc.UsingGuess = true; } // JohnT: kwsVernInParagraph is rather weird here, where we don't have a paragraph, but it allows the // VC to deduce the WS of the wordform, not from the paragraph, but from the best vern WS of the wordform itself. if (isEditable) m_vc.LineChoices = new EditableInterlinLineChoices(m_fdoCache.LanguageProject, WritingSystemServices.kwsVernInParagraph, m_fdoCache.DefaultAnalWs); else m_vc.LineChoices = new InterlinLineChoices(m_fdoCache.LanguageProject, WritingSystemServices.kwsVernInParagraph, m_fdoCache.DefaultAnalWs); m_vc.LineChoices.Add(InterlinLineChoices.kflidMorphemes); // 1 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexEntries); //2 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexGloss); //3 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexPos); //4 m_rootb.DataAccess = m_fdoCache.MainCacheAccessor; FixWs(); // AFTER setting DA! const int selectorId = InterlinVc.kfragSingleInterlinearAnalysisWithLabelsLeftAlign; m_rootb.SetRootObject(m_wfiAnalysis.Hvo, m_vc, selectorId, m_styleSheet); base.MakeRoot(); if (!IsEditable) return; m_oneAnalSandbox = new OneAnalysisSandbox(m_fdoCache, Mediator, StyleSheet, m_vc.LineChoices, m_wfiAnalysis.Hvo) { Visible = false }; Controls.Add(m_oneAnalSandbox); if (m_oneAnalSandbox.RootBox == null) m_oneAnalSandbox.MakeRoot(); // adding sandbox to Controls doesn't make rootbox. InitSandbox(); m_oneAnalSandbox.SizeChanged += (HandleSandboxSizeChanged); if (m_fSliceIsCurrent) TurnOnSandbox(); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Make the root box. /// </summary> /// ------------------------------------------------------------------------------------ public override void MakeRoot() { CheckDisposed(); if (m_fdoCache == null || DesignMode) { return; } m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); m_vc = new InterlinVc(m_fdoCache); // Theory has it that the slices that have 'true' in this attribute will allow the sandbox to be used. // We'll see how the theory goes, when I get to the point of wanting to see the sandbox. bool isEditable = IsEditable; m_vc.ShowMorphBundles = true; m_vc.ShowDefaultSense = true; // JohnT: kwsVernInParagraph is rather weird here, where we don't have a paragraph, but it allows the // VC to deduce the WS of the wordform, not from the paragraph, but from the best vern WS of the wordform itself. if (isEditable) { m_vc.LineChoices = new EditableInterlinLineChoices(LangProject.kwsVernInParagraph, m_fdoCache.DefaultAnalWs); } else { m_vc.LineChoices = new InterlinLineChoices(LangProject.kwsVernInParagraph, m_fdoCache.DefaultAnalWs); } m_vc.LineChoices.Add(InterlinLineChoices.kflidMorphemes); // 1 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexEntries); //2 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexGloss); //3 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexPos); //4 m_rootb.DataAccess = m_fdoCache.MainCacheAccessor; FixWs(); // AFTER setting DA! int selectorId = 100034; //Convert.ToInt32(XmlUtils.GetManditoryAttributeValue(m_configurationNode.SelectSingleNode("deParams"), "selector")); if (m_hvoWfiAnalysis != 0) { m_rootb.SetRootObject(m_hvoWfiAnalysis, m_vc, selectorId, m_styleSheet); } base.MakeRoot(); if (IsEditable) { m_oneAnalSandbox = new OneAnalysisSandbox(m_fdoCache, Mediator, StyleSheet, m_vc.LineChoices, m_hvoWfiAnalysis); m_oneAnalSandbox.Visible = false; Controls.Add(m_oneAnalSandbox); if (m_oneAnalSandbox.RootBox == null) { m_oneAnalSandbox.MakeRoot(); // adding sandbox to Controls doesn't make rootbox. } m_tag = MeVirtualHandler.InstallMe(Cache.VwCacheDaAccessor).Tag; InitSandbox(); m_oneAnalSandbox.SizeChanged += (HandleSandboxSizeChanged); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Make the root box. /// </summary> /// ------------------------------------------------------------------------------------ public override void MakeRoot() { CheckDisposed(); if (m_fdoCache == null || DesignMode) return; m_rootb = VwRootBoxClass.Create(); m_rootb.SetSite(this); m_vc = new InterlinVc(m_fdoCache); // Theory has it that the slices that have 'true' in this attribute will allow the sandbox to be used. // We'll see how the theory goes, when I get to the point of wanting to see the sandbox. bool isEditable = IsEditable; m_vc.ShowMorphBundles = true; m_vc.ShowDefaultSense = true; // JohnT: kwsVernInParagraph is rather weird here, where we don't have a paragraph, but it allows the // VC to deduce the WS of the wordform, not from the paragraph, but from the best vern WS of the wordform itself. if (isEditable) m_vc.LineChoices = new EditableInterlinLineChoices(LangProject.kwsVernInParagraph, m_fdoCache.DefaultAnalWs); else m_vc.LineChoices = new InterlinLineChoices(LangProject.kwsVernInParagraph, m_fdoCache.DefaultAnalWs); m_vc.LineChoices.Add(InterlinLineChoices.kflidMorphemes); // 1 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexEntries); //2 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexGloss); //3 m_vc.LineChoices.Add(InterlinLineChoices.kflidLexPos); //4 m_rootb.DataAccess = m_fdoCache.MainCacheAccessor; FixWs(); // AFTER setting DA! int selectorId = 100034; //Convert.ToInt32(XmlUtils.GetManditoryAttributeValue(m_configurationNode.SelectSingleNode("deParams"), "selector")); if (m_hvoWfiAnalysis != 0) m_rootb.SetRootObject(m_hvoWfiAnalysis, m_vc, selectorId, m_styleSheet); base.MakeRoot(); if (IsEditable) { m_oneAnalSandbox = new OneAnalysisSandbox(m_fdoCache, Mediator, StyleSheet, m_vc.LineChoices, m_hvoWfiAnalysis); m_oneAnalSandbox.Visible = false; Controls.Add(m_oneAnalSandbox); if (m_oneAnalSandbox.RootBox == null) m_oneAnalSandbox.MakeRoot(); // adding sandbox to Controls doesn't make rootbox. m_tag = MeVirtualHandler.InstallMe(Cache.VwCacheDaAccessor).Tag; InitSandbox(); m_oneAnalSandbox.SizeChanged += (HandleSandboxSizeChanged); } }