public void AddFavouriteBoard(ForumBoards board) { if (!PinnedBoards.Contains(board)) { PinnedBoards.Add(board); Settings.ForumsPinnedBoards = string.Join(",", PinnedBoards.Cast <int>()); } }
public ForumsMainViewModel() { if (!string.IsNullOrEmpty(Settings.ForumsPinnedBoards)) { foreach (var item in Settings.ForumsPinnedBoards.Split(',').Select(int.Parse).Cast <ForumBoards>()) { PinnedBoards.Add(item); } } }