private void handleWidgetSelection(Widget widget, ref bool handled)
{
// the user actuated an abbreviation in the list
if (widget.UserData is Abbreviation)
{
Abbreviation a = (Abbreviation)widget.UserData;
TTSManager.Instance.ActiveEngine.Speak(a.Expansion);
handled = true;
}
else
{
handled = true;
switch (widget.Value)
{
case "@Quit":
if (EvtDone != null)
{
EvtDone.BeginInvoke(false, null, null);
}
break;
case "@AbbrListSort":
switchSortOrder();
break;
case "@AbbrListNextPage":
gotoNextPage();
break;
case "@AbbrListPrevPage":
gotoPreviousPage();
break;
case "@AbbrListClearFilter":
ClearFilter();
break;
case "@AbbrListSearch":
if (EvtShowScanner != null)
{
EvtShowScanner.BeginInvoke(null, null, null, null);
}
break;
default:
handled = false;
break;
}
}
}