Esempio n. 1
0
 public RecipeSetup()
 {
     // Create model instances
     process = new Process();
     ingredients = new Ingredients();
     Recipe = new General();
 }
Esempio n. 2
0
 private void Recipe_MessageReceived(General _recipe)
 {
     recipe = _recipe;
     RaisePropertyChanged(RecipePropertyName);
 }
Esempio n. 3
0
        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);
        }