Exemple #1
0
 private static void CreateTestEvents()
 {
     calendar.CreateEvent(new CalendarEvent("Today", "Content", "Location", period.Today().Start, period.Today().End));
     calendar.CreateEvent(new CalendarEvent("Tomorrow", "Content", "Location", period.Tomorrow().Start, period.Tomorrow().End));
     calendar.CreateEvent(new CalendarEvent("This Week Wednesday", "Content", "Location", period.ThisWeek().Start.AddDays(2), period.ThisWeek().Start.AddDays(2).AddHours(5)));
     calendar.CreateEvent(new CalendarEvent("Next Week Friday", "Content", "Location", period.NextWeek().Start.AddDays(4), period.NextWeek().Start.AddDays(4).AddHours(5)));
     calendar.CreateEvent(new CalendarEvent("This Month 20", "Content", "Location", period.ThisMonth().Start.AddDays(19), period.ThisMonth().Start.AddDays(19).AddHours(5)));
     calendar.CreateEvent(new CalendarEvent("Next Month 25", "Content", "Location", period.NextMonth().Start.AddDays(24), period.NextMonth().Start.AddDays(24).AddHours(5)));
     //calendar.CreateEvent(new CalendarEvent("Next + 3 Month Single (last month 19)", "Content", "Location", period.NextNMonth(3, true).Start.AddDays(18), period.NextNMonth(3, true).Start.AddDays(18).AddHours(5)));
     //calendar.CreateEvent(new CalendarEvent("Next + 3 Month Period (+ 2 month 17)s", "Content", "Location", period.NextNMonth(2, false).Start.AddMonths(2).AddDays(16), period.NextNMonth(2, false).Start.AddMonths(2).AddDays(16).AddHours(5)));
 }
Exemple #2
0
        static void Main(string[] args)
        {
            GoogleCalendar gCalendar = new GoogleCalendar(credentialsPath);

            gCalendar.ShowUpCommingEvent();
            gCalendar.CreateEvent();
        }
        public IActionResult Authorize()
        {
            var googleCalendar = new GoogleCalendar("mycalendar_credentials.json");
            var events         = googleCalendar.ShowUpCommingEvent();

            googleCalendar.CreateEvent();
            return(View("Index", events));
        }
        //Agrega un evento al calendario del usuario
        private void BotonAgregarEvento_Click(object sender, RoutedEventArgs e)
        {
            Event evento = Evento;


            TimeSpan hora = new TimeSpan(int.Parse(ComboBoxHoras.SelectedItem.ToString()), int.Parse(ComboBoxMinutos.SelectedIndex.ToString()), 00);

            evento.Start.DateTime = evento.Start.DateTime + hora;


            _calendariogoogle.CreateEvent(evento);
            LimpiarCampos();
        }
Exemple #5
0
 public void CreateEventTest()
 {
     calendar.CreateEvent(new CalendarEvent("Today", "Content", "Location", period.Today().Start, period.Today().End));
 }