Esempio n. 1
0
        private void ThingsManager_NewOWLOSThing(object sender, OWLOSThingWrapperEventArgs e)
        {
            OWLOSThing       NewThing            = e.ThingWrapper.Thing;
            ThingItemsHolder NewThingItemsHolder = new ThingItemsHolder(new PanelControlTag
            {
                Name             = NewThing.Name,
                Thing            = NewThing,
                BrowserGrid      = BrowserGrid,
                BrowserTabsPanel = BrowserTabsPanes
            });

            ThingsTreeViewItem.Items.Add(NewThingItemsHolder.ThingBrowserItem);
        }
        public ThingConnectionConfigItemControl(OWLOSThing Thing, OWLOSTransport ThingTransport)
        {
            InitializeComponent();
            this.Thing          = Thing;
            this.ThingTransport = ThingTransport;

            EnabledCheckBox.IsChecked    = ThingTransport.connection.enable;
            NameTextBox.Text             = ThingTransport.connection.name;
            TypeComboBox.SelectedIndex   = (int)ThingTransport.connection.connectionType;
            ConnectionStringTextBox.Text = ThingTransport.connection.connectionString;

            ThingTransport.OnTransportStatusChanger += ThingTransport_OnTransportStatusChanger;
            ThingTransport.OnLogItem += ThingTransport_OnLogItem;

            OutLogControl = new LogControl();
            OutLogControl.SetValue(Grid.ColumnProperty, 0);
            OutLogControl.SetValue(Grid.RowProperty, 1);
            LogGrid.Children.Add(OutLogControl);

            InLogControl = new LogControl();
            InLogControl.SetValue(Grid.ColumnProperty, 1);
            InLogControl.SetValue(Grid.RowProperty, 1);
            LogGrid.Children.Add(InLogControl);
        }