コード例 #1
0
 private static void InsertDefaultIfNull(BubbleGroup group)
 {
     lock (_lock)
     {
         if (group.Settings == null)
         {
             using (var db = new SqlDatabase <BubbleGroupSettings>(GetPath()))
             {
                 var settings = new BubbleGroupSettings
                 {
                     Mute                       = false,
                     Unread                     = true,
                     Guid                       = group.ID,
                     LastUnreadSetTime          = 0,
                     ReadTimes                  = null,
                     NotificationLed            = DefaultNotificationLedColor,
                     VibrateOption              = null,
                     VibrateOptionCustomPattern = null,
                     Ringtone                   = null,
                 };
                 db.Add(settings);
                 group.Settings = settings;
             }
         }
     }
 }
コード例 #2
0
 private static void Update(BubbleGroupSettings settings)
 {
     lock (_lock)
     {
         using (var db = new SqlDatabase<BubbleGroupSettings>(GetPath()))
         {
             db.Update(settings);
         }
     }
 }
コード例 #3
0
 private static void Update(BubbleGroupSettings settings)
 {
     lock (_lock)
     {
         using (var db = new SqlDatabase <BubbleGroupSettings>(GetPath()))
         {
             db.Update(settings);
         }
     }
 }
コード例 #4
0
 private static void InsertDefaultIfNull(BubbleGroup group)
 {
     lock (_lock)
     {
         if (group.Settings == null)
         {
             using (var db = new SqlDatabase <BubbleGroupSettings>(GetPath()))
             {
                 var settings = new BubbleGroupSettings
                 {
                     Guid                       = group.ID,
                     Mute                       = false,
                     NotificationLed            = DefaultNotificationLedColor,
                     VibrateOption              = null,
                     VibrateOptionCustomPattern = null,
                     Ringtone                   = null,
                     Unread                     = true,
                     UnreadOffline              = true,
                     UnreadIndicatorGuid        = null,
                     LastUnreadSetTime          = 0,
                     ParticipantNicknames       = null,
                     RingtoneDisabled           = false,
                     VibrateOptionDisabled      = false,
                     SentBubbleColor            = 0,
                     ReceivedBubbleColor        = 0,
                     SentFontColor              = 0,
                     ReceivedFontColor          = 0,
                     BubbleColorsChosen         = false,
                     BackgroundChosen           = false,
                     BackgroundColor            = 0,
                     BackgroundImagePath        = null,
                     ReadTimes                  = null,
                     QuotedTitles               = null,
                 };
                 db.Add(settings);
                 group.Settings = settings;
             }
         }
     }
 }
コード例 #5
0
 private static void InsertDefaultIfNull(BubbleGroup group)
 {
     lock (_lock)
     {
         if (group.Settings == null)
         {
             using (var db = new SqlDatabase <BubbleGroupSettings>(GetPath()))
             {
                 var settings = new BubbleGroupSettings
                 {
                     Mute              = false,
                     Unread            = true,
                     Guid              = group.ID,
                     LastUnreadSetTime = 0,
                     ReadTimes         = null,
                 };
                 db.Add(settings);
                 group.Settings = settings;
             }
         }
     }
 }
コード例 #6
0
 private static void InsertDefaultIfNull(BubbleGroup group)
 {
     lock (_lock)
     {
         if (group.Settings == null)
         {
             using (var db = new SqlDatabase<BubbleGroupSettings>(GetPath()))
             {
                 var settings = new BubbleGroupSettings
                 {
                     Mute = false,
                     Unread = true,
                     Guid = group.ID,
                     LastUnreadSetTime = 0,
                     ReadTimes = null,
                     ParticipantNicknames = null,
                     NotificationLed = DefaultNotificationLedColor,
                     VibrateOption = null,
                     VibrateOptionCustomPattern = null,
                     Ringtone = null,
                 };
                 db.Add(settings);
                 group.Settings = settings;
             }
         }
     }
 }        
コード例 #7
0
 private static void InsertDefaultIfNull(BubbleGroup group)
 {
     lock (_lock)
     {
         if (group.Settings == null)
         {
             using (var db = new SqlDatabase<BubbleGroupSettings>(GetPath()))
             {
                 var settings = new BubbleGroupSettings
                 {
                     Mute = false,
                     Unread = true,
                     Guid = group.ID,
                     LastUnreadSetTime = 0,
                     ReadTimes = null,
                 };
                 db.Add(settings);
                 group.Settings = settings;
             }
         }
     }
 }