public Plc2MainPageViewModel(IPlc2Service plc2Service) { _plc2Service = plc2Service; _plc2Service.ValuesRefreshed += OnPlc2Service_ValuesRefreshed; WriteFirstOutputCommand = new DelegateCommand(WriteFirstOutput); }
public HmiStatusBarViewModel(IPlcService plcService, IPlc2Service plc2Service) { _plcService = plcService; _plc2Service = plc2Service; _plcService.ValuesRefreshed += OnPlcServiceValuesRefreshed; OnPlcServiceValuesRefreshed(null, EventArgs.Empty); plc2Service.ValuesRefreshed += OnPlc2ServiceValuesRefreshed; OnPlc2ServiceValuesRefreshed(null, EventArgs.Empty); }
public MainWindowViewModel(IRegionManager regionManager, IPlcService plcService, IPlc2Service plc2Service) { _regionManager = regionManager; _plcService = plcService; _plc2Service = plc2Service; _regionManager.RegisterViewWithRegion(Regions.ContentRegion, typeof(Plc1MainPage)); _regionManager.RegisterViewWithRegion(Regions.StatusBarRegion, typeof(HmiStatusBar)); _regionManager.RegisterViewWithRegion(Regions.LeftMenuRegion, typeof(LeftMenu)); ConnectPlcCommand = new DelegateCommand(ConnectPlc); DisconnectPlcCommand = new DelegateCommand(DisconnectPlc); }