public SettingsPageViewModel(IPlcService ModPlcService, IEventAggregator ea) { _plcService = ModPlcService; this.PropertyChanged += OnPropertyChanged; FileSelectedGlobalEvent.Instance.Subscribe(ProcessFile); }
public Plc1MainPageViewModel(IPlcService s7PlcService) { _plcService = s7PlcService; StartCommand = new DelegateCommand(async() => { await Start(); }); StopCommand = new DelegateCommand(async() => { await Stop(); }); OnPlcServiceValuesRefreshed(null, null); _plcService.ValuesRefreshed += OnPlcServiceValuesRefreshed; }
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 LeftMenuViewModel(IRegionManager regionManager, IPlcService ModPlcService) { _regionManager = regionManager; _plcService = ModPlcService; InitializationCommand = new DelegateCommand(async() => { await InitializationCommandT(); }); ErrorResetCommand = new DelegateCommand(async() => { await ErrorResetCommandT(); }); NavigateToMainPageCommand = new DelegateCommand(() => NavigateTo("MainPage")); NavigateToSettingsPageCommand = new DelegateCommand(() => NavigateTo("SettingsPage")); }
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); }
public MainPageViewModel(IPlcService s7PlcService) { _plcService = s7PlcService; ConnectCommand = new DelegateCommand(Connect); DisconnectCommand = new DelegateCommand(Disconnect); StartCommand = new DelegateCommand(async() => { await Start(); }); StopCommand = new DelegateCommand(async() => { await Stop(); }); IpAddress = "127.0.0.1"; OnPlcServiceValuesRefreshed(null, null); _plcService.ValuesRefreshed += OnPlcServiceValuesRefreshed; }
public PlcViewModel(IUnityContainer container, IPlcService plcService) : base(container) { _plcService = plcService; _timer.Tick += Timer_Tick; // Colors that will be used for charts from 1 to 10 (the max) _brushes.Add(Brushes.SteelBlue); _brushes.Add(Brushes.SeaGreen); _brushes.Add(Brushes.OrangeRed); _brushes.Add(Brushes.Purple); _brushes.Add(Brushes.DarkRed); _brushes.Add(Brushes.SlateGray); _brushes.Add(Brushes.Magenta); _brushes.Add(Brushes.Brown); _brushes.Add(Brushes.Gold); _brushes.Add(Brushes.Maroon); _updateInterval = ConfigurationManager.AppSettings["UpdateRate"]; }
/// <inheritdoc /> public DataBlocksController(IPlcService plcService) { this.plcService = plcService; }
public SoftBeckhoffController(ILogger <SoftBeckhoffController> logger, IPlcService plcService, IRouterService routerService) { this.logger = logger; this.plcService = plcService; this.routerService = routerService; }
public MainPageViewModel(IPlcService ModPlcService, IEventAggregator ea) { ///<summary> ///PLC Modbus service ///</summary> _plcService = ModPlcService; /// <summary> /// Delegate for Connect Commend /// </summary> ConnectCommand = new DelegateCommand(Connect); /// <summary> /// Delegate for DisConnect Commend /// </summary> DisconnectCommand = new DelegateCommand(Disconnect); /// <summary> /// Delegate for Auto Mode Commend /// </summary> StartCommand = new DelegateCommand(async() => { await Start(); }); /// <summary> /// Delegate for Manual Mode Commend /// </summary> StopCommand = new DelegateCommand(async() => { await Stop(); }); /// <summary> /// Delegate for Roter Jog Positve Start Command /// </summary> RoterJogPositveStartCommand = new DelegateCommand(async() => { await RoterJogPositveStartT(); }); /// <summary> /// Delegate for Roter Jog Positve Stop Command /// </summary> RoterJogPositveStopCommand = new DelegateCommand(async() => { await RoterJogPositveStopT(); }); /// <summary> /// Delegate for Roter Jog Negative Start Command /// </summary> RoterJogNegativeStartCommand = new DelegateCommand(async() => { await RoterJogNegativeStartT(); }); /// <summary> /// Delegate for Roter Jog Negative Stop Command /// </summary> RoterJogNegativeStopCommand = new DelegateCommand(async() => { await RoterJogNegativeStopT(); }); /// <summary> /// Delegate for Roter Axis Position Start Command /// </summary> RoterPostionStartCommand = new DelegateCommand(async() => { await RoterPostionStartCommandT(); }); /// <summary> /// Delegate for Rotery Position Jog Positve Start Command /// </summary> RoteryPosJogPositveStartCommand = new DelegateCommand(async() => { await RoteryPosJogPositveStartT(); }); /// <summary> /// Delegate for Rotery Position Jog Positve Stop Command /// </summary> RoteryPosJogPositveStopCommand = new DelegateCommand(async() => { await RoteryPosJogPositveStopT(); }); /// <summary> /// Delegate for Rotery Position Jog Negative Start Command /// </summary> RoteryPosJogNegativeStartCommand = new DelegateCommand(async() => { await RoteryPosJogNegativeStartT(); }); /// <summary> /// Delegate for Rotery Position Jog Negative Stop Command /// </summary> RoteryPosJogNegativeStopCommand = new DelegateCommand(async() => { await RoteryPosJogNegativeStopT(); }); /// <summary> /// Delegate for Rotery Position axis Positioning Start Command /// </summary> RoteryPosPostionStartCommand = new DelegateCommand(async() => { await RoteryPosPostionStartCommandT(); }); /// <summary> /// Delegate for Shorter Jog Positve Start Command /// </summary> ShorterJogPositveStartCommand = new DelegateCommand(async() => { await ShorterJogPositveStartT(); }); /// <summary> /// Delegate for Shorter Jog Positve Stop Command /// </summary> ShorterJogPositveStopCommand = new DelegateCommand(async() => { await ShorterJogPositveStopT(); }); /// <summary> /// Delegate for Shorter Jog Negative Start Command /// </summary> ShorterJogNegativeStartCommand = new DelegateCommand(async() => { await ShorterJogNegativeStartT(); }); /// <summary> /// Delegate for Shorter Jog Negative Stop Command /// </summary> ShorterJogNegativeStopCommand = new DelegateCommand(async() => { await ShorterJogNegativeStopT(); }); /// <summary> /// Delegate for Shorter axis Postiioning Start Command /// </summary> ShorterPostionStartCommand = new DelegateCommand(async() => { await ShorterPostionStartCommandT(); }); /// <summary> /// Delegate for MAin Gripper Start Command /// </summary> /// MainGripperStartCommand = new DelegateCommand(async() => { await MainGripperStartCommandT(); }); /// <summary> /// Delegate for MAin Gripper stop Command /// </summary> /// MainGripperStopCommand = new DelegateCommand(async() => { await MainGripperStopCommandT(); }); /// <summary> /// Delegate for Shorter Gripper Start Command /// </summary> /// ShorterGripperStartCommand = new DelegateCommand(async() => { await ShorterGripperStartCommandT(); }); /// <summary> /// Delegate for Shorter Gripper Stop Command /// </summary> /// ShorterGripperStopCommand = new DelegateCommand(async() => { await ShorterGripperStopCommandT(); }); /// <summary> /// Delegate for Shorter Cylinder Start Command /// </summary> /// ShorterCylinderStartCommand = new DelegateCommand(async() => { await ShorterCylinderStartCommandT(); }); /// <summary> /// Delegate for Shorter Cylinder stop Command /// </summary> /// ShorterCylinderStopCommand = new DelegateCommand(async() => { await ShorterCylinderStopCommandT(); }); /// <summary> /// Delegate for Shorter Homing Command /// </summary> /// ShorterPostionHomingCommand = new DelegateCommand(async() => { await ShorterPostionHomingCommandT(); }); /// <summary> /// Delegate for Rotery Position Homing Command /// </summary> /// RoteryPosPostionHomingCommand = new DelegateCommand(async() => { await RoteryPosPostionHomingCommandT(); }); /// <summary> /// Delegate for Rotery Homing Command /// </summary> /// RoterPostionHomingCommand = new DelegateCommand(async() => { await RoterPostionHomingCommandT(); }); /// <summary> /// Delegate for Production Reset Command /// </summary> /// ProductionResetCommand = new DelegateCommand(async() => { await ProductionResetCommandT(); }); /// <summary> /// Delegate for Manual Alignment Test Command /// </summary> /// AlignmentTestCommand = new DelegateCommand(async() => { await AlignmentTestCommandT(); }); /// <summary> /// Delegate for Manual Crack Test Command /// </summary> /// CrackCheckCommand = new DelegateCommand(async() => { await CrackCheckCommandT(); }); /// <summary> /// Delegate for Manual Dust Test Command /// </summary> /// DustCheckCommand = new DelegateCommand(async() => { await DustCheckCommandT(); }); /// <summary> /// Delegate for Auto Alignment Check Selected Command /// </summary> /// AligmentCheckSelectedCommand = new DelegateCommand(async() => { await AligmentCheckSelectedT(); }); /// <summary> /// Delegate for Auto Alignment Check Not Selected Command /// </summary> /// AligmentCheckNotSelectedCommand = new DelegateCommand(async() => { await AligmentCheckNotSelectedT(); }); /// <summary> /// Delegate for Auto Crack Check Selected Command /// </summary> /// CrackCheckSelectedCommand = new DelegateCommand(async() => { await CrackCheckSelectedT(); }); /// <summary> /// Delegate for Auto Crack Check Not Selected Command /// </summary> /// CrackCheckNotSelectedCommand = new DelegateCommand(async() => { await CrackCheckNotSelectedT(); }); /// <summary> /// Delegate for Auto Dust Check Selected Command /// </summary> /// DustCheckSelectedCommand = new DelegateCommand(async() => { await DustCheckSelectedT(); }); /// <summary> /// Delegate for Auto Dust Check Not Selected Command /// </summary> /// DustCheckNotSelectedCommand = new DelegateCommand(async() => { await DustCheckNotSelectedT(); }); //IpAddress = "192.168.1.139"; IpAddress = "127.0.0.1"; OnPlcServiceValuesRefreshed(null, null); this.PropertyChanged += OnPropertyChanged; _plcService.ValuesRefreshed += OnPlcServiceValuesRefreshed; _eventAggregator = ea; }
public SettingsPageViewModel(IPlcService s7PlcService) { _s7PlcService = s7PlcService; this.PropertyChanged += OnPropertyChanged; }