public SketchModellingViewModel( UiState uiState, SessionData sessionData, DisplayOptions displayOptions, IPrimitivesConverter primitivesConverter, IEventAggregator eventAggregator, IUnityContainer container, ISketchCatalog sketchCatalog) : this() { this.uiState = uiState; this.sessionData = sessionData; this.primitivesConverter = primitivesConverter; this.DisplayOptions = displayOptions; this.container = container; this.sketchCatalog = sketchCatalog; this.eventAggregator = eventAggregator; uiState.AddListener(this, () => uiState.SketchPlane); eventAggregator.GetEvent <SnapCompleteEvent>().Subscribe(OnSnapComplete); sketchPlane = uiState.SketchPlane; viewModelGenerator = new ViewModelCollectionGenerator <NewPrimitiveViewModel, NewPrimitive>( NewPrimitiveViewModels, sessionData.NewPrimitives, NewPrimitiveDataToNewPrimitiveViewModel); SnappedPrimitives = new SnappedPrimitivesCollection(sessionData.SnappedPrimitives); }
public SketchSaver(IEventAggregator eventAggregator, SessionData sessionData, ISketchCatalog sketchCatalog) { this.eventAggregator = eventAggregator; this.sessionData = sessionData; this.sketchCatalog = sketchCatalog; eventAggregator.GetEvent <SaveSketchEvent>().Subscribe(OnSaveSketch); }
public OpenImageViewModel( IEventAggregator eventAggregator, ISketchCatalog sketchCatalog, IUnityContainer container) : this() { this.eventAggregator = eventAggregator; this.sketchCatalog = sketchCatalog; this.container = container; RefreshSketches(); }
public SketchLoader(IEventAggregator eventAggregator, ISketchCatalog sketchCatalog, IClassificationInference classificationInference, IUndoHistory undoHistory, SessionData sessionData, UiState uiState) { this.eventAggregator = eventAggregator; this.sketchCatalog = sketchCatalog; this.classificationInference = classificationInference; this.undoHistory = undoHistory; this.sessionData = sessionData; this.uiState = uiState; eventAggregator.GetEvent <LoadSketchEvent>().Subscribe(OnLoadSketch); }
public SketchCreatorViewModel(IEventAggregator eventAggregator, ISketchCatalog sketchCatalog) : this() { this.eventAggregator = eventAggregator; this.sketchCatalog = sketchCatalog; }