public void PopulateCollectionOfItemsDependingOnConfigHopeYouveGotTheIdea() { string configValue = configuration["PanelKind"]; PanelPresentatinLogic panelPresentatinLogic = new PanelPresentatinLogic(); Panel panel = configValue == "Wrap" ? new SortOfWrapPanel(panelPresentatinLogic) : new SortOfStackPanel(panelPresentatinLogic); // TODO: add panel to GUI }
public SortOfWrapPanel(PanelPresentatinLogic presentationLogic) { _panelPresentatinLogic = presentationLogic; _panelPresentatinLogic.Panel = this; }