void SetFavorite(bool fav) { if (fav == true) { if (!isFavorite) { CompleteContextMenu.AddFavorite(fullPath); } } if (fav == false) { if (isFavorite) { CompleteContextMenu.RemoveFavorite(fullPath); } } }
void SetFavorite(bool fav) { isFavorite = fav; if (fav == true) { CompleteContextMenu.AddFavorite(fullPath); foreach (var child in children.Values) { child.SetFavorite(fav); } } if (fav == false) { CompleteContextMenu.RemoveFavorite(fullPath); foreach (var child in children.Values) { child.SetFavorite(fav); } } }