Beispiel #1
0
        public static OlCategoryColor FindMatchingCategoryColor(ArgbColor argbColor)
        {
            var color = Color.FromArgb(argbColor.ArgbValue);

            return(FindMatchingCategoryColor(color));
        }
 public async Task<bool> SetCalendarColorNoThrow (ArgbColor color)
 {
   try
   {
     await _webDavClient.ExecuteWebDavRequestAndReturnResponseHeaders(
         _serverUrl,
         "PROPPATCH",
         0,
         null,
         null,
         "application/xml",
         string.Format(
               @"<?xml version='1.0'?>
                   <D:propertyupdate xmlns:D=""DAV:"" xmlns:C=""urn:ietf:params:xml:ns:caldav"" xmlns:E=""http://apple.com/ns/ical/"">
                     <D:set>
                       <D:prop>
                           <E:calendar-color >{0}</E:calendar-color>
                       </D:prop>
                     </D:set>
                   </D:propertyupdate>
              ", color.ToRgbaHexString())
         );
     return true;
   }
   catch (Exception x)
   {
     s_logger.Error(null, x);
     return false;
   }
 }
 public Task<bool> SetCalendarColorNoThrow(ArgbColor color)
 {
   return Task.FromResult(true);
 }
 public Task<bool> SetCalendarColorNoThrow (ArgbColor argbColor)
 {
   throw new NotImplementedException();
 }
 public CalendarData (Uri uri, string name, ArgbColor? color)
 {
   Uri = uri;
   Name = name;
   Color = color;
 }