本文整理汇总了C#中IGame.GetNextAssignment方法的典型用法代码示例。如果您正苦于以下问题:C# IGame.GetNextAssignment方法的具体用法?C# IGame.GetNextAssignment怎么用?C# IGame.GetNextAssignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IGame
的用法示例。
在下文中一共展示了IGame.GetNextAssignment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnCreate
protected override void OnCreate(Bundle savedInstance)
{
base.OnCreate(savedInstance);
SetContentView(R.Layout.MainLayout);
var actionBar = GetActionBar();
actionBar.SetNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
//actionBar.SetListNavigationCallbacks(ArrayAdapter<string>.CreateFromResource(this, R.Arrays.gameType_array, R.Layout.TextView),
// this);
//actionBar.SetListNavigationCallbacks(ArrayAdapter<string>.CreateFromResource(this, R.Arrays.gameType_array, Android.R.Layout.Simple_spinner_item),
// this);
var adapter = ArrayAdapter<string>.CreateFromResource(this, R.Arrays.gameType_array, Android.R.Layout.Simple_spinner_item);
adapter.SetDropDownViewResource(Android.R.Layout.Simple_spinner_dropdown_item);
actionBar.SetListNavigationCallbacks(adapter, this);
tvAnswer = (TextView)FindViewById(R.Id.answer);
tvQuestion = (TextView)FindViewById(R.Id.question);
tvResult = (TextView)FindViewById(R.Id.result);
var btn = (Button)FindViewById(R.Id.cmd0);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd1);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd2);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd3);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd4);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd5);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd6);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd7);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd8);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.cmd9);
btn.Click += new EventHandler(btn_Click);
btn = (Button)FindViewById(R.Id.Ok);
btn.Click += new EventHandler(btnOk_Click);
btn = (Button)FindViewById(R.Id.Erase);
btn.Click += new EventHandler(btnErase_Click);
var gamePreferences = new Preferences();
gamePreferences.RetrievePreferences(GetSharedPreferences("GamePreferences", 0));
gameParameterFactory.Preferences = gamePreferences;
game = GameFactory.GetGame(gameType, gameParameterFactory);
tvQuestion.SetText(game.GetNextAssignment());
}
示例2: OnNavigationItemSelected
public bool OnNavigationItemSelected(int itemPosition, long itemId)
{
switch (itemPosition)
{
case 0:
gameType = "Multiply";
break;
case 1:
gameType = "Divide";
break;
case 2:
gameType = "Add";
break;
case 3:
gameType = "Subtract";
break;
default:
break;
}
game = GameFactory.GetGame(gameType, gameParameterFactory);
tvQuestion.SetText(game.GetNextAssignment());
return true;
}
示例3: OnActivityResult
protected override void OnActivityResult(int requestCode, int resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK)
{
var gamePreferences = new Preferences();
gamePreferences.RetrievePreferences(GetSharedPreferences("GamePreferences", MODE_MULTI_PROCESS));
gameParameterFactory.Preferences = gamePreferences;
game = GameFactory.GetGame(gameType, gameParameterFactory);
tvQuestion.SetText(game.GetNextAssignment());
}
}