本文整理汇总了C#中eDriven.Core.Events.Event类的典型用法代码示例。如果您正苦于以下问题:C# Event类的具体用法?C# Event怎么用?C# Event使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Event类属于eDriven.Core.Events命名空间,在下文中一共展示了Event类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ChangeButtonColor
public void ChangeButtonColor(Event e)
{
// GUI lookup example
Button button = GuiLookup.FindComponent<Button>(gameObject, "button1");
if (null != button)
button.Color = Color.green;
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:7,代码来源:DataControlsDemoHandlers.cs
示例2: RemoveButtonColor
public void RemoveButtonColor(Event e)
{
// GUI lookup example
Button button = GuiLookup.GetComponent("button1") as Button;
if (null != button)
button.Color = Color.white;
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:7,代码来源:ButtonDemo.cs
示例3: RollOverHandler
private void RollOverHandler(Event e)
{
if (e.Target != this) // skin
return;
/*_tween = new Sequence(
Tween.New().SetOptions(
new TweenOption(TweenOptionType.Property, "Height"),
new TweenOption(TweenOptionType.Duration, 1f),
new TweenOption(TweenOptionType.Easer, (Tween.EasingFunction)Expo.EaseInOut),
new TweenOption(TweenOptionType.StartValueReader, new PropertyReader("Height")),
new TweenOption(TweenOptionType.EndValue, 400f),
new TweenOption(TweenOptionType.Target, this)
),
Tween.New().SetOptions(
new TweenOption(TweenOptionType.Property, "Width"),
new TweenOption(TweenOptionType.Duration, 1f),
new TweenOption(TweenOptionType.Easer, (Tween.EasingFunction)Expo.EaseInOut),
new TweenOption(TweenOptionType.StartValueReader, new PropertyReader("Width")),
new TweenOption(TweenOptionType.EndValue, 300f),
new TweenOption(TweenOptionType.Target, this)
)
);
_tween.Play();*/
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:25,代码来源:PanelSkin3.cs
示例4: MoveAreaMouseDownHandler
private void MoveAreaMouseDownHandler(Event e)
{
//Debug.Log("Mouse down: " + e.Target);
//if (e.Target != MoveArea)
// return;
//Debug.Log("MoveAreaMouseDownHandler: " + e.Target);
// Only allow dragging of pop-upped windows
if (Enabled && IsPopUp)
{
e.CancelAndStopPropagation();
// Calculate the mouse's offset in the window
//offsetX = event.stageX - x;
//offsetY = event.stageY - y;
BringToFront();
MouseEvent me = (MouseEvent) e;
_offset = me.GlobalPosition.Subtract(Transform.Position);
var sm = SystemEventDispatcher.Instance;
sm.AddEventListener(MouseEvent.MOUSE_MOVE, MoveAreaMouseMoveHandler, EventPhase.CaptureAndTarget);
sm.AddEventListener(MouseEvent.MOUSE_UP, MoveAreaMouseUpHandler, EventPhase.CaptureAndTarget);
_cursorId = CursorManager.Instance.SetCursor(CursorType.Move);
}
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:27,代码来源:Window.cs
示例5: PaintButtonGreen
public void PaintButtonGreen(Event e)
{
// GUI lookup example
Button button = GuiLookup.GetComponent("button1") as Button;
if (null != button)
button.Color = Color.green;
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:7,代码来源:ButtonDemo.cs
示例6: TimerHandler
private void TimerHandler(Event e)
{
Callback(Lines[_count]);
_count++;
if (_count >= Lines.Length)
_count = 0;
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:8,代码来源:TextRotator.cs
示例7: ClosingHandler
public void ClosingHandler(Event e)
{
Alert.Show("Combo box closing", string.Format(@"[{0}] received:
Type: {1}
Target: {2}
CurrentTarget: {3}", e.GetType(), e.Type, e.Target, e.CurrentTarget), AlertButtonFlag.Ok);
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:8,代码来源:DataControlsDemoHandlers.cs
示例8: OnPauseChanged
private void OnPauseChanged(Event e)
{
bool paused = (bool)((ValueEvent) e).Value;
Debug.Log("OnPauseChanged. Paused: " + paused);
if (paused)
_timer.Stop();
else
_timer.Start();
}
开发者ID:bwheatley,项目名称:edriven,代码行数:9,代码来源:ObjectCreator3.cs
示例9: ClickHandler
public void ClickHandler(Event e)
{
//Debug.Log("ClickHandler: " + e.Target);
Alert.Show("Event", string.Format(@"[{0}] received:
Type: {1}
Target: {2}
CurrentTarget: {3}", e.GetType(), e.Type, e.Target, e.CurrentTarget), AlertButtonFlag.Ok);
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:9,代码来源:DataControlsDemoHandlers.cs
示例10: RemoveDialog
public void RemoveDialog(Event e)
{
Button button = e.Target as Button;
if (button != null)
{
Dialog dialog = GuiLookup.FindParent<Dialog>(button);
PopupManager.Instance.RemovePopup(dialog);
}
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:9,代码来源:DialogDemoEventHandlers.cs
示例11: Info
public void Info(Event e)
{
Alert.Show(
"Info",
"This is the info message. The time is: " + DateTime.Now.ToLongTimeString(),
AlertButtonFlag.Ok,
new AlertOption(AlertOptionType.HeaderIcon, Resources.Load("Icons/information")),
new AlertOption(AlertOptionType.AddedEffect, _alertEffect)
);
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:10,代码来源:ButtonDemo.cs
示例12: OnReset
private static void OnReset(Event e)
{
Debug.Log("OnReset");
GameObject[] gameObjects = GameObject.FindGameObjectsWithTag("Cube");
// destroy all Cubes
foreach (GameObject o in gameObjects)
{
Destroy(o);
}
}
开发者ID:bwheatley,项目名称:edriven,代码行数:11,代码来源:ObjectCreator3.cs
示例13: IdleRollOverHandler
private void IdleRollOverHandler(Event e)
{
if (e.Target != _component)
return;
#if DEBUG
if (DebugMode)
{
Debug.Log("IdleRollOverHandler");
}
#endif
SystemManager.Instance.MouseMoveSignal.Connect(MouseMoveSlot);
//SystemManager.Instance.MouseUpSignal.Connect(MouseUpSlot);
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:13,代码来源:Resizable.cs
示例14: ClickHandler
public void ClickHandler(Event e)
{
//Debug.Log("ClickHandler: " + e.Target);
Alert.Show("Event",
string.Format(@"[{0}] received:
Type: {1}
Target: {2}
CurrentTarget: {3}", e.GetType(), e.Type,
e.Target, e.CurrentTarget), AlertButtonFlag.Ok,
new AlertOption(AlertOptionType.HeaderIcon, Resources.Load("Icons/information")),
new AlertOption(AlertOptionType.AddedEffect, _alertEffect)
);
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:14,代码来源:ButtonDemo.cs
示例15: KeyUpHandler
private void KeyUpHandler(Event e)
{
KeyboardEvent ke = (KeyboardEvent)e;
//Debug.Log("KeyUpHandler: " + ke.KeyCode);
if (KeyCode.Escape == ke.KeyCode)
{
//Debug.Log("DialogCloseOnEsc->Escape");
e.CancelAndStopPropagation();
//PopupManager.Instance.RemovePopup(_dialog);
if (Enabled)
_dialog.ExecCallback("cancel");
}
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:14,代码来源:DialogCloseOnEsc.cs
示例16: RollOverHandler
private void RollOverHandler(Event e)
{
if (e.Target != this) // skin
return;
//Debug.Log("RollOverHandler");
//RollOverEffect.Target = this;
//RollOverEffect.Play(_headerBackground);
new Parallel(
Tween.New().SetOptions(
new TweenOption(TweenOptionType.Property, "BackgroundColor"),
new TweenOption(TweenOptionType.Duration, 3f),
new TweenOption(TweenOptionType.Easer, (Tween.EasingFunction)Expo.EaseOut),
new TweenOption(TweenOptionType.StartValueReader, new PropertyReader("BackgroundColor")),
new TweenOption(TweenOptionType.EndValue, GetStyle("headerBackgroundRollOverColor")),
new TweenOption(TweenOptionType.Target, _headerBackground)
),
Tween.New().SetOptions(
new TweenOption(TweenOptionType.Property, "BackgroundColor"),
new TweenOption(TweenOptionType.Duration, 3f),
new TweenOption(TweenOptionType.Easer, (Tween.EasingFunction)Expo.EaseOut),
new TweenOption(TweenOptionType.StartValueReader, new PropertyReader("BackgroundColor")),
new TweenOption(TweenOptionType.EndValue, GetStyle("headerBackgroundRollOverColor")),
new TweenOption(TweenOptionType.Target, _controlBarBackground)
),
Tween.New().SetOptions(
new TweenOption(TweenOptionType.Property, "Rotation"),
new TweenOption(TweenOptionType.Duration, 2f),
new TweenOption(TweenOptionType.Easer, (Tween.EasingFunction)Expo.EaseInOut),
new TweenOption(TweenOptionType.StartValueReader, new PropertyReader("Rotation")),
new TweenOption(TweenOptionType.EndValue, 720f),
new TweenOption(TweenOptionType.Target, _backgroundImage)
)/*,
Tween.New().SetOptions(
new TweenOption(TweenOptionType.Property, "Height"),
new TweenOption(TweenOptionType.Duration, 2f),
new TweenOption(TweenOptionType.Easer, (Tween.EasingFunction)Expo.EaseOut),
new TweenOption(TweenOptionType.StartValueReader, new PropertyReader("Height")),
new TweenOption(TweenOptionType.EndValue, 200f),
new TweenOption(TweenOptionType.Target, _controlBarBackground)
)*/
).Play();
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:43,代码来源:PanelSkin4.cs
示例17: StartHandler
private void StartHandler(Event e)
{
#if DEBUG
if (DebugMode)
{
Debug.Log("StartHandler " + _component.Width + ", " + _component.Height);
}
#endif
if (null != _maskGraphics)
return; // already masking this component
_parent = _component.Parent ?? (_component is Stage ? _component : null);
if (null == _parent)
return; // we are not on the display list, so we have nothing to mask indeed
_maskGraphics = new LoadingMaskAnimator {
IncludeInLayout = false,
X = _component.X,
Y = _component.Y,
Width = _component.Width,
Height = _component.Height,
//Bounds = (Rectangle) _component.Bounds.Clone() // BEWARE! This was the reference bug (without Clone())!!!!!!!!!
};
_parent.AddChild(_maskGraphics);
LoadingEvent le = e as LoadingEvent;
if (null != le)
_maskGraphics.Message = le.Message;
// critical!
//_maskGraphics.Transform.Apply();
_maskGraphics.InvalidateTransform();
// subscribe to MOVE and RESIZE events of the component
// we shall be levitating just over the component
_component.AddEventListener(MoveEvent.MOVE, MoveHandler, EventPhase.Target);
_component.AddEventListener(ResizeEvent.RESIZE, ResizeHandler, EventPhase.Target);
_maskGraphics.Play();
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:42,代码来源:LoadingMaskPlugin.cs
示例18: ResetCollectionChangeHandler
/**
*
*/
private void ResetCollectionChangeHandler(Event e)
{
//var ce = e as CollectionEvent;
//if (ce != null)
//{
// if (ce.Kind == CollectionEventKind.ADD ||
// ce.Kind == CollectionEventKind.REMOVE)
// {
// //Debug.Log("ResetCollectionChangeHandler");
// // force reset here so first/middle/last skins
// // get reassigned
// if (null != DataGroup)
// {
// DataGroup.Layout.UseVirtualLayout = true;
// DataGroup.Layout.UseVirtualLayout = false;
// }
// }
//}
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:23,代码来源:ButtonBar.cs
示例19: IdleRollOutHandler
private void IdleRollOutHandler(Event e)
{
if (IsResizing)
return;
if (e.Target != _component)
return;
#if DEBUG
if (DebugMode)
{
Debug.Log("IdleRollOutHandler");
}
#endif
SystemManager.Instance.MouseMoveSignal.Disconnect(MouseMoveSlot);
//SystemManager.Instance.MouseUpSignal.Disconnect(MouseUpSlot);
/* Important (the source of the bug of right side cursor not dissapearing on roll out */
HideCursor();
if (_scanning)
{
StopScanning();
}
}
开发者ID:groov0v,项目名称:edriven-gui,代码行数:23,代码来源:Resizable.cs
示例20: OnChange
private void OnChange(Event e)
{
HttpServiceProgressEvent inEvent = (HttpServiceProgressEvent) e;
_dict[(HttpConnector) e.Target] = inEvent;
HttpServiceProgressEvent pe = new HttpServiceProgressEvent(HttpServiceProgressEvent.PROGRESS_CHANGE);
foreach (HttpServiceProgressEvent progressEvent in _dict.Values)
{
if (null == progressEvent)
continue;
pe.Total += progressEvent.Total;
pe.Active += progressEvent.Active;
pe.Finished += progressEvent.Finished;
}
#if DEBUG
if (DebugMode)
Debug.Log("HttpServiceProgressAggregator: " + pe);
#endif
DispatchEvent(pe);
}
开发者ID:bwheatley,项目名称:edriven,代码行数:24,代码来源:HttpServiceProgressAggregator.cs
注:本文中的eDriven.Core.Events.Event类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论