Inheritance: INotifyPropertyChanged
 public GenerateVoxelFieldViewModel(BaseViewModel parentViewModel, GenerateVoxelFieldModel dataModel)
     : base(parentViewModel)
 {
     _dataModel = dataModel;
     // Will bubble property change events from the Model to the ViewModel.
     _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
 }
        public ChangeOwnerViewModel(BaseViewModel parentViewModel, ChangeOwnerModel dataModel)
            : base(parentViewModel)
        {

            _dataModel = dataModel;
            // Will bubble property change events from the Model to the ViewModel.
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
        }
示例#3
0
        public MergeVoxelViewModel(BaseViewModel parentViewModel, MergeVoxelModel dataModel)
            : base(parentViewModel)
        {
            _dataModel = dataModel;

            // Will bubble property change events from the Model to the ViewModel.
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);

            MergeFileName = "merge";
        }
示例#4
0
        public GroupMoveViewModel(BaseViewModel parentViewModel, GroupMoveModel dataModel, IDialogService dialogService)
            : base(parentViewModel)
        {
            Contract.Requires(dialogService != null);
            _dialogService = dialogService;
            _dataModel = dataModel;

            // Will bubble property change events from the Model to the ViewModel.
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
        }
 public SelectWorldViewModel(BaseViewModel parentViewModel, SelectWorldModel dataModel, IDialogService dialogService, Func<IOpenFileDialog> openFileDialogFactory)
     : base(parentViewModel)
 {
     Contract.Requires(dialogService != null);
     Contract.Requires(openFileDialogFactory != null);
     _dialogService = dialogService;
     _openFileDialogFactory = openFileDialogFactory;
     _dataModel = dataModel;
     // Will bubble property change events from the Model to the ViewModel.
     _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
 }
        public InventoryEditorViewModel(BaseViewModel parentViewModel, InventoryEditorModel dataModel, IDialogService dialogService)
            : base(parentViewModel)
        {
            Contract.Requires(dialogService != null);

            _dialogService = dialogService;
            _dataModel = dataModel;
            Selections = new ObservableCollection<InventoryModel>();
            // Will bubble property change events from the Model to the ViewModel.
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
        }
        public ComponentListViewModel(BaseViewModel parentViewModel, ComponentListModel dataModel, IDialogService dialogService, Func<ISaveFileDialog> saveFileDialogFactory)
            : base(parentViewModel)
        {
            Contract.Requires(dialogService != null);
            Contract.Requires(saveFileDialogFactory != null);

            _dialogService = dialogService;
            _saveFileDialogFactory = saveFileDialogFactory;
            _dataModel = dataModel;
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
        }
        public ResourceReportViewModel(BaseViewModel parentViewModel, ResourceReportModel dataModel, IDialogService dialogService, Func<ISaveFileDialog> saveFileDialogFactory)
            : base(parentViewModel)
        {
            Contract.Requires(dialogService != null);
            Contract.Requires(saveFileDialogFactory != null);

            _dialogService = dialogService;
            _saveFileDialogFactory = saveFileDialogFactory;
            _dataModel = dataModel;
            // Will bubble property change events from the Model to the ViewModel.
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
        }
        public ImportImageViewModel(BaseViewModel parentViewModel, ImportImageModel dataModel, IDialogService dialogService, Func<IOpenFileDialog> openFileDialogFactory, Func<IColorDialog> colorDialogFactory)
            : base(parentViewModel)
        {
            Contract.Requires(dialogService != null);
            Contract.Requires(openFileDialogFactory != null);
            Contract.Requires(colorDialogFactory != null);

            _dialogService = dialogService;
            _openFileDialogFactory = openFileDialogFactory;
            _colorDialogFactory = colorDialogFactory;
            _dataModel = dataModel;
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
        }
示例#10
0
        public Import3DModelViewModel(BaseViewModel parentViewModel, Import3DModelModel dataModel, IDialogService dialogService, Func<IOpenFileDialog> openFileDialogFactory)
            : base(parentViewModel)
        {
            Contract.Requires(dialogService != null);
            Contract.Requires(openFileDialogFactory != null);

            _dialogService = dialogService;
            _openFileDialogFactory = openFileDialogFactory;
            _dataModel = dataModel;
            // Will bubble property change events from the Model to the ViewModel.
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);

            IsMultipleScale = true;
            MultipleScale = 1;
            MaxLengthScale = 100;
            ClassType = ImportModelClassType.SmallShip;
            ArmorType = ImportArmorType.Light;
        }
        public Import3DAsteroidViewModel(BaseViewModel parentViewModel, Import3DAsteroidModel dataModel, IDialogService dialogService, Func<IOpenFileDialog> openFileDialogFactory)
            : base(parentViewModel)
        {
            Contract.Requires(dialogService != null);
            Contract.Requires(openFileDialogFactory != null);

            _dialogService = dialogService;
            _openFileDialogFactory = openFileDialogFactory;
            _dataModel = dataModel;
            // Will bubble property change events from the Model to the ViewModel.
            _dataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);

            IsMultipleScale = true;
            MultipleScale = 1;
            MaxLengthScale = 100;
            OutsideMaterialDepth = 1;
            IsInfrontofPlayer = true;
            Position = new BindablePoint3DModel();
            BuildDistance = 10;
        }
示例#12
0
        public CubeItemViewModel(BaseViewModel parentViewModel, CubeItemModel dataModel, IDialogService dialogService)
            : base(parentViewModel)
        {
            Contract.Requires(dialogService != null);
            _dialogService = dialogService;
            _dataModel = dataModel;

            Func<InventoryEditorModel, InventoryEditorViewModel> viewModelCreator = model => new InventoryEditorViewModel(this, model);
            Func<ObservableCollection<InventoryEditorViewModel>> collectionCreator =
                () => new ObservableViewModelCollection<InventoryEditorViewModel, InventoryEditorModel>(dataModel.Inventory, viewModelCreator);
            _inventory = new Lazy<ObservableCollection<InventoryEditorViewModel>>(collectionCreator);

            _dataModel.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e)
            {
                if (e.PropertyName == "Inventory")
                {
                    collectionCreator.Invoke();
                    _inventory = new Lazy<ObservableCollection<InventoryEditorViewModel>>(collectionCreator);
                }
                // Will bubble property change events from the Model to the ViewModel.
                OnPropertyChanged(e.PropertyName);
            };
        }
示例#13
0
 public ComponentListViewModel(BaseViewModel parentViewModel, ComponentListModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <ISaveFileDialog>)
 {
 }
示例#14
0
 public SettingsViewModel(BaseViewModel parentViewModel, SettingsModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>(), ServiceLocator.Resolve<IOpenFileDialog>, ServiceLocator.Resolve<IFolderBrowserDialog>)
 {
 }
示例#15
0
 public CubeItemViewModel(BaseViewModel parentViewModel, CubeItemModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>())
 {
 }
示例#16
0
 public StructurePlayerViewModel(BaseViewModel parentViewModel, StructurePlayerModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <IColorDialog>)
 {
 }
 public InventoryEditorViewModel(BaseViewModel parentViewModel, InventoryEditorModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>())
 {
 }
示例#18
0
 public DataBaseViewModel(BaseViewModel parentViewModel, IStructureBase dataModel)
     : base(parentViewModel)
 {
     _dataModel = dataModel;
 }
示例#19
0
 public GroupMoveViewModel(BaseViewModel parentViewModel, GroupMoveModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>())
 {
 }
 public ResourceReportViewModel(BaseViewModel parentViewModel, ResourceReportModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <ISaveFileDialog>)
 {
 }
示例#21
0
 public SelectWorldViewModel(BaseViewModel parentViewModel, SelectWorldModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>(), ServiceLocator.Resolve<IOpenFileDialog>)
 {
 }
示例#22
0
 public BaseViewModel(BaseViewModel ownerViewModel)
 {
     _ownerViewModel = ownerViewModel;
 }
示例#23
0
 public SelectWorldViewModel(BaseViewModel parentViewModel, SelectWorldModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <IOpenFileDialog>)
 {
 }
示例#24
0
 public InventoryEditorViewModel(BaseViewModel parentViewModel, InventoryEditorModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>())
 {
 }
示例#25
0
 protected StructureBaseViewModel(BaseViewModel parentViewModel, TModel dataModel)
     : base(parentViewModel, dataModel)
 {
 }
 public ResourceReportViewModel(BaseViewModel parentViewModel, ResourceReportModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>(), ServiceLocator.Resolve<ISaveFileDialog>)
 {
 }
示例#27
0
 public GroupMoveViewModel(BaseViewModel parentViewModel, GroupMoveModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>())
 {
 }
示例#28
0
 public StructurePlanetViewModel(BaseViewModel parentViewModel, StructurePlanetModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>())
 {
 }
示例#29
0
 public ImportImageViewModel(BaseViewModel parentViewModel, ImportImageModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <IOpenFileDialog>, ServiceLocator.Resolve <IColorDialog>)
 {
 }
 public ComponentListViewModel(BaseViewModel parentViewModel, ComponentListModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>(), ServiceLocator.Resolve<ISaveFileDialog>)
 {
 }
示例#31
0
 public AboutViewModel(BaseViewModel parentViewModel)
     : base(parentViewModel)
 {
 }
 public Import3DAsteroidViewModel(BaseViewModel parentViewModel, Import3DAsteroidModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <IOpenFileDialog>)
 {
 }
示例#33
0
 public ImportImageViewModel(BaseViewModel parentViewModel, ImportImageModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>(), ServiceLocator.Resolve<IOpenFileDialog>, ServiceLocator.Resolve<IColorDialog>)
 {
 }
示例#34
0
 public StructureCubeGridViewModel(BaseViewModel parentViewModel, StructureCubeGridModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>(), ServiceLocator.Resolve <IColorDialog>)
 {
     Selections = new ObservableCollection <CubeItemViewModel>();
 }
示例#35
0
 public ImportVoxelViewModel(BaseViewModel parentViewModel, ImportVoxelModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve<IDialogService>(), ServiceLocator.Resolve<IOpenFileDialog>)
 {
 }
示例#36
0
 public CubeItemViewModel(BaseViewModel parentViewModel, CubeItemModel dataModel)
     : this(parentViewModel, dataModel, ServiceLocator.Resolve <IDialogService>())
 {
 }
 public StructureFloatingObjectViewModel(BaseViewModel parentViewModel, StructureFloatingObjectModel dataModel)
     : base(parentViewModel, dataModel)
 {
     // Will bubble property change events from the Model to the ViewModel.
     DataModel.PropertyChanged += (sender, e) => OnPropertyChanged(e.PropertyName);
 }
示例#38
0
 public AboutViewModel(BaseViewModel parentViewModel)
     : base(parentViewModel)
 {
 }