static void Main() { int index = 11; //int index = Convert.ToInt32(ConfigurationManager.AppSettings["game"]); GameDictionary obj = new GameDictionary(); IDictionary <int, Game> dictionary = obj.GetGameDictionary(); Game game = null; try { game = dictionary[index]; game.Window.Title = $"Demo{index}Game"; game.IsMouseVisible = true; game.Run(); } finally { if (null != game) { game.Dispose(); } } }
internal static void RunGame() { int index = 11; GameDictionary obj = new GameDictionary(); IDictionary <int, Game> dictionary = obj.GetGameDictionary(); Game game = dictionary[index]; game.Window.Title = $"Demo{index}Game"; game.IsMouseVisible = true; game.Run(); }
protected override void OnCreate(Bundle bundle) { int index = 11; base.OnCreate(bundle); GameDictionary obj = new GameDictionary(); IDictionary <int, Game> dictionary = obj.GetGameDictionary(); Game game = dictionary[index]; game.Window.Title = $"Demo{index}Game"; game.IsMouseVisible = true; SetContentView((View)game.Services.GetService(typeof(View))); game.Run(); }