예제 #1
0
 void Model_NewGateOnline(byte gateId)
 {
     lock (_syncRoot)
     {
         if (_gates.Contains(gateId)) return;
         _gates.Add(gateId);
     }
     var gateUi = new GateUI {Model = Model.GetGateModel(gateId)};
     GatesTabControl.Items.Add(new TabItem {Content = gateUi, Header = "Gate " + gateId, IsSelected = true});
 }
예제 #2
0
        void Model_NewGateOnline(byte gateId)
        {
            lock (_syncRoot)
            {
                if (_gates.Contains(gateId))
                {
                    return;
                }
                _gates.Add(gateId);
            }
            var gateUi = new GateUI {
                Model = Model.GetGateModel(gateId)
            };

            GatesTabControl.Items.Add(new TabItem {
                Content = gateUi, Header = "Gate " + gateId, IsSelected = true
            });
        }