예제 #1
0
        public MainPage()
        {

           
            VerifToken();
           
            SettingsPane.GetForCurrentView().CommandsRequested -= _CommandsRequested;
            this.InitializeComponent();
            this.ChangeCalendar.Content = IConstantes.BUTTON_SWITCH_CALENDAR;
            this.Day.Content = IConstantes.BUTTON_DAY;
            this.Week.Content = IConstantes.BUTTON_WEEK;
            this.Month.Content = IConstantes.BUTTON_MONTH;

            _dateMain = DateTime.Now;
            icalendar = new WeekBorderCalendar(ref _dateMain);
            contenuPage.Content = icalendar;
            contentPage = contenuPage;
            ObservableCollection<object> list = new ObservableCollection<object>();
            this._calendars = list.ToObservableVector<object>();

           

            if (first)
            {
                SettingsPane.GetForCurrentView().CommandsRequested += _CommandsRequested;
                first = false;
            }
        }
예제 #2
0
        private void week_click(object sender, RoutedEventArgs e)
        {

            if (_dateMain.DayOfWeek != DayOfWeek.Monday)
            {

                while (_dateMain.DayOfWeek != DayOfWeek.Monday)
                    _dateMain = _dateMain.AddDays(-1);

            }

            icalendar = new WeekBorderCalendar(_calendars, ref _dateMain);

            contenuPage.Content = icalendar;

        }
예제 #3
0
        public async Task GetCalendars()
        {
            GoogleCalendar.CalendarControler controler = new GoogleCalendar.CalendarControler();

            List<CalendarListEntry> calendars = await controler.GetAllCalendars();

            CalendarViewModel defaultCal = new CalendarViewModel(calendars.Last());
                this._calendars.Add(defaultCal);

                icalendar = new WeekBorderCalendar(_calendars, ref _dateMain);

              contenuPage.Content = icalendar;
        }