public void AddFigure(IFigureDescriptor descriptor, FigureConfig config) { var figureProxy = new FigureProxy(descriptor); figureProxy.LoadConfig(config); FigureCollection.AddFigure(figureProxy); }
public void AddFigure(IFigureDescriptor descriptor) { var figureProxy = new FigureProxy(descriptor); FigureCollection.AddFigure(figureProxy); var figureSetup = new FigureSetupViewModel(this, figureProxy); WindowManager.ShowDialog(figureSetup); }
private void FigureCollectionOnRemoved(object sender, FigureProxy e) { var figureVM = Figures.FirstOrDefault(f => f.Proxy == e); if (figureVM != null) { Figures.Remove(figureVM); } FiguresUpdated(); NotifyOfPropertyChange(nameof(CanRender)); }
public FigureSetupViewModel(AppService appService, FigureProxy figureProxy) { _appService = appService; _figureProxy = figureProxy; DisplayName = $"{_figureProxy.Metadata.DisplayName} Setup"; Parameters = new ObservableCollection <ParameterViewModel>(); foreach (var parameter in figureProxy.Parameters.GetParameters()) { Parameters.Add(CreateParameter(parameter, figureProxy.Parameters)); } }
public void RemoveFigure(FigureProxy figureProxy) { FigureCollection.RemoveFigure(figureProxy); }
public void EditFigure(FigureProxy figureProxy) { var figureSetup = new FigureSetupViewModel(this, figureProxy); WindowManager.ShowDialog(figureSetup); }
private void FigureCollectionOnUpdated(object sender, FigureProxy e) { FiguresUpdated(); }
private void FigureCollectionOnAdded(object sender, FigureProxy e) { Figures.Add(new FigureViewModel(e)); FiguresUpdated(); NotifyOfPropertyChange(nameof(CanRender)); }
public FigureViewModel(FigureProxy figure) { Proxy = figure; }