public ProductGridController(IView <ProductGrid.PropertyEnum> view, float meterWidth, float meterHeight, float tileSize) { utility = new ProductGridUtility(); collisionHandler = new ProductGridCollisionHandler(); // Set parameters to fields this.meterWidth = meterWidth; this.meterHeight = meterHeight; this.tileSize = tileSize; this.view = view; // set controller this.view.SetController(this); legendDictionary = ((Legend)view.Get(ProductGrid.PropertyEnum.Legend)).CategoryColors; // Init fields with default values zoomSize = 50; zoomArea = new Rectangle(0, 0, zoomSize, zoomSize); comboBoxAlgorithms = new List <AlgorithmModel>(); draggingProduct = false; zoomContent = new Bitmap(zoomSize, zoomSize); // Init algorithm combobox PopulateAlgorithms(); }
public ProductGridController(IView<ProductGrid.PropertyEnum> view, float meterWidth, float meterHeight, float tileSize) { utility = new ProductGridUtility(); collisionHandler = new ProductGridCollisionHandler(); // Set parameters to fields this.meterWidth = meterWidth; this.meterHeight = meterHeight; this.tileSize = tileSize; this.view = view; // set controller this.view.SetController(this); legendDictionary = ((Legend) view.Get(ProductGrid.PropertyEnum.Legend)).CategoryColors; // Init fields with default values zoomSize = 50; zoomArea = new Rectangle(0, 0, zoomSize, zoomSize); comboBoxAlgorithms = new List<AlgorithmModel>(); draggingProduct = false; zoomContent = new Bitmap(zoomSize, zoomSize); // Init algorithm combobox PopulateAlgorithms(); }