Exemple #1
0
        public TabataPCL.Tabata CreateTabata()
        {
            var newTabata = new TabataPCL.Tabata(int.Parse(intervalText.Text),
                                                 int.Parse(restText.Text), int.Parse(setsText.Text));

            return(newTabata);
        }
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear (animated);

            _currentTabata = AppDelegate.CurrentTabata;
            _currentTabata.ResetTabata ();
            timeLeftLabel.Text = _currentTabata.WorkTime.ToString ();
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            // Override point for customization after application launch.
            // If not required for your application you can safely delete this method

            CurrentTabata = new Tabata (3, 5, 2);

            return true;
        }
        public override void WillActivate()
        {
            base.WillActivate ();

            WKInterfaceController.OpenParentApplication(new NSDictionary(), (reply, error) => {
                _currentTabata = new Tabata(
                    int.Parse(reply["restTime"].ToString()),
                    int.Parse(reply["workTime"].ToString()),
                    int.Parse(reply["sets"].ToString())
                );
            });

            workoutButton.SetTitle (new NSAttributedString ("Go!", _stopStringAttrs));
            workoutButton.SetBackgroundColor (UIColor.Clear);
        }