public int SaveItem(MouseProfile mouseProfile)
 {
     if (mouseProfile != null && mouseProfile.Id > 0)
     {
         return(database.Update(mouseProfile));
     }
     else
     {
         return(database.Insert(mouseProfile));
     }
 }
        public MainWindowVM()
        {
            MouseSpeed       = MouseSettings.GetMouseSpeed();
            DoubleClickTime  = MouseSettings.GetDoubleClickTime();
            WheelScrollLines = MouseSettings.GetWheelScrollLines();

            foreach (MouseProfile profile in DB.GetItems())
            {
                MouseProfiles.Add(profile);
            }

            SelectedMouseProfile = MouseProfiles.Count > 0 ? MouseProfiles[0] : null;
        }