Beispiel #1
0
    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
    }
Beispiel #2
0
 public SortOfWrapPanel(PanelPresentatinLogic presentationLogic)
 {
     _panelPresentatinLogic       = presentationLogic;
     _panelPresentatinLogic.Panel = this;
 }