Skip to content
Open
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/StringSlice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,10 @@ public override void DoHotLinkAction(string strData, ISilDataAccess sda)
{
FwLinkArgs linkArgs = new FwLinkArgs(url);
linkArgs.DisplayErrorMsg = false;
#pragma warning disable 618 // suppress obsolete warning
if (m_mediator.SendMessage("FollowLink", linkArgs))
return;
#pragma warning restore 618
}
}
catch
Expand Down
2 changes: 2 additions & 0 deletions Src/Common/Controls/XMLViews/XmlBrowseViewBaseVc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1730,8 +1730,10 @@ public override void DoHotLinkAction(string strData, ISilDataAccess sda)
{
FwLinkArgs linkArgs = new FwLinkArgs(url);
linkArgs.DisplayErrorMsg = false;
#pragma warning disable 618 // suppress obsolete warning
if (m_xbv.Mediator.SendMessage("FollowLink", linkArgs))
return;
#pragma warning restore 618
}
}
catch
Expand Down
4 changes: 4 additions & 0 deletions Src/FdoUi/FdoUiCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,9 @@ public bool DeleteUnderlyingObject()
object command = this;
if (m_command != null)
command = m_command;
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("DeleteRecord", command);
#pragma warning restore 618
}
else
{
Expand Down Expand Up @@ -1161,7 +1163,9 @@ public void MergeUnderlyingObject(bool fLoseNoTextData)
{
ReallyMergeUnderlyingObject(dlg.Hvo, fLoseNoTextData);
// Refresh in case "Sense Number" was 0 in the target and non-0 in the source (LT-22155).
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("MasterRefresh", null);
#pragma warning restore 618
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions Src/FdoUi/FsFeatDefnUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ internal FsFeatDefnUi() {}
case DialogResult.OK: // Fall through.
case DialogResult.Yes:
ffdUi = new FsFeatDefnUi(dlg.SelectedFeatDefn);
#pragma warning disable 618 // suppress obsolete warning
mediator.SendMessage("JumpToRecord", dlg.SelectedFeatDefn.Hvo);
#pragma warning restore 618
break;
}
}
Expand Down
2 changes: 2 additions & 0 deletions Src/FdoUi/PartOfSpeechUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ internal PartOfSpeechUi() { }
case DialogResult.OK: // Fall through.
case DialogResult.Yes:
posUi = new PartOfSpeechUi(dlg.SelectedPOS);
#pragma warning disable 618 // suppress obsolete warning
mediator.SendMessage("JumpToRecord", dlg.SelectedPOS.Hvo);
#pragma warning restore 618
break;
}
}
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Interlinear/InterlinearImportDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ private void m_btnOK_Click(object sender, EventArgs e)
var firstNewText = import.FirstNewText;
if (firstNewText != null && m_mediator != null)
{
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("JumpToRecord", firstNewText.Hvo);
#pragma warning restore 618
}
}
else
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Interlinear/InterlinearSfmImportWizard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,9 @@ protected override void OnFinishButton()
Close();
}
}
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("MasterRefresh", ActiveForm);
#pragma warning restore 618
if (m_firstNewText != null)
{
// try to select it.
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/Interlinear/InterlinearTextsRecordClerk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ private bool AddNewText(Command command)
if (CurrentObject == null || CurrentObject.Hvo == 0)
return false;
if (!InDesiredTool("interlinearEdit"))
{
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("FollowLink", new FwLinkArgs("interlinearEdit", CurrentObject.Guid));
#pragma warning restore 618
}
// This is a workable alternative (where link is the one created above), but means this code has to know about the FwXApp class.
//(FwXApp.App as FwXApp).OnIncomingLink(link);
// This alternative does NOT work; it produces a deadlock...I think the remote code is waiting for the target app
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Interlinear/TextsFilterItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public TextsFilterItem(ITsString tssName, LcmCache cache, Mediator mediator) : b

public override bool Invoke()
{
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("AddTexts", this);
#pragma warning restore 618

//var clerk = RecordClerk.FindClerk(m_mediator, "interlinearTexts") as InterlinearTextsRecordClerk;
//if (clerk == null)
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 @@ -66,8 +66,10 @@ public bool OnDialogInsertItemInVector(object argument)
bool newby;
dlg.GetDialogInfo(out entry, out newby);
// No need for a PropChanged here because InsertEntryDlg takes care of that. (LT-3608)
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("MasterRefresh", null);
m_mediator.SendMessage("JumpToRecord", entry.Hvo);
#pragma warning restore 618
}
}
return true; // We "handled" the message, regardless of what happened.
Expand Down Expand Up @@ -146,7 +148,9 @@ private bool RunMergeEntryDialog(object argument, bool fLoseNoTextData)
LexTextControls.ksEntriesHaveBeenMerged,
LexTextControls.ksMergeReport,
MessageBoxButtons.OK, MessageBoxIcon.Information);
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("JumpToRecord", survivor.Hvo);
#pragma warning restore 618
}
}
return true;
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/LexTextControls/LexOptionsDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ private void m_btnOK_Click(object sender, EventArgs e)
var managerNode = managerDoc.SelectSingleNode("/manager");
var shutdownMsg = XmlUtils.GetOptionalAttributeValue(managerNode, "shutdown");
if (!string.IsNullOrEmpty(shutdownMsg))
{
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage(shutdownMsg, null);
#pragma warning restore 618
}
var configfilesNode = managerNode.SelectSingleNode("configfiles");
var extensionPath = Path.Combine(baseExtensionPath, configfilesNode.Attributes["targetdir"].Value);
Directory.Delete(extensionPath, true);
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/LexTextControls/RecordDlgListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public bool OnDialogInsertItemInVector(object argument)
if (dlg.ShowDialog(Form.ActiveForm) == DialogResult.OK)
{
IRnGenericRec newRec = dlg.NewRecord;
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("JumpToRecord", newRec.Hvo);
#pragma warning restore 618
}
}
return true; // We "handled" the message, regardless of what happened.
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/LexTextDll/LexTextApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ dlg is LexImportWizard || dlg is NotebookImportWiz ||
dlg is LiftImportDlg || dlg is CombineImportDlg)
{
// Make everything we've imported visible.
#pragma warning disable 618 // suppress obsolete warning
wndActive.Mediator.SendMessage("MasterRefresh", wndActive);
#pragma warning restore 618
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Lexicon/LexReferenceMultiSlice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,9 @@ public void HandleMoreMenuItem(object sender, EventArgs ea)
ILexRefType newKid = list.Services.GetInstance<ILexRefTypeFactory>().Create();
list.PossibilitiesOS.Add(newKid);
m_cache.DomainDataByFlid.EndUndoTask();
#pragma warning disable 618 // suppress obsolete warning
ContainingDataTree.Mediator.SendMessage("FollowLink", new FwLinkArgs("lexRefEdit", newKid.Guid));
#pragma warning restore 618
}

protected void ExpandNewNode()
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 @@ -731,7 +731,9 @@ protected virtual void ReallyDeleteReversalIndex(IReversalIndex ri)
}
// Without this, stale data can still display in the BulkEditSenses tool if you
// recreate the deleted reversal index.
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("MasterRefresh", null);
#pragma warning restore 618
}

internal static IReversalIndex ReversalIndexAfterDeletion(LcmCache cache, out int cobjNew)
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Morphology/InflAffixTemplateMenuHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ internal virtual void HandleFwMenuSelection(object sender, EventArgs ea)
if (fmi == null)
return;
var command = new Command(m_mediator, fmi.ConfigurationNode);
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage(fmi.Message, command);
#pragma warning restore 618
}

private FwMenuItem FindEnabledItem(int iSel)
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 @@ -95,7 +95,9 @@ public override bool OnDialogInsertItemInVector(object argument)
// 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
// call "SendMessageToAllNow" has not had the code to handle the exception, so it was added.
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessageToAllNow("MasterRefresh", cache.LangProject.MsFeatureSystemOA);
#pragma warning restore 618
break;
}
}
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/Morphology/MasterPhonFeatDlgListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ public override bool OnDialogInsertItemInVector(object argument)
// 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
// call "SendMessageToAllNow" has not had the code to handle the exception, so it was added.
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessageToAllNow("MasterRefresh", cache.LangProject.PhFeatureSystemOA);
#pragma warning restore 618
break;
}
}
Expand Down
8 changes: 8 additions & 0 deletions Src/LexText/Morphology/RespellerDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,9 @@ private void m_btnClose_Click(object sender, EventArgs e)
{
if (ChangesWereMade)
{
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("MasterRefresh", null);
#pragma warning restore 618
}
Close();
}
Expand Down Expand Up @@ -569,7 +571,9 @@ private void m_btnApply_Click(object sender, EventArgs e)

// On the other hand, we don't want to update the new wordform until after DoIt...it might not exist before,
// and we won't be messing up any existing occurrences.
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("ItemDataModified", m_cache.ServiceLocator.GetObject(m_respellUndoaction.NewWordform));
#pragma warning restore 618

ChangesWereMade = true;

Expand Down Expand Up @@ -1534,11 +1538,15 @@ private void CoreDoIt(ProgressDialogWorkingOn progress, Mediator mediator)
}
else
{
#pragma warning disable 618 // suppress obsolete warning
mediator.SendMessage("ItemDataModified", wfOld);
#pragma warning restore 618
}
}

#pragma warning disable 618 // suppress obsolete warning
mediator.SendMessage("ItemDataModified", wfNew);
#pragma warning restore 618

uuow.RollBack = false;
}
Expand Down
4 changes: 4 additions & 0 deletions Src/LexText/ParserUI/ParserListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ private void UpdateStatusPanelProgress()
{
string notification = m_parserConnection.GetAndClearNotification();
if (notification != null)
{
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("ShowNotification", notification);
#pragma warning restore 618
}
}
}
if (ParserActivityString == ParserUIStrings.ksIdle_ && m_timer.Enabled)
Expand Down
2 changes: 2 additions & 0 deletions Src/LexText/ParserUI/ParserReportDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public void ReparseWord(object sender, RoutedEventArgs e)
{
var button = sender as Button;
var parseReport = button.CommandParameter as ParseReport;
#pragma warning disable 618 // suppress obsolete warning
Mediator.SendMessage("TryThisWord", RemoveArrow(parseReport.Word));
#pragma warning restore 618
}

public void ShowWordAnalyses(object sender, RoutedEventArgs e)
Expand Down
2 changes: 2 additions & 0 deletions Src/XCore/xCoreInterfaces/BaseContextHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ private bool GetHelpText (string id, ref string caption, out string text)
{
var holder = new ToolTipHolder();
holder.ToolTip = text;
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage(command.MessageString + "ToolTip", holder);
#pragma warning restore 618
text = holder.ToolTip;
}
}
Expand Down
8 changes: 8 additions & 0 deletions Src/XCore/xCoreInterfaces/Choice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ private static UIItemDisplayProperties QueryDisplayProperties(ChoiceGroup group,
//OK, this is a little non-obvious
//first we allow anyone who knows about this specific command to influence how it is displayed
//why was it this way? m_mediator.SendMessage("Display"+this.m_idOfCorrespondingCommand, CommandObject, ref display);
#pragma warning disable 618 // suppress obsolete warning
mediator.SendMessage("Display" + command.Id, command, ref display);
#pragma warning restore 618


//but then, we also allow anyone who knows about this specific message that would be sent
Expand All @@ -283,7 +285,9 @@ private static UIItemDisplayProperties QueryDisplayProperties(ChoiceGroup group,
//And in this case, there may not be any actual code which knows about one of these commands,
//instead the code may be written to just listen for the "InsertRecord" message and then act
//upon its arguments which, in this example, would cause it to either insert a person or a company.
#pragma warning disable 618 // suppress obsolete warning
mediator.SendMessage("Display" + command.MessageString, command, ref display);
#pragma warning restore 618
return display;
}

Expand Down Expand Up @@ -396,7 +400,9 @@ override public UIItemDisplayProperties GetDisplayProperties()
// known group are those starting with ShowHiddenFields-), partly because they occur in settings
// files as well as the program. So we change any hyphens to underscore so that it's actually possible
// to implement the method that this code is looking for.
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("Display" + BoolPropertyName.Replace('-', '_'), null, ref display);
#pragma warning restore 618
if (display.Text.StartsWith("$"))
{
int iOfEquals = display.Text.IndexOf("=");
Expand Down Expand Up @@ -506,7 +512,9 @@ override public UIItemDisplayProperties GetDisplayProperties()
{
UIItemDisplayProperties display = new UIItemDisplayProperties(m_parent, Label, m_defaultVisible, ImageName, m_defaultVisible);
display.Checked = Checked;
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("Display"+ PropertyName, null, ref display);
#pragma warning restore 618

return display;
}
Expand Down
6 changes: 6 additions & 0 deletions Src/XCore/xCoreInterfaces/ChoiceGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,12 @@ override public UIItemDisplayProperties GetDisplayProperties()
// enabled items would be 'visible' and enabled was true by default.
UIItemDisplayProperties display =new UIItemDisplayProperties(this, this.Label,
this.m_defaultVisible, ImageName, this.m_defaultVisible);
#pragma warning disable 618 // suppress obsolete warning
if (this.PropertyName != null && this.PropertyName != string.Empty)
m_mediator.SendMessage("Display"+this.PropertyName, null, ref display);
else
m_mediator.SendMessage("Display"+this.Id, null, ref display);
#pragma warning restore 618

return display;
}
Expand Down Expand Up @@ -466,7 +468,9 @@ protected void PopulateFromList()
UIListDisplayProperties display = new UIListDisplayProperties(list);
display.PropertyName = PropertyName;
string wsSet = XmlUtils.GetOptionalAttributeValue(m_configurationNode, "wsSet");
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage("Display"+ ListId, wsSet, ref display);
#pragma warning restore 618

PropertyName = display.PropertyName;

Expand Down Expand Up @@ -651,7 +655,9 @@ private string CommandMessage
/// <param name="choice"></param>
private void HandleClickedWhenCommand(ListPropertyChoice choice)
{
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage(CommandMessage, choice.ParameterNode);
#pragma warning restore 618
}

protected bool IsAListGroup
Expand Down
2 changes: 2 additions & 0 deletions Src/XCore/xCoreInterfaces/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,9 @@ public void InvokeCommand()
using (new WaitCursor(Form.ActiveForm))
{
Logger.WriteEvent("Start: " + msgString);
#pragma warning disable 618 // suppress obsolete warning
m_mediator.SendMessage(msgString, this);
#pragma warning restore 618
Logger.WriteEvent("Done: " + msgString);
}
}
Expand Down
Loading
Loading