public FrameworkBuildViewModel(BaseViewModel parentViewModel, FrameworkBuildModel dataModel)
     : base(parentViewModel)
 {
     _dataModel = dataModel;
     // Will bubble property change events from the Model to the ViewModel.
     _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
 }
        public void FrameworkCubesExecuted()
        {
            var model = new FrameworkBuildModel {
                BuildPercent = SelectedCubeItem.BuildPercent * 100
            };
            var loadVm = new FrameworkBuildViewModel(this, model);
            var result = _dialogService.ShowDialog <WindowFrameworkBuild>(this, loadVm);

            if (result == true)
            {
                MainViewModel.IsBusy = true;
                MainViewModel.ResetProgress(0, Selections.Count);

                foreach (var cube in Selections)
                {
                    MainViewModel.Progress++;
                    cube.UpdateBuildPercent(model.BuildPercent.Value / 100);
                }

                MainViewModel.ClearProgress();
                MainViewModel.IsModified = true;
                MainViewModel.IsBusy     = false;
            }
        }