当前位置: 首页>>代码示例>>C#>>正文


C# Events.Event类代码示例

本文整理汇总了C#中eDriven.Core.Events.Event的典型用法代码示例。如果您正苦于以下问题:C# Event类的具体用法?C# Event怎么用?C# Event使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Event类属于eDriven.Core.Events命名空间,在下文中一共展示了Event类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的eDriven.Core.Events.Event类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。