Example #1
0
        private void InitializeCurrentDevice()
        {
            _currentDeviceViewModel = new CurrentDeviceViewModel();
            _currentDeviceView = new CurrentDeviceView();
            _currentDeviceView.DataContext = _currentDeviceViewModel;

            elementHost.Child = _currentDeviceView;

            if (DeviceId != Guid.Empty)
            {
                _currentDeviceViewModel.Inicialize(DeviceId);
            }
        }
Example #2
0
 public MainWindow()
 {
     InitializeComponent();
     FiresecManager.Connect("adm", "");
     //DataContext = this;
     SelectDeviceCommand = new RelayCommand(OnSelect);
     ShowPropertiesCommand = new RelayCommand(OnShowProperties);
     _currentDeviceViewModel = new CurrentDeviceViewModel();
     _currentDeviceView = new CurrentDeviceView();
     //currentDeviceView.DataContext = _currentDeviceViewModel;
     _currentDeviceViewModel.SelectDevice();
     DataContext = CurrentDeviceViewModel;
     //_mainCurrentDeviceView.DataContext = CurrentDeviceViewModel;
     // currentDeviceView = _currentDeviceViewModel;
 }
Example #3
0
        public void InitializeCurrentDevice()
        {
            _currentDeviceViewModel = new CurrentDeviceViewModel();
            _currentDeviceView = new CurrentDeviceView();
            _currentDeviceView.DataContext = _currentDeviceViewModel;

            if (DeviceId != Guid.Empty)
            {
                _currentDeviceViewModel.Inicialize(DeviceId);
            }
        }