/// <summary> /// Creates and initializes a new instance of the CalendarMark class. /// </summary> /// <param name="type">Type of mark.</param> /// <param name="date">Date of inclusion of the mark.</param> /// <param name="repeat">Repeat type.</param> /// <since_tizen> preview </since_tizen> public CalendarMark(string type, DateTime date, CalendarMarkRepeatType repeat) { Handle = IntPtr.Zero; Type = type; Date = date; Repeat = repeat; }
/// <summary> /// Adds a new mark to the calendar. /// </summary> /// <param name="type">A string used to define the type of mark. It will be emitted to the theme that should display a related modification on these day's representation.</param> /// <param name="date">A time struct to represent the date of inclusion of the mark. For marks that repeat, it will just be displayed after the inclusion date in the calendar.</param> /// <param name="repeat">Repeat the event following this periodicity. Can be a unique mark (that doesn't repeat), daily, weekly, monthly, or annually.</param> /// <returns>Item for a calendar mark.</returns> /// <since_tizen> preview </since_tizen> public CalendarMark AddMark(string type, DateTime date, CalendarMarkRepeatType repeat) { CalendarMark mark = new CalendarMark(type, date, repeat); Interop.Libc.SystemTime tm = date; IntPtr nativeHandle = Interop.Elementary.elm_calendar_mark_add(RealHandle, type, ref tm, (Interop.Elementary.Elm_Calendar_Mark_Repeat_Type)repeat); mark.Handle = nativeHandle; return(mark); }