Пример #1
0
 /// <summary>
 /// Send initialization
 /// </summary>
 public void Init(SensitivityEnum sensitivity)
 {
     if (sensitivity == SensitivityEnum.Sensitivity_2g)
     {
         _ezb.I2C.Write(Address7Bit, new byte[] { 0x16, Functions.ToByteFromBinary(0, 0, 0, 0, 0, 1, 0, 1) });
     }
     else if (sensitivity == SensitivityEnum.Sensitivity_4g)
     {
         _ezb.I2C.Write(Address7Bit, new byte[] { 0x16, Functions.ToByteFromBinary(0, 0, 0, 0, 1, 0, 0, 1) });
     }
     else if (sensitivity == SensitivityEnum.Sensitivity_8g)
     {
         _ezb.I2C.Write(Address7Bit, new byte[] { 0x16, Functions.ToByteFromBinary(0, 0, 0, 0, 0, 0, 0, 1) });
     }
 }
        public static string GetVisibility(SensitivityEnum sensitivity)
        {
            // Visibility of the event. Optional. Possible values are: - "default" - Uses the default visibility
            //             for events on the calendar. This is the default value. - "public" - The event is public and event details
            //             are visible to all readers of the calendar. - "private" - The event is private and only event attendees may
            //             view event details. - "confidential" - The event is private. This value is provided for compatibility
            //             reasons.
            switch (sensitivity)
            {
            case SensitivityEnum.Confidential:
                return("confidential");

            case SensitivityEnum.Public:
                return("public");

            case SensitivityEnum.Private:
                return("private");

            case SensitivityEnum.None:
                return(null);
            }
            return("default");
        }
 public static string GetVisibility(SensitivityEnum sensitivity)
 {
     // Visibility of the event. Optional. Possible values are: - "default" - Uses the default visibility
     //             for events on the calendar. This is the default value. - "public" - The event is public and event details
     //             are visible to all readers of the calendar. - "private" - The event is private and only event attendees may
     //             view event details. - "confidential" - The event is private. This value is provided for compatibility
     //             reasons.
     switch (sensitivity)
     {
             case SensitivityEnum.Confidential:
                 return "confidential";
             case SensitivityEnum.Public:
                 return "public";
             case SensitivityEnum.Private:
                 return "private";
             case SensitivityEnum.None:
                 return null;
     }
     return "default";
 }