예제 #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_game);
            Obj_Game_Mode = Intent.GetSerializableExtra("Mode");
            Typeface KremlinTF = Typeface.CreateFromAsset(this.Assets, "kremlin.ttf");

            TimeTimer.Interval = 1000;
            TimeTimer.Elapsed += TimeTimer_Elapsed;

            ScreenHeight = (Resources.DisplayMetrics.HeightPixels);
            ScreenWidth  = (Resources.DisplayMetrics.WidthPixels);

            //Console.WriteLine("SCREEN HEIGHT IS {0} /n SCREEN WIDTH IS {1}", ScreenHeight, ScreenWidth);

            // Declaring views from activity
            Obj_Game_Grid = (GridLayout)FindViewById(Resource.Id.Game_Grid);
            TimeScore     = (TextView)FindViewById(Resource.Id.Time_TxtView);
            TurnScore     = (TextView)FindViewById(Resource.Id.Turns_TxtView);

            // Set window fade in animation
            Window.SetWindowAnimations(Android.Resource.Animation.FadeIn);

            // Setup view variables
            TimeScore.SetTypeface(KremlinTF, TypefaceStyle.Normal);
            TurnScore.SetTypeface(KremlinTF, TypefaceStyle.Normal);

            CreateGridFromMode(Obj_Game_Mode.ToString());
            Randomizer(Obj_Game_Mode.ToString());
        }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_game);
            Obj_Game_Mode = Intent.GetSerializableExtra("Mode");
            Typeface KremlinTF = Typeface.CreateFromAsset(this.Assets, "kremlin.ttf");

            //TimeTimer.Interval = 1000;
            //TimeTimer.Elapsed += TimerEventProcessor();

            // Declaring views from activity
            Obj_Game_Grid = (GridLayout)FindViewById(Resource.Id.Game_Grid);
            TimeScore     = (TextView)FindViewById(Resource.Id.Time_TxtView);
            TurnScore     = (TextView)FindViewById(Resource.Id.Turns_TxtView);

            // Set window fade in animation
            Window.SetWindowAnimations(Android.Resource.Animation.FadeIn);

            // Setup view variables
            TimeScore.SetTypeface(KremlinTF, TypefaceStyle.Normal);
            TurnScore.SetTypeface(KremlinTF, TypefaceStyle.Normal);

            CreateGridFromMode(Obj_Game_Mode.ToString());
            Randomizer(Obj_Game_Mode.ToString());
        }
예제 #3
0
 public static Intent putExtra(this Intent intent, string name, Java.IO.ISerializable value)
 {
     return(intent.PutExtra(name, value));
 }