本文整理汇总了C#中ArrayList.AddEventListener方法的典型用法代码示例。如果您正苦于以下问题:C# ArrayList.AddEventListener方法的具体用法?C# ArrayList.AddEventListener怎么用?C# ArrayList.AddEventListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayList
的用法示例。
在下文中一共展示了ArrayList.AddEventListener方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateChildren
//.........这里部分代码省略.........
VGroup vGroup = new VGroup { PercentWidth = 100, PercentHeight = 100, Gap = 0 };
hGroup.AddChild(vGroup);
#region Header
/* Implement your own header logic here */
/*HGroup header = new HGroup {PercentWidth = 100, Gap = 0};
vGroup.AddChild(header);
for (int i = 0; i < 5; i++)
{
Button btnCol = new Button // example header
{
Text = "Column " + (i + 1),
ToggleMode = true,
PercentWidth = 100
};
btnCol.Click += delegate(Event e)
{
// sort, filder and refresh (do list.DataProvider = list.DataProvider)
};
header.AddChild(btnCol);
}*/
#endregion
#region List
List list = new List
{
Id = "list1",
PercentWidth = 100,
PercentHeight = 100,
DataProvider = _dataProvider,
LabelField = "FirstName", // this must be set due to list logic legacy (the field must exist in DTO)
SkinClass = typeof (ListSkin2),
ItemRenderer = new ItemRendererFactory<MyGridItemRenderer>()
};
vGroup.AddChild(list);
#endregion
#region Footer
HGroup footer = new HGroup { PercentWidth = 100, Gap = 30, PaddingLeft = 10, PaddingRight = 10, PaddingTop = 10, PaddingBottom = 0 };
vGroup.AddChild(footer);
_lblSum = new Label {Text = "Age sum: ", StyleName = "footer" };
footer.AddChild(_lblSum);
_lblNumberOfSelectedItems = new Label { Text = "Driving licenses: ", StyleName = "footer" };
footer.AddChild(_lblNumberOfSelectedItems);
UpdateFooter();
#endregion
#endregion
#region Process renderer click
AddEventListener(MyGridItemRenderer.ADD_BUTTON_CLICKED, delegate(Event e)
{
IItemRenderer itemRenderer = (IItemRenderer)e.Target;
Alert.Show("Info", itemRenderer.Data.ToString(), AlertButtonFlag.Ok,
new AlertOption(AlertOptionType.HeaderIcon, (object) ImageLoader.Instance.Load("Icons/information")));
});
AddEventListener(MyGridItemRenderer.EDIT_BUTTON_CLICKED, delegate(Event e)
{
var editor = new ExamplePopupEditor {
Title = "Edit",
Icon = ImageLoader.Instance.Load("Icons/edit"),
Data = ((MyGridItemRenderer) e.Target).Data,
CloseOnEsc = true
};
editor.AddEventListener(CloseEvent.CLOSE, delegate
{
PopupManager.Instance.RemovePopup(editor);
});
PopupManager.Instance.AddPopup(editor, true);
});
#endregion
#region Process property change
_dataProvider.AddEventListener(PropertyChangeEvent.PROPERTY_CHANGE, delegate(Event e)
{
//PropertyChangeEvent pce = (PropertyChangeEvent) e;
//Debug.Log(pce.NewValue);
UpdateFooter();
});
#endregion
}