public RecipeSetup() { // Create model instances process = new Process(); ingredients = new Ingredients(); Recipe = new General(); }
private void Recipe_MessageReceived(General _recipe) { recipe = _recipe; RaisePropertyChanged(RecipePropertyName); }
public SidePanelViewModel() { // List Initialisation recipe = new General(); process = new Process(); ingredients = new Ingredients(); ingredients.Yeast.Name = "N/A"; ingredients.Yeast.Type = "N/A"; ingredients.Yeast.Form = "N/A"; // Definition of Command Instances RecipeExpandCommand = new RelayCommand(recipeExpandCommand); ProcessExpandCommand = new RelayCommand(processExpandCommand); IngredientsExpandCommand = new RelayCommand(ingredientsExpandCommand); // Registration to messages Messenger.Default.Register<Process>(this, Process_MessageReceived); Messenger.Default.Register<Ingredients>(this, Ingredients_MessageReceived); Messenger.Default.Register<General>(this, Recipe_MessageReceived); }