public MainForm(IGisDataReader dataReader, IDbService dbService, ILogger logger, IGeneralizer generalizer, GeneralizerOptions generalizerOptions, ILinearGeneralizer linearGeneralizer) { InitializeComponent(); _viewModel = new MainFormViewModel(Canvas, dataReader, dbService, logger, generalizer, generalizerOptions, linearGeneralizer); InitializeMetaSection(); InitializeMenu(); _viewModel.MapsUpdatedEvent += MapsUpdatedEventHandler; _scrollTimer = new ScrollTimer(); _scrollTimer.ScrollEvent += _scrollTimer_ScrollEvent; GeneralizeBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; DrawSourceBtn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; MinDistanceTextBox.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; label1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; WindowState = FormWindowState.Maximized; }
public GeneralizePolygonsCommand(IGeneralizer generalizer, List <Polygon> polygons, ILinearGeneralizer linearGeneralizer, double minDistance) { _generalizer = generalizer; _polygons = polygons; _minDistance = minDistance; _linearGeneralizer = linearGeneralizer; }
public MainFormViewModel(Panel canvas, IGisDataReader dataReader, IDbService dbService, ILogger logger, IGeneralizer generalizer, GeneralizerOptions generalizerOptions, ILinearGeneralizer linearGeneralizer) { _dbService = dbService; _canvas = canvas; _dataReader = dataReader; _drawerFactory = new DrawerFactory(canvas.CreateGraphics()); _meta = new MetaInfo(); _logger = logger; _generalizer = generalizer; _generalizerOptions = generalizerOptions; _linearGeneralizer = linearGeneralizer; _drawablePolygons = new List <DrawablePolygon>(); }