public MainPage(ref Cactus cactus) { InitializeComponent(); this.cactus = cactus; updateLable(); updateProgress(); }
public static Cactus loadCactus() { Cactus newCactus; if (!File.Exists(SAVEPATH)) { newCactus = new Cactus(); } else { newCactus = JsonConvert.DeserializeObject <Cactus>(File.ReadAllText(SAVEPATH)); } return(newCactus); }
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; }
public App() { InitializeComponent(); cactus = Cactus.loadCactus(); MainPage = new NavigationPage(new MainPage(ref cactus)); }