Beispiel #1
0
        /// <summary>
        ///     Конструктор
        /// </summary>
        public ApplicationVm()
        {
            var figureSettings = new FigureSettings();

            _drawer = new Drawer(figureSettings
                                 , new SolidWorksCommander(GetSolidWorksSettings()));

            Figure = new FigureVm(_figure = new Figure(), figureSettings);
        }
Beispiel #2
0
 public FiguresController(IHostingEnvironment host,
                          IParameterRepository parameterRepository,
                          IScriptInterpreterUnitOfWork unitOfWork,
                          IMapper mapper,
                          IOptionsSnapshot <FigureSettings> options)
 {
     _host = host;
     _parameterRepository = parameterRepository;
     _unitOfWork          = unitOfWork;
     _mapper        = mapper;
     _photoSettings = options.Value;
 }
Beispiel #3
0
        /// <summary>
        ///     Конструктор
        /// </summary>
        /// <param name="figure">Пользовательские параметры фигуры</param>
        /// <param name="figureSettings">Допустимые настройки фигуры</param>
        public FigureVm(Figure figure
                        , FigureSettings figureSettings)
        {
            _figure          = figure ?? throw new ArgumentNullException();
            _figureSettings  = figureSettings ?? throw new ArgumentNullException();
            _figureValidator = new FigureValidator(_figureSettings);

            if (_figure.WallsX == null)
            {
                _figure.WallsX = new Walls();
            }

            if (_figure.WallsY == null)
            {
                _figure.WallsY = new Walls();
            }

            WallPointsX = new ObservableCollection <PointVm>();
            WallPointsX.CollectionChanged += WallPointsX_CollectionChanged;

            WallPointsY = new ObservableCollection <PointVm>();
            WallPointsY.CollectionChanged += WallPointsY_CollectionChanged;
        }
Beispiel #4
0
 public void InitializeEachTest()
 {
     _figureSettings = new FigureSettings();
 }