From 7e9b605106d63ce585f193db116beef8b455515b Mon Sep 17 00:00:00 2001 From: mark-sil <83427558+mark-sil@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:47:16 -0500 Subject: [PATCH] Obsolete Mediator methods Instead of using the Mediator messaging methods, new code should use the FwUtils Publisher and Subscriber classes. Additional methods will be labeled as Obsolete in a separate pull request. --- .../Controls/DetailControls/ChooserCommand.cs | 2 ++ .../Controls/DetailControls/DataTree.cs | 4 +++ .../MSAReferenceComboBoxSlice.cs | 2 ++ .../DetailControls/SemanticDomainsChooser.cs | 4 ++- Src/Common/Controls/DetailControls/Slice.cs | 2 ++ .../Controls/DetailControls/SummarySlice.cs | 2 ++ .../XMLViews/ReallySimpleListChooser.cs | 4 +++ .../Controls/XMLViews/XmlBrowseRDEView.cs | 2 ++ .../Controls/XMLViews/XmlBrowseViewBase.cs | 2 ++ Src/Common/Controls/XMLViews/XmlSeqView.cs | 2 ++ Src/Common/SimpleRootSite/SimpleRootSite.cs | 2 ++ Src/FdoUi/FdoUiCore.cs | 2 ++ Src/LexText/Discourse/ConstituentChart.cs | 2 ++ Src/LexText/Interlinear/SandboxBase.cs | 2 ++ .../LexTextControls/EntryDlgListener.cs | 4 +++ .../InflectionFeaturePopupTreeManager.cs | 2 ++ .../LexTextControls/MSAPopupTreeManager.cs | 2 ++ .../LexTextControls/POSPopupTreeManager.cs | 2 ++ .../PhonologicalFeatureChooserDlg.cs | 4 +++ .../LexTextControls/RecordDlgListener.cs | 6 +++- Src/LexText/Lexicon/FLExBridgeListener.cs | 4 +++ .../MsaInflectionFeatureListDlgLauncher.cs | 4 +++ Src/LexText/Lexicon/ReversalEntryPOS.cs | 4 +++ .../Lexicon/ReversalIndexEntryMenuHandler.cs | 2 ++ .../Lexicon/ReversalIndexEntrySlice.cs | 2 ++ Src/LexText/Lexicon/ReversalListener.cs | 2 ++ .../Morphology/AffixRuleFormulaSlice.cs | 6 +++- .../Morphology/InflAffixTemplateControl.cs | 2 ++ .../Morphology/MasterCatDlgListener.cs | 2 ++ .../Morphology/MasterInflFeatDlgListener.cs | 2 ++ .../Morphology/MasterPhonFeatDlgListener.cs | 4 +++ Src/LexText/Morphology/MorphologyListener.cs | 12 +++++++ .../Morphology/PhEnvStrRepresentationSlice.cs | 6 +++- Src/LexText/Morphology/RuleFormulaSlice.cs | 6 +++- .../ParserUI/ParserReportDialog.xaml.cs | 5 ++- Src/LexText/ParserUI/WebPageInteractor.cs | 2 ++ Src/XCore/xCoreInterfaces/Mediator.cs | 35 ++++++------------- Src/XCore/xCoreInterfaces/PropertyTable.cs | 2 ++ Src/XCore/xWindow.cs | 2 ++ Src/xWorks/AddCustomFieldDlg.cs | 4 +++ ...ictionaryConfigurationManagerController.cs | 2 ++ Src/xWorks/FwXWindow.cs | 4 +++ Src/xWorks/LinkListener.cs | 6 +++- Src/xWorks/RecordClerk.cs | 10 ++++++ Src/xWorks/XhtmlDocView.cs | 2 ++ 45 files changed, 155 insertions(+), 31 deletions(-) diff --git a/Src/Common/Controls/DetailControls/ChooserCommand.cs b/Src/Common/Controls/DetailControls/ChooserCommand.cs index 738a4c0e0e..388b37b707 100644 --- a/Src/Common/Controls/DetailControls/ChooserCommand.cs +++ b/Src/Common/Controls/DetailControls/ChooserCommand.cs @@ -127,7 +127,9 @@ public override ObjectLabel Execute() pos.AffixSlotsOC.Add(slot); slot.Optional = m_fOptional; }); +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessage("SelectNewSlot", slot); +#pragma warning restore 618 // Enhance JohnT: usually the newly created slot will also get inserted into a template. // Ideally we would make both part of the same UOW. However the code is in two distinct DLLs (see MorphologyEditor.dll). return ObjectLabel.CreateObjectLabel(m_cache, slot, ""); diff --git a/Src/Common/Controls/DetailControls/DataTree.cs b/Src/Common/Controls/DetailControls/DataTree.cs index 73d949be3c..67c3742164 100644 --- a/Src/Common/Controls/DetailControls/DataTree.cs +++ b/Src/Common/Controls/DetailControls/DataTree.cs @@ -3853,7 +3853,9 @@ public virtual bool OnJumpToTool(object commandObject) Guid guid = GetGuidForJumpToTool((Command) commandObject, false, out tool); if (guid != Guid.Empty) { +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs(tool, guid)); +#pragma warning restore 618 ((Command)commandObject).TargetId = Guid.Empty; // clear the target for future use. return true; } @@ -3893,7 +3895,9 @@ private void OnJumpToToolAndFilterAnthroItem(string linkSetupInfo, string toolTo additionalProps.Add(new Property("SuspendLoadListUntilOnChangeFilter", link.ToolName)); additionalProps.Add(new Property("LinkSetupInfo", linkSetupInfo)); additionalProps.Add(new Property("HvoOfAnthroItem", hvo.ToString(CultureInfo.InvariantCulture))); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", link); +#pragma warning restore 618 } /// diff --git a/Src/Common/Controls/DetailControls/MSAReferenceComboBoxSlice.cs b/Src/Common/Controls/DetailControls/MSAReferenceComboBoxSlice.cs index 4c64cfc413..0f82972506 100644 --- a/Src/Common/Controls/DetailControls/MSAReferenceComboBoxSlice.cs +++ b/Src/Common/Controls/DetailControls/MSAReferenceComboBoxSlice.cs @@ -288,7 +288,9 @@ private void m_MSAPopupTreeManager_AfterSelect(object sender, TreeViewEventArgs // a pending Windows message. See LT-9713 and LT-9714. if (ContainingDataTree.DoNotRefresh != fOldDoNotRefresh) { +#pragma warning disable 618 // suppress obsolete warning Mediator.BroadcastMessage("DelayedRefreshList", fOldDoNotRefresh); +#pragma warning restore 618 } } } diff --git a/Src/Common/Controls/DetailControls/SemanticDomainsChooser.cs b/Src/Common/Controls/DetailControls/SemanticDomainsChooser.cs index 51c3d73a52..6ab04b6eab 100644 --- a/Src/Common/Controls/DetailControls/SemanticDomainsChooser.cs +++ b/Src/Common/Controls/DetailControls/SemanticDomainsChooser.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2015 SIL International +// Copyright (c) 2015 SIL International // This software is licensed under the LGPL, version 2.1 or later // (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -216,7 +216,9 @@ private void OnDisplayUsageCheckedChanged(object sender, EventArgs e) private void OnEditDomainsLinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var toolName = XmlUtils.GetAttributeValue(LinkNode, "tool"); +#pragma warning disable 618 // suppress obsolete warning Mediator.PostMessage("FollowLink", new FwUtils.FwLinkArgs(toolName, new Guid())); +#pragma warning restore 618 btnCancel.PerformClick(); } diff --git a/Src/Common/Controls/DetailControls/Slice.cs b/Src/Common/Controls/DetailControls/Slice.cs index 9e2c9c7d56..ba417c5615 100644 --- a/Src/Common/Controls/DetailControls/Slice.cs +++ b/Src/Common/Controls/DetailControls/Slice.cs @@ -2221,7 +2221,9 @@ int InsertObject(int flid, int newObjectClassId, out ICmObject newObject) else { // If possible, jump to the newly inserted sub item. +#pragma warning disable 618 // suppress obsolete warning if (m_mediator.BroadcastMessageUntilHandled("JumpToRecord", uiObj.Object.Hvo)) +#pragma warning restore 618 return insertionPosition; // If we haven't found a slice...common now, because there's rarely a need to expand anything... // and some slice was added, focus it. diff --git a/Src/Common/Controls/DetailControls/SummarySlice.cs b/Src/Common/Controls/DetailControls/SummarySlice.cs index 730c853c31..088f5fe1eb 100644 --- a/Src/Common/Controls/DetailControls/SummarySlice.cs +++ b/Src/Common/Controls/DetailControls/SummarySlice.cs @@ -447,7 +447,9 @@ public bool OnPromoteSubitemInVector(object argument) if (recOwner.Owner is IRnResearchNbk) { // If possible, jump to the newly promoted record. +#pragma warning disable 618 // suppress obsolete warning mediator.BroadcastMessageUntilHandled("JumpToRecord", rec.Hvo); +#pragma warning restore 618 } return true; } diff --git a/Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs b/Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs index f10ff61efc..9b3198fb11 100644 --- a/Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs +++ b/Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs @@ -1654,7 +1654,9 @@ public bool HandleAnyJump() if (m_mediator != null && m_linkJump != null) { +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", m_linkJump); +#pragma warning restore 618 return true; } else @@ -1674,7 +1676,9 @@ public bool HandleAnyJump(Mediator mediator) if (mediator != null && m_linkJump != null) { +#pragma warning disable 618 // suppress obsolete warning mediator.PostMessage("FollowLink", m_linkJump); +#pragma warning restore 618 return true; } else diff --git a/Src/Common/Controls/XMLViews/XmlBrowseRDEView.cs b/Src/Common/Controls/XMLViews/XmlBrowseRDEView.cs index 7d1ecba1a2..b20a14d853 100644 --- a/Src/Common/Controls/XMLViews/XmlBrowseRDEView.cs +++ b/Src/Common/Controls/XMLViews/XmlBrowseRDEView.cs @@ -924,7 +924,9 @@ protected override bool OnRightMouseUp(Point pt, Rectangle rcSrcRoot, Rectangle private void JumpToToolFor(ICmObject target) { +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs("lexiconEdit", target.Guid)); +#pragma warning restore 618 } /// ------------------------------------------------------------------------------------ /// diff --git a/Src/Common/Controls/XMLViews/XmlBrowseViewBase.cs b/Src/Common/Controls/XMLViews/XmlBrowseViewBase.cs index cb4193a52d..ccd2543247 100644 --- a/Src/Common/Controls/XMLViews/XmlBrowseViewBase.cs +++ b/Src/Common/Controls/XMLViews/XmlBrowseViewBase.cs @@ -451,7 +451,9 @@ protected override void OnGotFocus(EventArgs e) if (ReadOnlySelect) { // We should NOT have focus! See if someone can take it back. +#pragma warning disable 618 // suppress obsolete warning m_bv.Mediator.BroadcastMessage("BrowseViewStoleFocus", this); +#pragma warning restore 618 } } diff --git a/Src/Common/Controls/XMLViews/XmlSeqView.cs b/Src/Common/Controls/XMLViews/XmlSeqView.cs index 7d1637e084..2a0d34de29 100644 --- a/Src/Common/Controls/XMLViews/XmlSeqView.cs +++ b/Src/Common/Controls/XMLViews/XmlSeqView.cs @@ -366,7 +366,9 @@ private XmlNode ItemDisplayCondition public bool OnJumpToRecord(object argument) { CheckDisposed(); +#pragma warning disable 618 // suppress obsolete warning Mediator.BroadcastMessage("CheckJump", argument); +#pragma warning restore 618 return false; // I don't want to be seen as handling this! } diff --git a/Src/Common/SimpleRootSite/SimpleRootSite.cs b/Src/Common/SimpleRootSite/SimpleRootSite.cs index 2f64e11ea1..f3b5a78d71 100644 --- a/Src/Common/SimpleRootSite/SimpleRootSite.cs +++ b/Src/Common/SimpleRootSite/SimpleRootSite.cs @@ -1041,7 +1041,9 @@ private void RefreshIfNecessary(object sender, EventArgs e) { if (Visible) { +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("MasterRefresh", null); +#pragma warning restore 618 } } diff --git a/Src/FdoUi/FdoUiCore.cs b/Src/FdoUi/FdoUiCore.cs index fe7f0b985f..99a28f55b2 100644 --- a/Src/FdoUi/FdoUiCore.cs +++ b/Src/FdoUi/FdoUiCore.cs @@ -643,7 +643,9 @@ public virtual bool OnJumpToTool(object commandObject) var command = (Command) commandObject; string tool = XmlUtils.GetMandatoryAttributeValue(command.Parameters[0], "tool"); var guid = GuidForJumping(commandObject); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs(tool, guid)); +#pragma warning restore 618 return true; } diff --git a/Src/LexText/Discourse/ConstituentChart.cs b/Src/LexText/Discourse/ConstituentChart.cs index a71c4ef3e4..6aeaa6287f 100644 --- a/Src/LexText/Discourse/ConstituentChart.cs +++ b/Src/LexText/Discourse/ConstituentChart.cs @@ -859,7 +859,9 @@ private void TemplateSelectionChanged(object sender, EventArgs e) list.PossibilitiesOS.Add(newKid); RecordList.SetUpConstChartTemplateTemplate(newKid); Cache.DomainDataByFlid.EndUndoTask(); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs("charttempEdit", newKid.Guid)); +#pragma warning restore 618 selection.SelectedItem = m_template; return; } diff --git a/Src/LexText/Interlinear/SandboxBase.cs b/Src/LexText/Interlinear/SandboxBase.cs index 3d0dbb7241..9eea95131b 100644 --- a/Src/LexText/Interlinear/SandboxBase.cs +++ b/Src/LexText/Interlinear/SandboxBase.cs @@ -4765,7 +4765,9 @@ public virtual bool OnJumpToTool(object commandObject) List additionalProps = fwLink.PropertyTableEntries; if (!String.IsNullOrEmpty(concordOn)) additionalProps.Add(new Property("ConcordOn", concordOn)); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", fwLink); +#pragma warning restore 618 return true; } } diff --git a/Src/LexText/LexTextControls/EntryDlgListener.cs b/Src/LexText/LexTextControls/EntryDlgListener.cs index 07a62eeeec..97e3c679c6 100644 --- a/Src/LexText/LexTextControls/EntryDlgListener.cs +++ b/Src/LexText/LexTextControls/EntryDlgListener.cs @@ -225,7 +225,11 @@ public bool OnGotoLexEntry(object argument) dlg.SetDlgInfo(cache, null, m_mediator, m_propertyTable); dlg.SetHelpTopic("khtpFindLexicalEntry"); if (dlg.ShowDialog() == DialogResult.OK) + { +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedObject.Hvo); +#pragma warning restore 618 + } } return true; } diff --git a/Src/LexText/LexTextControls/InflectionFeaturePopupTreeManager.cs b/Src/LexText/LexTextControls/InflectionFeaturePopupTreeManager.cs index d73ed462f4..1e0236f3d4 100644 --- a/Src/LexText/LexTextControls/InflectionFeaturePopupTreeManager.cs +++ b/Src/LexText/LexTextControls/InflectionFeaturePopupTreeManager.cs @@ -114,7 +114,9 @@ protected override void m_treeCombo_AfterSelect(object sender, TreeViewEventArgs case DialogResult.Yes: { // go to m_highestPOS in editor +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs("posEdit", dlg.HighestPOS.Guid)); +#pragma warning restore 618 if (ParentForm != null && ParentForm.Modal) { // Close the dlg that opened the popup tree, diff --git a/Src/LexText/LexTextControls/MSAPopupTreeManager.cs b/Src/LexText/LexTextControls/MSAPopupTreeManager.cs index b294d55807..ad761b1586 100644 --- a/Src/LexText/LexTextControls/MSAPopupTreeManager.cs +++ b/Src/LexText/LexTextControls/MSAPopupTreeManager.cs @@ -494,7 +494,9 @@ void LaunchChooseFromMasterCategoryListOnIdle(object sender, EventArgs e) // NOTE: We use PostMessage here, rather than SendMessage which // disposes of the PopupTree before we and/or our parents might // be finished using it (cf. LT-2563). +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs("posEdit", dlg.SelectedPOS.Guid)); +#pragma warning restore 618 if (m_parentOfPopupMgr != null && m_parentOfPopupMgr.Modal) { // Close the dlg that opened the master POS dlg, diff --git a/Src/LexText/LexTextControls/POSPopupTreeManager.cs b/Src/LexText/LexTextControls/POSPopupTreeManager.cs index 10fd3b6aac..6c9381fc82 100644 --- a/Src/LexText/LexTextControls/POSPopupTreeManager.cs +++ b/Src/LexText/LexTextControls/POSPopupTreeManager.cs @@ -155,8 +155,10 @@ protected override void m_treeCombo_AfterSelect(object sender, TreeViewEventArgs // NOTE: We use PostMessage here, rather than SendMessage which // disposes of the PopupTree before we and/or our parents might // be finished using it (cf. LT-2563). +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs(JumpToToolNamed, dlg.SelectedPOS.Guid)); +#pragma warning restore 618 if (ParentForm != null && ParentForm.Modal) { // Close the dlg that opened the master POS dlg, diff --git a/Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs b/Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs index b2bc25fdd2..11b622f682 100644 --- a/Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs +++ b/Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs @@ -331,7 +331,11 @@ public void SetHelpTopic(string helpTopic) public void HandleJump() { if (m_link != null) + { +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", m_link); +#pragma warning restore 618 + } } void m_bvList_SelectionChanged(object sender, FwObjectSelectionEventArgs e) diff --git a/Src/LexText/LexTextControls/RecordDlgListener.cs b/Src/LexText/LexTextControls/RecordDlgListener.cs index 7238fc1e0f..9e56ea35df 100644 --- a/Src/LexText/LexTextControls/RecordDlgListener.cs +++ b/Src/LexText/LexTextControls/RecordDlgListener.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2015 SIL International +// Copyright (c) 2015 SIL International // This software is licensed under the LGPL, version 2.1 or later // (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -104,7 +104,11 @@ public bool OnGotoRecord(object argument) Debug.Assert(cache != null); dlg.SetDlgInfo(cache, null, m_mediator, m_propertyTable); if (dlg.ShowDialog() == DialogResult.OK) + { +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedObject.Hvo); +#pragma warning restore 618 + } } return true; } diff --git a/Src/LexText/Lexicon/FLExBridgeListener.cs b/Src/LexText/Lexicon/FLExBridgeListener.cs index 042756fafc..1326f05476 100644 --- a/Src/LexText/Lexicon/FLExBridgeListener.cs +++ b/Src/LexText/Lexicon/FLExBridgeListener.cs @@ -251,7 +251,9 @@ public bool OnObtainLiftProject(object commandObject) // Do merciful import. ImportLiftCommon(FlexLiftMerger.MergeStyle.MsKeepBoth); _propertyTable.SetProperty("LastBridgeUsed", "LiftBridge", PropertyTable.SettingsGroup.LocalSettings, true); +#pragma warning disable 618 // suppress obsolete warning _mediator.BroadcastMessage("MasterRefresh", null); +#pragma warning restore 618 return true; } @@ -699,7 +701,9 @@ private void ViewLiftMessages(object commandObject) /// Callback to refresh the Message Slice after OnView[Lift]Messages private void BroadcastMasterRefresh() { +#pragma warning disable 618 // suppress obsolete warning _mediator.BroadcastMessage("MasterRefresh", null); +#pragma warning restore 618 } #endregion View Messages (for full FLEx data only) messages diff --git a/Src/LexText/Lexicon/MsaInflectionFeatureListDlgLauncher.cs b/Src/LexText/Lexicon/MsaInflectionFeatureListDlgLauncher.cs index a3b3b0b042..a65e60eeb7 100644 --- a/Src/LexText/Lexicon/MsaInflectionFeatureListDlgLauncher.cs +++ b/Src/LexText/Lexicon/MsaInflectionFeatureListDlgLauncher.cs @@ -137,7 +137,9 @@ protected override void HandleChooser() // I'm just guessing. // Also, is there some way to know the application name and tool name without hard coding them? var linkJump = new FwLinkArgs("posEdit", dlg.HighestPOS.Guid); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", linkJump); +#pragma warning restore 618 } else { @@ -307,7 +309,9 @@ protected override void HandleChooser() // Also, is there some way to know the application name and tool name without hard coding them? */ var linkJump = new FwLinkArgs("featuresAdvancedEdit", m_cache.LanguageProject.MsFeatureSystemOA.Guid); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", linkJump); +#pragma warning restore 618 /*} else { diff --git a/Src/LexText/Lexicon/ReversalEntryPOS.cs b/Src/LexText/Lexicon/ReversalEntryPOS.cs index 478774f4e2..7ded706ed7 100644 --- a/Src/LexText/Lexicon/ReversalEntryPOS.cs +++ b/Src/LexText/Lexicon/ReversalEntryPOS.cs @@ -95,7 +95,9 @@ public bool OnMoveReversalPOS(object cmd) }); // Note: PropChanged should happen on the old owner and the new in the 'Add" method call. // Have to jump to a main PartOfSpeech, as RecordClerk doesn't know anything about subcategories. +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", newOwner.MainPossibility.Hvo); +#pragma warning restore 618 } } @@ -163,7 +165,9 @@ public bool OnMergeReversalPOS(object cmd) ()=> survivor.MergeObject(currentPOS, false)); // Note: PropChanged should happen on the old owner and the new in the 'Add" method call. // Have to jump to a main PartOfSpeech, as RecordClerk doesn't know anything about subcategories. +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", survivor.MainPossibility.Hvo); +#pragma warning restore 618 } } diff --git a/Src/LexText/Lexicon/ReversalIndexEntryMenuHandler.cs b/Src/LexText/Lexicon/ReversalIndexEntryMenuHandler.cs index dcefa2a4ae..0fe3be15ff 100644 --- a/Src/LexText/Lexicon/ReversalIndexEntryMenuHandler.cs +++ b/Src/LexText/Lexicon/ReversalIndexEntryMenuHandler.cs @@ -137,7 +137,9 @@ public bool OnMoveReversalindexEntry(object cmd) clerk.RemoveItemsFor(currentEntry.Hvo); // Note: PropChanged should happen on the old owner and the new while completing the unit of work. // Have to jump to a main entry, as RecordClerk doesn't know anything about subentries. +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", newOwner.MainEntry.Hvo); +#pragma warning restore 618 } } return true; diff --git a/Src/LexText/Lexicon/ReversalIndexEntrySlice.cs b/Src/LexText/Lexicon/ReversalIndexEntrySlice.cs index 88c18eaee3..127fa2d568 100644 --- a/Src/LexText/Lexicon/ReversalIndexEntrySlice.cs +++ b/Src/LexText/Lexicon/ReversalIndexEntrySlice.cs @@ -355,7 +355,9 @@ private void OnShowInReversalIndex(object sender, EventArgs e) } } IReversalIndexEntry rie = cache.ServiceLocator.GetObject(hvo) as IReversalIndexEntry; +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs("reversalToolEditComplete", rie.MainEntry.Guid)); +#pragma warning restore 618 } /// diff --git a/Src/LexText/Lexicon/ReversalListener.cs b/Src/LexText/Lexicon/ReversalListener.cs index a44ef6ee81..bb3a3c15a0 100644 --- a/Src/LexText/Lexicon/ReversalListener.cs +++ b/Src/LexText/Lexicon/ReversalListener.cs @@ -259,7 +259,9 @@ public bool OnGotoReversalEntry(object argument) { // Can't Go to a subentry, so we have to go to its main entry. var selEntry = (IReversalIndexEntry) dlg.SelectedObject; +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", selEntry.MainEntry.Hvo); +#pragma warning restore 618 } } return true; diff --git a/Src/LexText/Morphology/AffixRuleFormulaSlice.cs b/Src/LexText/Morphology/AffixRuleFormulaSlice.cs index 296d84785c..8a54d8fa56 100644 --- a/Src/LexText/Morphology/AffixRuleFormulaSlice.cs +++ b/Src/LexText/Morphology/AffixRuleFormulaSlice.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2015 SIL International +// Copyright (c) 2015 SIL International // This software is licensed under the LGPL, version 2.1 or later // (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -72,7 +72,9 @@ public bool OnMappingJumpToNaturalClass(object args) { CheckDisposed(); IMoModifyFromInput mapping = RuleFormulaControl.CurrentObject as IMoModifyFromInput; +#pragma warning disable 618 // suppress obsolete warning Mediator.PostMessage("FollowLink", new FwLinkArgs("naturalClassedit", mapping.ModificationRA.Guid)); +#pragma warning restore 618 return true; } @@ -89,7 +91,9 @@ public virtual bool OnMappingJumpToPhoneme(object args) { CheckDisposed(); IMoInsertPhones mapping = RuleFormulaControl.CurrentObject as IMoInsertPhones; +#pragma warning disable 618 // suppress obsolete warning Mediator.PostMessage("FollowLink", new FwLinkArgs("phonemeEdit", mapping.ContentRS[0].Guid)); +#pragma warning restore 618 return true; } } diff --git a/Src/LexText/Morphology/InflAffixTemplateControl.cs b/Src/LexText/Morphology/InflAffixTemplateControl.cs index 57984fc604..2a79d8389c 100644 --- a/Src/LexText/Morphology/InflAffixTemplateControl.cs +++ b/Src/LexText/Morphology/InflAffixTemplateControl.cs @@ -316,7 +316,9 @@ public bool OnJumpToTool(object commandObject) Command command = (XCore.Command)commandObject; string tool = XmlUtils.GetMandatoryAttributeValue(command.Parameters[0], "tool"); var inflMsa = m_obj as IMoInflAffMsa; +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs(tool, inflMsa.Owner.Guid)); +#pragma warning restore 618 return true; // handled this } diff --git a/Src/LexText/Morphology/MasterCatDlgListener.cs b/Src/LexText/Morphology/MasterCatDlgListener.cs index 9a4cbe7dd0..e1c7470cf2 100644 --- a/Src/LexText/Morphology/MasterCatDlgListener.cs +++ b/Src/LexText/Morphology/MasterCatDlgListener.cs @@ -85,7 +85,9 @@ public override bool OnDialogInsertItemInVector(object argument) case DialogResult.Yes: // This is the equivalent functionality, but is deferred processing. // This is done so that the JumpToRecord can be processed last. +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedPOS.Hvo); +#pragma warning restore 618 break; } } diff --git a/Src/LexText/Morphology/MasterInflFeatDlgListener.cs b/Src/LexText/Morphology/MasterInflFeatDlgListener.cs index d4c56a4efe..15e196ebde 100644 --- a/Src/LexText/Morphology/MasterInflFeatDlgListener.cs +++ b/Src/LexText/Morphology/MasterInflFeatDlgListener.cs @@ -88,7 +88,9 @@ public override bool OnDialogInsertItemInVector(object argument) //m_mediator.SendMessage("JumpToRecord", dlg.SelectedFeatDefn.Hvo); // This is the equivalent functionality, but is deferred processing. // This is done so that the JumpToRecord can be processed last. +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedFeatDefn.Hvo); +#pragma warning restore 618 // LT-6412: this call will now cause the Mediator to be disposed while it is busy processing // this call, so there is code in the Mediator to handle in the middle of a msg the case // where the object is nolonger valid. This has happend before and was being handled, this diff --git a/Src/LexText/Morphology/MasterPhonFeatDlgListener.cs b/Src/LexText/Morphology/MasterPhonFeatDlgListener.cs index 6da65b7e59..8d47de4125 100644 --- a/Src/LexText/Morphology/MasterPhonFeatDlgListener.cs +++ b/Src/LexText/Morphology/MasterPhonFeatDlgListener.cs @@ -103,7 +103,11 @@ public override bool OnDialogInsertItemInVector(object argument) // This is the equivalent functionality, but is deferred processing. // This is done so that the JumpToRecord can be processed last. if (dlg.SelectedFeatDefn != null) + { +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedFeatDefn.Hvo); +#pragma warning restore 618 + } // LT-6412: this call will now cause the Mediator to be disposed while it is busy processing // this call, so there is code in the Mediator to handle in the middle of a msg the case // where the object is nolonger valid. This has happend before and was being handled, this diff --git a/Src/LexText/Morphology/MorphologyListener.cs b/Src/LexText/Morphology/MorphologyListener.cs index 56d5c35452..a4b5365da0 100644 --- a/Src/LexText/Morphology/MorphologyListener.cs +++ b/Src/LexText/Morphology/MorphologyListener.cs @@ -403,7 +403,9 @@ public bool OnEditSpellingStatus(object argument) List additionalProps = link.PropertyTableEntries; additionalProps.Add(new Property("SuspendLoadListUntilOnChangeFilter", link.ToolName)); additionalProps.Add(new Property("LinkSetupInfo", "TeReviewUndecidedSpelling")); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", link); +#pragma warning restore 618 return true; } @@ -421,7 +423,9 @@ public bool OnViewIncorrectWords(object argument) List additionalProps = link.PropertyTableEntries; additionalProps.Add(new Property("SuspendLoadListUntilOnChangeFilter", link.ToolName)); additionalProps.Add(new Property("LinkSetupInfo", "TeCorrectSpelling")); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", link); +#pragma warning restore 618 return true; } @@ -438,7 +442,11 @@ public bool OnGotoWfiWordform(object argument) { dlg.SetDlgInfo(Cache, null, m_mediator, m_propertyTable); if (dlg.ShowDialog() == DialogResult.OK) + { +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", dlg.SelectedObject.Hvo); +#pragma warning restore 618 + } } return true; } @@ -473,7 +481,9 @@ public virtual bool OnJumpToTool(object commandObject) if (command.TargetId != Guid.Empty) { var tool = XmlUtils.GetMandatoryAttributeValue(command.Parameters[0], "tool"); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs(tool, command.TargetId)); +#pragma warning restore 618 command.TargetId = Guid.Empty; // clear the target for future use. return true; } @@ -779,7 +789,9 @@ public virtual bool OnJumpToTool(object commandObject) if (guid != Guid.Empty) { var tool = XmlUtils.GetMandatoryAttributeValue(cmd.Parameters[0], "tool"); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs(tool, guid)); +#pragma warning restore 618 return true; } return false; diff --git a/Src/LexText/Morphology/PhEnvStrRepresentationSlice.cs b/Src/LexText/Morphology/PhEnvStrRepresentationSlice.cs index 9c62c35838..513bede0f6 100644 --- a/Src/LexText/Morphology/PhEnvStrRepresentationSlice.cs +++ b/Src/LexText/Morphology/PhEnvStrRepresentationSlice.cs @@ -313,8 +313,12 @@ private void DoValidation(bool refresh) ConstraintFailure failure; m_env.CheckConstraints(PhEnvironmentTags.kflidStringRepresentation, true, out failure, /* adjust the squiggly line */ true); // This will make the record list update to the new value. - if(refresh) + if (refresh) + { +#pragma warning disable 618 // suppress obsolete warning Mediator.BroadcastMessage("Refresh", null); +#pragma warning restore 618 + } } finally { diff --git a/Src/LexText/Morphology/RuleFormulaSlice.cs b/Src/LexText/Morphology/RuleFormulaSlice.cs index c759bbdffe..380e339340 100644 --- a/Src/LexText/Morphology/RuleFormulaSlice.cs +++ b/Src/LexText/Morphology/RuleFormulaSlice.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2015 SIL International +// Copyright (c) 2015 SIL International // This software is licensed under the LGPL, version 2.1 or later // (http://www.gnu.org/licenses/lgpl-2.1.html) @@ -170,8 +170,10 @@ public bool OnContextJumpToNaturalClass(object args) { CheckDisposed(); IPhSimpleContextNC ctxt = RuleFormulaControl.CurrentContext as IPhSimpleContextNC; +#pragma warning disable 618 // suppress obsolete warning Mediator.PostMessage("FollowLink", new FwLinkArgs("naturalClassedit", ctxt.FeatureStructureRA.Guid)); +#pragma warning restore 618 return true; } @@ -188,7 +190,9 @@ public virtual bool OnContextJumpToPhoneme(object args) { CheckDisposed(); IPhSimpleContextSeg ctxt = RuleFormulaControl.CurrentContext as IPhSimpleContextSeg; +#pragma warning disable 618 // suppress obsolete warning Mediator.PostMessage("FollowLink", new FwLinkArgs("phonemeEdit", ctxt.FeatureStructureRA.Guid)); +#pragma warning restore 618 return true; } } diff --git a/Src/LexText/ParserUI/ParserReportDialog.xaml.cs b/Src/LexText/ParserUI/ParserReportDialog.xaml.cs index 7f97244d9b..18afdcd8c3 100644 --- a/Src/LexText/ParserUI/ParserReportDialog.xaml.cs +++ b/Src/LexText/ParserUI/ParserReportDialog.xaml.cs @@ -54,8 +54,11 @@ public void ShowWordAnalyses(object sender, RoutedEventArgs e) if (Cache.ServiceLocator.GetInstance().TryGetObject(tsString, out wordform)) { var fwLink = new FwLinkArgs("Analyses", wordform.Guid); +#pragma warning disable 618 // suppress obsolete warning Mediator.PostMessage("FollowLink", fwLink); - } else +#pragma warning restore 618 + } + else { // This should never happen. MessageBox.Show("Unknown word " + parseReport.Word); diff --git a/Src/LexText/ParserUI/WebPageInteractor.cs b/Src/LexText/ParserUI/WebPageInteractor.cs index 785e6a0cbb..efc67ec1d4 100644 --- a/Src/LexText/ParserUI/WebPageInteractor.cs +++ b/Src/LexText/ParserUI/WebPageInteractor.cs @@ -148,7 +148,9 @@ public void JumpToToolBasedOnHvo(int hvo) cmo = CmObjectUi.GetSelfOrParentOfClass(cmo, parentClassId); if (cmo == null) return; // do nothing +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", new FwLinkArgs(sTool, cmo.Guid)); +#pragma warning restore 618 } /// diff --git a/Src/XCore/xCoreInterfaces/Mediator.cs b/Src/XCore/xCoreInterfaces/Mediator.cs index 6b7a1617f1..4d86230b4d 100644 --- a/Src/XCore/xCoreInterfaces/Mediator.cs +++ b/Src/XCore/xCoreInterfaces/Mediator.cs @@ -759,7 +759,8 @@ public bool ProcessItem() /// this does not care if anyone claims to have "handled" the message. /// It will keep sending messages to everyone. /// - /// + [Obsolete("Use the the FwUtils Publisher and Subscriber classes instead.", false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public void BroadcastString(string methodName, string stringParam) { CheckDisposed(); @@ -968,28 +969,6 @@ public bool SendMessageToAllNow(string messageName, object parameter) return result; } - /// - /// This method is a replacement message for the SendMessage when the return value isn't - /// actually used. It allows those messages to be defered for a different message (later). - /// - /// - /// - public void SendMessageDefered(string messageName, object parameter) - { - CheckDisposed(); - - if (!ProcessMessages) - return; - -#if DEBUG - if(messageName.Substring(0,2) == "On") - Debug.Fail("The convention is to send messages without the 'On' prefix. " + - "That is added by the message sending code."); -#endif - AddQueueItem(new QueueItem("On" + messageName, new Type[] {typeof(object)}, - new Object[] { parameter }, true, false)); - } - #if TESTING_PCDEFERED /// /// @@ -1023,6 +1002,8 @@ public void PropChangedDefered( PropChangedDelegate pcDelegate, /// /// /// ------------------------------------------------------------------------------------ + [Obsolete("Use the the FwUtils Publisher and Subscriber classes instead.", false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public void PostMessage(string messageName, object parameter) { CheckDisposed(); @@ -1033,7 +1014,7 @@ public void PostMessage(string messageName, object parameter) m_idleQueue.Add(IdleQueuePriority.Medium, PostMessageOnIdle, new PendingMessageItem(messageName, parameter), false); } - bool PostMessageOnIdle(object parameter) + private bool PostMessageOnIdle(object parameter) { var pmi = (PendingMessageItem) parameter; SendMessage(pmi.m_message, pmi.m_parameter); @@ -1049,6 +1030,8 @@ bool PostMessageOnIdle(object parameter) /// /// true if the message was handled, otherwise false /// ------------------------------------------------------------------------------------ + [Obsolete("Use the the FwUtils Publisher and Subscriber classes instead.", false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public bool BroadcastMessage(string messageName, object parameter) { CheckDisposed(); @@ -1081,6 +1064,8 @@ public bool BroadcastMessage(string messageName, object parameter) /// /// /// + [Obsolete("Use the the FwUtils Publisher and Subscriber classes instead.", false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public bool BroadcastMessageUntilHandled(string messageName, object parameter) { CheckDisposed(); @@ -1125,6 +1110,8 @@ public bool HasReceiver(string messageName) } /// true if the message was canceled, otherwise false. + [Obsolete("Use the the FwUtils Publisher and Subscriber classes instead.", false)] + [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public bool SendCancellableMessage(string messageName, object parameter) { CheckDisposed(); diff --git a/Src/XCore/xCoreInterfaces/PropertyTable.cs b/Src/XCore/xCoreInterfaces/PropertyTable.cs index c2cbcfb2d6..875675fefe 100644 --- a/Src/XCore/xCoreInterfaces/PropertyTable.cs +++ b/Src/XCore/xCoreInterfaces/PropertyTable.cs @@ -580,7 +580,9 @@ private void BroadcastPropertyChange(string key) if (Mediator != null) { +#pragma warning disable 618 // suppress obsolete warning Mediator.BroadcastString("OnPropertyChanged", propertyName); +#pragma warning restore 618 } } diff --git a/Src/XCore/xWindow.cs b/Src/XCore/xWindow.cs index 6fe09b58e6..9be1a47eaa 100644 --- a/Src/XCore/xWindow.cs +++ b/Src/XCore/xWindow.cs @@ -2276,7 +2276,9 @@ protected virtual void XWindow_Closing(object sender, CancelEventArgs e) m_widgetUpdateTimer.Enabled = false; +#pragma warning disable 618 // suppress obsolete warning if (m_mediator.SendCancellableMessage("ConsideringClosing", this)) +#pragma warning restore 618 { e.Cancel = true; m_widgetUpdateTimer.Enabled = true; diff --git a/Src/xWorks/AddCustomFieldDlg.cs b/Src/xWorks/AddCustomFieldDlg.cs index 8640e802ae..69f403aa25 100644 --- a/Src/xWorks/AddCustomFieldDlg.cs +++ b/Src/xWorks/AddCustomFieldDlg.cs @@ -869,7 +869,11 @@ private void m_okButton_Click(object sender, EventArgs e) changed |= SaveCustomFieldsToDB(); } if (changed) // only fire the 'big gun' if something has actually changed + { +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessage("MasterRefresh", null); +#pragma warning restore 618 + } DialogResult = DialogResult.OK; } diff --git a/Src/xWorks/DictionaryConfigurationManagerController.cs b/Src/xWorks/DictionaryConfigurationManagerController.cs index 2cda91cd09..861286c1fd 100644 --- a/Src/xWorks/DictionaryConfigurationManagerController.cs +++ b/Src/xWorks/DictionaryConfigurationManagerController.cs @@ -646,7 +646,9 @@ private void CloseDialogAndRefreshProject() _view.Close(); if(ConfigurationViewImported != null) ConfigurationViewImported(); +#pragma warning disable 618 // suppress obsolete warning _mediator.BroadcastMessage("MasterRefresh", null); +#pragma warning restore 618 } public bool IsConfigurationACustomizedOriginal(DictionaryConfigurationModel configuration) diff --git a/Src/xWorks/FwXWindow.cs b/Src/xWorks/FwXWindow.cs index 9cac0726fe..085b707ff2 100644 --- a/Src/xWorks/FwXWindow.cs +++ b/Src/xWorks/FwXWindow.cs @@ -1220,8 +1220,10 @@ protected bool OnJumpToPopupLexEntry(object command) { case "lexiconEdit": // Use existing lexicon entry editor. +#pragma warning disable 618 // suppress obsolete warning Mediator.BroadcastMessage("JumpToRecord", command); Mediator.BroadcastMessage("FocusFirstPossibleSlice", null); +#pragma warning restore 618 return true; } @@ -1242,8 +1244,10 @@ protected bool OnJumpToPopupLexEntry(object command) } m_popupLexEntryWindow.BringToFront(); m_popupLexEntryWindow.Activate(); +#pragma warning disable 618 // suppress obsolete warning Mediator.BroadcastMessage("JumpToPopupRecord", command); Mediator.BroadcastMessage("FocusFirstPossibleSlice", null); +#pragma warning restore 618 } return true; } diff --git a/Src/xWorks/LinkListener.cs b/Src/xWorks/LinkListener.cs index 12d17df74f..f7900abed7 100644 --- a/Src/xWorks/LinkListener.cs +++ b/Src/xWorks/LinkListener.cs @@ -540,7 +540,9 @@ private bool FollowActiveLink(bool suspendLoadingRecord) // Allow this to happen after the processing of the tool change above by using the Broadcast // method on the mediator, the SendMessage would process it before the above msg and it would // use the wrong RecordList. (LT-3260) +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("JumpToRecord", obj.Hvo); +#pragma warning restore 618 } foreach (Property property in m_lnkActive.PropertyTableEntries) @@ -550,9 +552,11 @@ private bool FollowActiveLink(bool suspendLoadingRecord) //the persistence or ownership of the property...at the moment the only values we're putting //in there are strings or bools } +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessageUntilHandled("LinkFollowed", m_lnkActive); +#pragma warning restore 618 } - catch(Exception err) + catch (Exception err) { // Stop suspension of loading records. m_propertyTable.SetProperty("SuspendLoadingRecordUntilOnJumpToRecord", "", diff --git a/Src/xWorks/RecordClerk.cs b/Src/xWorks/RecordClerk.cs index f1ed3af84f..9e4ff7b974 100644 --- a/Src/xWorks/RecordClerk.cs +++ b/Src/xWorks/RecordClerk.cs @@ -1820,7 +1820,9 @@ public void SelectedRecordChanged(bool fSkipRecordNavigation, bool suppressFocus // scroll to the right index if it hasn't already done so. if (!fSkipRecordNavigation) { +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessage("RecordNavigation", rni); +#pragma warning restore 618 } } @@ -2435,7 +2437,9 @@ public void JumpToIndex(int index, bool suppressFocusChange) //in order to maintain the LT-11401 fix we directly use the mediator here and pass true in the //second parameter so that we don't save the record and lose the undo history. -naylor 2011-11-03 var rni = new RecordNavigationInfo(this, true, SkipShowRecord, suppressFocusChange); +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessage("RecordNavigation", rni); +#pragma warning restore 618 return; } try @@ -2587,7 +2591,9 @@ public bool OnInsertItemInVector(object argument) m_suppressSaveOnChangeRecord = false; } +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessage("FocusFirstPossibleSlice", null); +#pragma warning restore 618 return result; } @@ -2721,9 +2727,11 @@ public bool OnDuplicateSelectedItem(object argument) m_suppressSaveOnChangeRecord = false; } +#pragma warning disable 618 // suppress obsolete warning if (newObj != null) m_mediator.BroadcastMessage("UpdateItemCheckedState", newObj); m_mediator.BroadcastMessage("FocusFirstPossibleSlice", null); +#pragma warning restore 618 return result; } @@ -2872,7 +2880,9 @@ public void OnChangeFilter(FilterChangeEventArgs args) string persistFilter = DynamicLoader.PersistObject(Filter, "filter"); m_propertyTable.SetProperty(GetFilterPropertyTableId(), persistFilter, PropertyTable.SettingsGroup.LocalSettings, true); // adjust menu bar items according to current state of Filter, where needed. +#pragma warning disable 618 // suppress obsolete warning m_mediator.BroadcastMessage("AdjustFilterSelection", Filter); +#pragma warning restore 618 UpdateFilterStatusBarPanel(); if (m_list.Filter != null) Logger.WriteEvent("Filter changed: "+m_list.Filter); diff --git a/Src/xWorks/XhtmlDocView.cs b/Src/xWorks/XhtmlDocView.cs index 04fa3dbe46..226998e97c 100644 --- a/Src/xWorks/XhtmlDocView.cs +++ b/Src/xWorks/XhtmlDocView.cs @@ -904,7 +904,9 @@ public virtual bool OnJumpToTool(object commandObject) return false; var fwLink = new FwLinkArgs(tool, Guid.Empty); +#pragma warning disable 618 // suppress obsolete warning m_mediator.PostMessage("FollowLink", fwLink); +#pragma warning restore 618 return true; } return false;