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


C# ButtonType类代码示例

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


ButtonType类属于命名空间,在下文中一共展示了ButtonType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ButtonLabelForType

		public String ButtonLabelForType (ButtonType type)
		{
			switch (type) {
			case ButtonType.Free:
				return "Free()";

			case ButtonType.Release:
				return "[Release]";

			case ButtonType.AutoRelease:
				return "[AutoRelease]";

			case ButtonType.DeAlloc:
				return "[DeAlloc]";

			case ButtonType.GC:
				return "Garbage Collection";

			case ButtonType.ARC:
				return "ARC!";
			default:
				break;

			}
			return null;
		}
开发者ID:BoogieMAN2K,项目名称:monotouch-samples,代码行数:26,代码来源:ButtonCollectionView.cs

示例2: SetButton

 public void SetButton(ButtonType btn, bool value)
 {
     if( value )
         buttons = buttons | btn; // set on
     else
         buttons = buttons & ~btn; // set off
 }
开发者ID:bzgeb,项目名称:unity-input,代码行数:7,代码来源:InputState.cs

示例3: TypeButtonPressed

 public static void TypeButtonPressed(object sender, ButtonType button)
 {
     if (TypeButtonChanged != null)
     {
         TypeButtonChanged(sender, new TypeButtonEventArgs(button));
     }
 }
开发者ID:SexySicilianSoprano,项目名称:thegreatdeepblue,代码行数:7,代码来源:GUIEvents.cs

示例4: SendDownEvent

    private void SendDownEvent( ButtonType button )
    {
        //Debug.Log( "Button: " + button );

        if( OnButtonDown != null )
            OnButtonDown( button );
    }
开发者ID:nolanfilter,项目名称:ProjectDeath,代码行数:7,代码来源:InputController.cs

示例5: TypeButton

    public TypeButton(ButtonType type, Rect menuArea)
    {
        m_ButtonType = type;

        CalculateSize (menuArea);

        //Create Style

        if (m_ButtonType == ButtonType.Building){

            m_ButtonStyle = GUIStyles.CreateTypeButtonStyleB();
            Debug.Log (m_ButtonType);
        }

        if (m_ButtonType == ButtonType.Ship){

            m_ButtonStyle = GUIStyles.CreateTypeButtonStyleSh();
            Debug.Log (m_ButtonType);

        }

        if (m_ButtonType == ButtonType.Science){

            m_ButtonStyle = GUIStyles.CreateTypeButtonStyleSc();
            Debug.Log (m_ButtonType);
        }

        //Attach to events
        GUIEvents.TypeButtonChanged += ButtonPressedEvent;
    }
开发者ID:SexySicilianSoprano,项目名称:thegreatdeepblue,代码行数:30,代码来源:TypeButton.cs

示例6: ButtonCell

		public ButtonCell()
		{
			title = "Button";
			buttonType = ButtonType.MomentaryLight;
			bezelStyle = BezelStyle.Rounded;
			buttonState = ButtonState.Unchecked;
		}
开发者ID:nagyist,项目名称:monoxide,代码行数:7,代码来源:ButtonCell.cs

示例7: OnClick

 void OnClick()
 {
     switch (type)
     {
         case ButtonType.Play:
             GameDirector.gameInstance.ResetGame();
             break;
         case ButtonType.Credits:
             break;
         case ButtonType.Pause:
             GameDirector.gameInstance.PauseGame();
             GUIManager.guiInstance.ShowGamePausedPanel();
     //                type = ButtonType.Resume;
             break;
         case ButtonType.Resume:
             GameDirector.gameInstance.ResumeGame();
             GUIManager.guiInstance.ShowInGamePanel();
     //                type = ButtonType.Pause;
             break;
         case ButtonType.Share:
             FacebookManager.facebookInstance.PostOnFacebook();
             type = ButtonType.Share;
             break;
         case ButtonType.GoHome:
             GUIManager.guiInstance.ShowStartPanel();
             break;
         case ButtonType.Leaderboard:
             GUIManager.guiInstance.ShowLeaderboardPanel();
             break;
     }
 }
开发者ID:kishoreven1729,项目名称:MuffinV3,代码行数:31,代码来源:ButtonControl.cs

示例8: CreateButton

		public static IDataControlButton CreateButton (ButtonType type, Control container, string text, string image, string command, string commandArg, bool allowCallback)
		{
			IDataControlButton btn;

			switch (type) {
			case ButtonType.Link:
				btn = new DataControlLinkButton ();
				break;
			case ButtonType.Image:
				btn = new DataControlImageButton ();
				btn.ImageUrl = image;
				break;
			default:
				btn = new DataControlButton ();
				break;
			}

			btn.Container = container;
			btn.CommandName = command;
			btn.CommandArgument = commandArg;
			btn.Text = text;
			btn.CausesValidation = false;
			btn.AllowCallback = allowCallback;

			return btn;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:26,代码来源:DataControlButton.cs

示例9: GetButtonDown

    public bool GetButtonDown(ButtonType buttonType)
    {
        if( currentState.GetButton(buttonType) && !lastState.GetButton(buttonType))
            return true;

        return false;
    }
开发者ID:bzgeb,项目名称:unity-input,代码行数:7,代码来源:InputDevice.cs

示例10: OnButtonClick

    private void OnButtonClick(ButtonType type)
    {
        string account = accountInput.text;
		string password = passwordInput.text;
		Debug.Log("---"+account+"---" + password);
        if(account.Equals(""))
        {
            ShowErrorMsg("账号不能为空");
            return;
        }
		if (password.Equals("")) 
		{
			ShowErrorMsg ("密码不能为空");
			return;
		}

        if(type == ButtonType.LOGIN)
        {
			AccountController.Instance.SendLoginRequest(account, password);
        }
        else if(type == ButtonType.REGIST)
        {
			AccountController.Instance.SendRegistRequest(account, password);
        }
    }
开发者ID:goome,项目名称:eternal-client,代码行数:25,代码来源:LoginUI.cs

示例11: GetButtonUp

    public bool GetButtonUp(ButtonType buttonType)
    {
        if( !currentState.GetButton(buttonType) && lastState.GetButton(buttonType))
            return true;

        return false;
    }
开发者ID:bzgeb,项目名称:unity-input,代码行数:7,代码来源:InputDevice.cs

示例12: ControlButton

 /// <summary>
 /// 根据按钮类型实例化按钮
 /// </summary>
 public ControlButton(ButtonType buttonType)
 {
     this.Type = buttonType;
     StateLast = ButtonState.Released;
     StateNow = ButtonState.Released;
     //将按钮添加到按钮列表
     buttonList.Add(this);
 }
开发者ID:godbanyan,项目名称:new,代码行数:11,代码来源:ControlButton.cs

示例13: MessageForm

 public MessageForm(string info,string title,ButtonType buttonType)
 {
     this.info=info;
     this.title=title;
     this.buttonType=buttonType;
     InitializeComponent();
     this.BackgroundImage=new Bitmap(GetType(),"images.message.jpg");
 }
开发者ID:algz,项目名称:GDIDrawFlow,代码行数:8,代码来源:MessageForm.cs

示例14: OnButtonClick

    public override void OnButtonClick(ButtonType button)
    {
        if( ButtonType.ButtonWinGame == button )
            gameManager.NewGameState(gameManager.stateGameWon);

        if( ButtonType.ButtonLoseGame == button )
            gameManager.NewGameState(gameManager.stateGameLost);
    }
开发者ID:supercid,项目名称:unity-5-cookbook-codes,代码行数:8,代码来源:StateGamePlaying.cs

示例15: GetButton

 public string GetButton(ButtonType buttonType)
 {
     foreach(ButtonMapping mapping in buttonMappings)
     {
         if( mapping.target == buttonType )
             return mapping.button;
     }
     return "";
 }
开发者ID:bzgeb,项目名称:unity-input,代码行数:9,代码来源:InputDeviceConfig.cs


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