예제 #1
0
 public MainPage(ref Cactus cactus)
 {
     InitializeComponent();
     this.cactus = cactus;
     updateLable();
     updateProgress();
 }
예제 #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);
        }
예제 #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;
        }
예제 #4
0
 public App()
 {
     InitializeComponent();
     cactus   = Cactus.loadCactus();
     MainPage = new NavigationPage(new MainPage(ref cactus));
 }