コード例 #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
ファイル: MainWindow.xaml.cs プロジェクト: hjlfmy/Rubezh
 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);
            }
        }