コード例 #1
0
        private void ChangeHostControl(IDiscreteLightControl newControl)
        {
            if (null != _control)
            {
                _control.SelectedValueChanged -= EhSelectedValueChanged;
            }

            _control = newControl;
            _guiControlHost.Child = (UIElement)_control;

            if (null != _control)
            {
                _control.SelectedValueChanged += EhSelectedValueChanged;
            }
        }
コード例 #2
0
		private void ChangeHostControl(IDiscreteLightControl newControl)
		{
			if (null != _control)
				_control.SelectedValueChanged -= EhSelectedValueChanged;

			_control = newControl;
			_guiControlHost.Child = (UIElement)_control;

			if (null != _control)
				_control.SelectedValueChanged += EhSelectedValueChanged;
		}