public PriceAndCostRepository(GridRepository gridRepository) { wallHandler = new WallHandler(gridRepository); windowHandler = new WindowHandler(gridRepository); wallBeamHandler = new WallBeamHandler(gridRepository); doorHandler = new DoorHandler(gridRepository); decorativeColumnHandler = new DecorativeColumnHandler(gridRepository); this._context = new DatabaseContext(); }
public void DrawWallBeams(Graphics graphic) { if (WALLBEAM_HANDLER == null) { this.WALLBEAM_HANDLER = new WallBeamHandler(gridRepository); } foreach (WallBeam wallBeam in WALLBEAM_HANDLER.GetList(this)) { wallBeam.Draw(graphic); } }
public Grid(string gridName, Client client, int height, int width) { this.isDeleted = false; this.gridRepository = new GridRepository(); this.Walls = new List <Wall>(); this.WallBeams = new List <WallBeam>(); this.DecorativeColumns = new List <DecorativeColumn>(); this.Windows = new List <Window>(); this.Doors = new List <Door>(); this.GridName = gridName; this.Client = client; this.Height = height * PixelConvertor; this.Width = width * PixelConvertor; this.PRICE_AND_COST_HANDLER = new PriceAndCostHandler(gridRepository); this.GRID_HANDLER = new GridHandler(); this.WALLBEAM_HANDLER = new WallBeamHandler(gridRepository); this.WALL_HANDLER = new WallHandler(gridRepository); this.WINDOW_HANDLER = new WindowHandler(gridRepository); this.DECORATIVECOLUMN_HANDLER = new DecorativeColumnHandler(gridRepository); this.DOOR_HANDLER = new DoorHandler(gridRepository); }