本文整理汇总了C#中ACAT.Lib.Core.WidgetManagement.Widget.GetText方法的典型用法代码示例。如果您正苦于以下问题:C# Widget.GetText方法的具体用法?C# Widget.GetText怎么用?C# Widget.GetText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACAT.Lib.Core.WidgetManagement.Widget
的用法示例。
在下文中一共展示了Widget.GetText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnWidgetActuated
/// <summary>
/// Triggered when the user actuates a widget
/// </summary>
/// <param name="widget">widget actuated</param>
/// <param name="handled">was this handled?</param>
public void OnWidgetActuated(Widget widget, ref bool handled)
{
switch (widget.Value)
{
case "@Phrase1":
case "@Phrase2":
case "@Phrase3":
case "@Phrase4":
case "@Phrase5":
case "@Phrase6":
case "@Phrase7":
case "@Phrase8":
case "@Phrase9":
handled = true;
String text = widget.GetText().Trim();
if (!String.IsNullOrEmpty(text))
{
Context.AppTTSManager.ActiveEngine.Speak(text);
}
break;
}
_alphabetScannerCommon.OnWidgetActuated(widget, ref handled);
}
示例2: setTitle
private void setTitle(Widget widget)
{
if (widget is PictureBoxWidget)
{
PictureBoxWidget pictureBoxWidget = widget as PictureBoxWidget;
TaskData taskData = pictureBoxWidget.UserData as TaskData;
Log.Debug("Setting title to " + taskData.Title.ToString());
Windows.SetText(Title, taskData.Title.ToString());
}
else
{
Windows.SetText(Title, widget.GetText());
}
}