/// <summary> /// This method will remove the current Style selected from the Styles list /// </summary> /// <param name="groupName"></param> internal void RemoveStyleEntry(string groupName) { StyleItem itemToRemove = (from item in StyleItemsList where item.GroupName.Equals(groupName) select item).FirstOrDefault(); StyleItemsList.Remove(itemToRemove); UpdateSavedChangesLabel(); }
/// <summary> /// This method will remove the current Style selected from the Styles list /// </summary> /// <param name="groupName"></param> internal void RemoveStyleEntry(string groupName) { StyleItem itemToRemove = (from item in StyleItemsList where item.GroupName.Equals(groupName) select item).FirstOrDefault(); StyleItemsList.Remove(itemToRemove); GroupStyleItem itemToRemovePreferences = preferenceSettings.GroupStyleItemsList.FirstOrDefault(x => x.Name.Equals(groupName)); preferenceSettings.GroupStyleItemsList.Remove(itemToRemovePreferences); UpdateSavedChangesLabel(); }
/// <summary> /// This method will check if the Style that is being created already exists in the Styles list /// </summary> /// <param name="item1"></param> /// <returns></returns> internal bool ValidateExistingStyle(StyleItem item1) { return(StyleItemsList.Where(x => x.GroupName.Equals(item1.GroupName)).Any()); }