예제 #1
0
파일: Form1.cs 프로젝트: hjlfmy/Rubezh
        private void InitializeCurrentDevice()
        {
            _currentDeviceViewModel = new CurrentDeviceViewModel();
            _currentDeviceView = new CurrentDeviceView();
            _currentDeviceView.DataContext = _currentDeviceViewModel;

            elementHost.Child = _currentDeviceView;

            if (DeviceId != Guid.Empty)
            {
                _currentDeviceViewModel.Inicialize(DeviceId);
            }
        }
예제 #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;
 }
예제 #3
0
파일: ActiveX.cs 프로젝트: hjlfmy/Rubezh
        public void InitializeCurrentDevice()
        {
            _currentDeviceViewModel = new CurrentDeviceViewModel();
            _currentDeviceView = new CurrentDeviceView();
            _currentDeviceView.DataContext = _currentDeviceViewModel;

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