Ejemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            Console.WriteLine("Starting config activity!");
            SetContentView(Resource.Layout.widget_config);
            base.OnCreate(savedInstanceState);

            var userIdText = FindViewById <TextView>(Resource.Id.config_userId);
            var oldUserId  = FindViewById <TextView>(Resource.Id.config_oldUserId);

            oldUserId.Text = "Old UserID: " + ScoreSaberWidget.GetUserId().ToString();
            var button = FindViewById <Button>(Resource.Id.config_button);

            button.Click += delegate
            {
                Console.WriteLine("Parsed User ID: " + userIdText.Text);
                ScoreSaberWidget.SetUserId(this, long.Parse(userIdText.Text));
                Intent resultValue = new Intent();
                SetResult(Result.Ok, resultValue);
                Finish();
            };
            var cancel = FindViewById <Button>(Resource.Id.config_cancel);

            cancel.Click += delegate
            {
                Intent resultValue = new Intent();
                SetResult(Result.Ok, resultValue);
                Finish();
            };
        }
Ejemplo n.º 2
0
 protected override void OnStart()
 {
     base.OnStart();
     Console.WriteLine("Refreshing ScoreSaberWiget!");
     ScoreSaberWidget.ScheduleUpdateNow(this);
     Finish();
 }