Пример #1
0
        private void ThingsManager_OnNewThing(object sender, OWLOSThingWrapperEventArgs e)
        {
            OWLOSThingWrapper     ThingWrapper             = e.ThingWrapper;
            ThingsListItemControl NewThingsListItemControl = new ThingsListItemControl(ThingWrapper);

            NewThingsListItemControl.OnDelete += NewThingsListItemControl_OnDelete;
            ThingsListStackPanel.Children.Add(NewThingsListItemControl);
        }
Пример #2
0
        public ThingsListControl(PanelControlTag PanelTag, ThingsManager ThingsManager)
        {
            InitializeComponent();

            this.PanelTag      = PanelTag;
            this.ThingsManager = ThingsManager;

            ThingsListPanelControl = new PanelControl(PanelTag);
            ThingsListPanelControl.ContentHolder.Children.Add(this);

            foreach (OWLOSThingWrapper ThingWrapper in ThingsManager.OWLOSThingWrappers)
            {
                ThingsListItemControl NewThingsListItemControl = new ThingsListItemControl(ThingWrapper);
                ThingsListStackPanel.Children.Add(NewThingsListItemControl);
                NewThingsListItemControl.OnDelete += NewThingsListItemControl_OnDelete;
            }

            ThingsManager.OnNewThing += ThingsManager_OnNewThing;
        }