本文整理汇总了C#中IWidget类的典型用法代码示例。如果您正苦于以下问题:C# IWidget类的具体用法?C# IWidget怎么用?C# IWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IWidget类属于命名空间,在下文中一共展示了IWidget类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CamerasTimeline
public CamerasTimeline(IWidget widget)
: base(widget)
{
secondsPerPixel = 0.1;
Accuracy = Constants.TIMELINE_ACCURACY;
SelectionMode = MultiSelectionMode.MultipleWithModifier;
}
示例2: VerifyLanguageTokens
private static void VerifyLanguageTokens(Dictionary<IWidgetFile, Dictionary<string, MissingResourceInfo>> problems,
IWidget parent,
IWidgetFile widget,
IEnumerable<string> tokens)
{
foreach (string token in tokens)
{
foreach (string languageName in parent.Languages.Keys)
{
if (parent.Languages[languageName].Keys.Contains(token) == false)
{
if (!problems.ContainsKey(parent))
{
problems.Add(parent, new Dictionary<string, MissingResourceInfo>());
}
problems[parent][languageName] = new MissingResourceInfo
{
FileName = widget.FileName,
LanguageName = languageName,
ResourceName = token
};
}
}
}
}
示例3: Create
/// <summary>
/// PopupMenu生成
/// </summary>
/// <param name="parent">親</param>
/// <returns></returns>
public override int Create(IWidget parent)
{
if( !IsAvailable ) {
this.CreateMotifWidget(Native.Motif.CreateSymbol.XmCreatePopupMenu, parent, ToolkitResources);
}
return base.Create (parent);
}
示例4: AddChild
/**
* Override the AddChild function
*/
public override void AddChild(IWidget child)
{
if (child is Screen)
{
MoSync.Util.RunActionOnMainThreadSync(() =>
{
mAddChildDelegate = delegate()
{
if (mPage.Children.Count > 0)
{
mPage.Children.RemoveAt(mPage.Children.Count - 1);
}
mPage.Children.Add((child as Screen).View);
Grid.SetColumn(mPage.Children[mPage.Children.Count - 1] as Grid, 0);
Grid.SetRow(mPage.Children[mPage.Children.Count - 1] as Grid, 0);
ToggleApplicationBar((child as Screen));
};
MoSyncScreenTransitions.doScreenTransition(mAddChildDelegate, mPushTransitionType);
});
/**
* Manualy add the child to the children array
*/
mChildren.Add(child);
(child as Screen).SetParent(this);
}
}
示例5: GetWidgets
public IWidget[] GetWidgets()
{
var widgets = new IWidget[_dictionary.Values.Count];
_dictionary.Values.CopyTo(widgets, 0);
return widgets;
}
示例6: WidgetPanoramaItem
public WidgetPanoramaItem(SpriteBatch sb, IWidget button)
{
_sb = sb;
_button = button;
_centerOffset = new Vector2(sb.GraphicsDevice.Viewport.Width, sb.GraphicsDevice.Viewport.Height)/2f;
SetDrawOffset(Vector2.Zero);
}
示例7: RemoveWidgetFromList
private void RemoveWidgetFromList(IWidget widget)
{
if (widget.IsVisible)
widgets.Remove(widget);
else
notVisibleWidgets.Remove(widget);
}
示例8: WidgetList
/// <summary>
/// Widgetの配列から
/// </summary>
/// <param name="tabs">Tab配列</param>
public WidgetList(IWidget[] tabs)
{
widgetList = new List<IWidget>();
for (int i=0; i < tabs.Length; i++) {
widgetList.Add(tabs[i]);
}
}
示例9: Contains
private bool Contains(IWidget widget)
{
if (widget == null)
return false;
return widgets.Contains(widget) || notVisibleWidgets.Contains(widget);
}
示例10: TextWidget
public TextWidget(IWidget attachedWidget)
{
this.attachedWidget = attachedWidget;
Canvas.SetLeft(this, 0);
Canvas.SetTop(this, 0);
}
示例11: Create
public override int Create( IWidget parent )
{
if( !IsAvailable ) {
this.CreateMotifWidget(Native.Motif.CreateSymbol.XmCreateBulletinBoardDialog, parent, ToolkitResources);
}
return base.Create (parent);
}
示例12: can_override_array
public void can_override_array()
{
var array = new IWidget[0];
container.Inject(array);
container.GetInstance<IWidget[]>()
.ShouldBeTheSameAs(array);
}
示例13: RemoveWidget
public void RemoveWidget(IWidget widget)
{
if (!Contains(widget))
return;
RemoveWidgetFromList(widget);
widget.VisibilityChanged -= VisibilityChangedHandler;
}
示例14: Setup
public void Setup(IWidget widget, FlexibleLayoutEditorContext context, IEditorService edsvc)
{
_widget = widget;
_xml = _widget.ToXml();
_widgetInfo = context.GetWidgetInfo(widget.Type);
btnWidgetInfo.Enabled = (_widgetInfo != null);
txtXmlContent.Text = _xml;
}
示例15: TimersTimeline
public TimersTimeline(IWidget widget)
: base(widget)
{
secondsPerPixel = 0.1;
Accuracy = VASDrawing.Constants.TIMELINE_ACCURACY;
SelectionMode = MultiSelectionMode.MultipleWithModifier;
HeightRequest = VASDrawing.Constants.TIMER_HEIGHT;
}