本文整理汇总了C#中ButtonType类的典型用法代码示例。如果您正苦于以下问题:C# ButtonType类的具体用法?C# ButtonType怎么用?C# ButtonType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ButtonType类属于命名空间,在下文中一共展示了ButtonType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: AddButton
// ajouter un bouton dans le panel
public void AddButton(ButtonType type)
{
string name = type.Value;
GameObject btn = Resources.Load("Prefabs/OptionButton/" + name) as GameObject;
if (btn != null)
instanciateButton(btn);
else
Debug.LogError("Prefab : \"Prefabs/OptionButton/" + name + "\" introuvable");
}
开发者ID:CanPayU,项目名称:SuperSwungBall,代码行数:10,代码来源:SettingsController.cs
示例17: Button
public Button(ButtonType buttonType, Vector2 position)
{
if (buttonType == ButtonType.SHOOT)
sources = shootSources;
else if (buttonType == ButtonType.BOMB)
sources = bombSources;
this.Position = position;
}
开发者ID:kulhajs,项目名称:wp_planes,代码行数:9,代码来源:Button.cs
示例18: Button
/*
Constructor must specify both Controller and Button Type
*/
public Button(ControlType control,ButtonType button) {
_controlType = control;
_buttonType = button;
_virtualName = "joystick";
if (_controlType != ControlType.Any) {
_virtualName += " " + ((int)(_controlType));
}
_virtualName += " button " + ((int)(_buttonType));
}
开发者ID:shingokko,项目名称:combocannon,代码行数:12,代码来源:Button.cs
示例19: attr
/// <summary>Assigns all needed attributes to the tag</summary>
/// <returns>This instance downcasted to base class</returns>
public virtual IndexedTag attr(
string name = null,
string value = null,
ButtonType? type = null,
Disabled? disabled = null,
string id = null,
string @class = null,
string style = null,
string title = null,
LangCode lang = null,
string xmllang = null,
Dir? dir = null,
string onclick = null,
string ondblclick = null,
string onmousedown = null,
string onmouseup = null,
string onmouseover = null,
string onmousemove = null,
string onmouseout = null,
string onkeypress = null,
string onkeydown = null,
string onkeyup = null,
char? accesskey = null,
int? tabindex = null,
string onfocus = null,
string onblur = null
)
{
Name = name;
Value = value;
Type = type;
Disabled = disabled;
Id = id;
Class = @class;
Style = style;
Title = title;
Lang = lang;
XmlLang = xmllang;
Dir = dir;
OnClick = onclick;
OnDblClick = ondblclick;
OnMouseDown = onmousedown;
OnMouseUp = onmouseup;
OnMouseOver = onmouseover;
OnMouseMove = onmousemove;
OnMouseOut = onmouseout;
OnKeyPress = onkeypress;
OnKeyDown = onkeydown;
OnKeyUp = onkeyup;
AccessKey = accesskey;
TabIndex = tabindex;
OnFocus = onfocus;
OnBlur = onblur;
return this;
}
开发者ID:bzure,项目名称:BSA.Net,代码行数:58,代码来源:TagButton.cs
示例20: Button
public Button(ButtonType buttonType, Id id, Vector2 position)
{
this.ButtonType = buttonType;
this.Id = id;
this.Position = position;
if (this.ButtonType != mtg_lifecounter.ButtonType.Menu)
this.Rotation = Id == mtg_lifecounter.Id.One ? FPI / 2 : 3 * FPI / 2;
else
this.Rotation = 0;
}
开发者ID:kulhajs,项目名称:mtg_lifecounter,代码行数:10,代码来源:Button.cs
注:本文中的ButtonType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论