Esempio n. 1
0
 public MainPage(ref Cactus cactus)
 {
     InitializeComponent();
     this.cactus = cactus;
     updateLable();
     updateProgress();
 }
Esempio n. 2
0
        public static Cactus loadCactus()
        {
            Cactus newCactus;

            if (!File.Exists(SAVEPATH))
            {
                newCactus = new Cactus();
            }
            else
            {
                newCactus = JsonConvert.DeserializeObject <Cactus>(File.ReadAllText(SAVEPATH));
            }
            return(newCactus);
        }
Esempio n. 3
0
        public SettingsPage(ref Cactus cactus)
        {
            InitializeComponent();
            this.cactus = cactus;

            nameEntry.ValueText = cactus.name;

            lastWateredEntry.Date        = cactus.lastWatered;
            lastWateredEntry.MaximumDate = DateTime.Today;

            lastTurnedEntry.Date         = cactus.lastTurned;
            lastWateredEntry.MaximumDate = DateTime.Today;

            wateringStart.Date = cactus.makeThisYear(cactus.wateringStart);

            wateringEnd.Date = cactus.makeThisYear(cactus.wateringEnd);

            remiderTime.Time = cactus.reminderTime.TimeOfDay;
        }
Esempio n. 4
0
 public App()
 {
     InitializeComponent();
     cactus   = Cactus.loadCactus();
     MainPage = new NavigationPage(new MainPage(ref cactus));
 }