Exemple #1
0
 private void OnTextileColourIndexChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (TextileSelectionViewModel.SelectedColourIndex >= 0 && TextileSelectionViewModel.SelectedTextileIndex >= 0)
     {
         if (e.PropertyName is "SelectedColourIndex" || e.PropertyName is "SelectedTextileIndex")
         {
             TextilePictureViewModel.GetUri(TextileSelectionViewModel.TextileDataCollection[TextileSelectionViewModel.SelectedTextileIndex], TextileSelectionViewModel.Colours[TextileSelectionViewModel.SelectedColourIndex]);
         }
     }
 }
Exemple #2
0
 public CalculateViewModel()
 {
     InputDataViewModel        = new InputDataViewModel();
     TextileSelectionViewModel = new TextileSelectionViewModel();
     TextilePictureViewModel   = new TextilePictureViewModel();
     OutputDataViewModel       = new OutputDataViewModel {
         Root = this
     };
     TextileSelectionViewModel.PropertyChanged += OnTextileColourIndexChanged;
     OutputDataViewModel.PropertyChanged       += OnCalculatePriceButtonClick;
 }