Load() 공개 메소드

public Load ( IStructureBase selection1, IStructureBase selection2 ) : void
selection1 IStructureBase
selection2 IStructureBase
리턴 void
예제 #1
0
        public void VoxelMergeExecuted()
        {
            var model = new MergeVoxelModel();
            var item1 = Selections[0];
            var item2 = Selections[1];
            model.Load(item1.DataModel, item2.DataModel);
            var loadVm = new MergeVoxelViewModel(this, model);
            var result = _dialogService.ShowDialog<WindowVoxelMerge>(this, loadVm);
            if (result == true)
            {
                IsBusy = true;
                var newEntity = loadVm.BuildEntity();
                var structure = _dataModel.AddEntity(newEntity);
                ((StructureVoxelModel)structure).SourceVoxelFilepath = loadVm.SourceFile; // Set the temporary file location of the Source Voxel, as it hasn't been written yet.
                if (_preSelectedStructure != null)
                    SelectedStructure = _preSelectedStructure;

                if (loadVm.RemoveOriginalAsteroids)
                {
                    DeleteModel(item1, item2);
                }

                IsBusy = false;
            }
        }