Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Src/Common/Controls/DetailControls/ChooserCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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, "");
Expand Down
4 changes: 4 additions & 0 deletions Src/Common/Controls/DetailControls/DataTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion Src/Common/Controls/DetailControls/SemanticDomainsChooser.cs
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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();
}

Expand Down
2 changes: 2 additions & 0 deletions Src/Common/Controls/DetailControls/Slice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions Src/Common/Controls/DetailControls/SummarySlice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 4 additions & 0 deletions Src/Common/Controls/XMLViews/ReallySimpleListChooser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Src/Common/Controls/XMLViews/XmlBrowseRDEView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
/// ------------------------------------------------------------------------------------
/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Src/Common/Controls/XMLViews/XmlBrowseViewBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
2 changes: 2 additions & 0 deletions Src/Common/Controls/XMLViews/XmlSeqView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!
}

Expand Down
2 changes: 2 additions & 0 deletions Src/Common/SimpleRootSite/SimpleRootSite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
2 changes: 2 additions & 0 deletions Src/FdoUi/FdoUiCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Discourse/ConstituentChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Interlinear/SandboxBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4765,7 +4765,9 @@ public virtual bool OnJumpToTool(object commandObject)
List<Property> 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;
}
}
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/LexTextControls/EntryDlgListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/LexTextControls/MSAPopupTreeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/LexTextControls/POSPopupTreeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/LexTextControls/PhonologicalFeatureChooserDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion Src/LexText/LexTextControls/RecordDlgListener.cs
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/Lexicon/FLExBridgeListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -699,7 +701,9 @@ private void ViewLiftMessages(object commandObject)
/// <summary>Callback to refresh the Message Slice after OnView[Lift]Messages</summary>
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
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/Lexicon/MsaInflectionFeatureListDlgLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/Lexicon/ReversalEntryPOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down Expand Up @@ -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
}
}

Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Lexicon/ReversalIndexEntryMenuHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Lexicon/ReversalIndexEntrySlice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/// <summary>
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Lexicon/ReversalListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 5 additions & 1 deletion Src/LexText/Morphology/AffixRuleFormulaSlice.cs
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}
}
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Morphology/InflAffixTemplateControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Morphology/MasterCatDlgListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Morphology/MasterInflFeatDlgListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/Morphology/MasterPhonFeatDlgListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading