private void UpdateState(PLCConnectorFullEditable source, PLCConnectorModuleConfigure target) { // target.Id = source.; // musi byt lockle pro edit - musí se vytvářet samo target.IpString = source.IpString; target.PortString = source.PortString; target.Rack = source.Rack; target.Slot = source.Slot; }
private void NavToAddEditPLCConnectorModule(PLCConnectorModuleConfigure p_obj) { // jeste zjistit jestli na to ma uzivatel prava AddEditPLCConnectorViewModel Temp = new AddEditPLCConnectorViewModel(p_obj); Temp.Done += NavToPLCConnectorModule; CurrentPage = Temp; CurrentPageName = "Add/Edit PLC Connector Module"; CurrentPage.IsRightsMode = true; //volani permission modulu }
private void CopyState(PLCConnectorModuleConfigure source, PLCConnectorFullEditable target) { if (isEditMode) { target.IpString = source.IpString; target.PortString = source.PortString; target.Rack = source.Rack; target.Slot = source.Slot; } }
public AddEditPLCConnectorViewModel(PLCConnectorModuleConfigure p_PLC) { CancelCommand = new RelayCommand(OnCancel); SaveCommand = new RelayCommand(OnSave, CanSave); if (p_PLC != null) { // SetState(p_PLC); } else { SetPLC(null); } }
public void SetPLC(PLCConnectorModuleConfigure p_PLC) { if (p_PLC == null) { isEditMode = false; p_PLC = new PLCConnectorModuleConfigure(); } EdditingPlcConnectorModuleConfigure = p_PLC; if (PLC != null) { PLC.ErrorsChanged -= RaiseCanExecuteChanged; } PLC = new PLCConnectorFullEditable(); PLC.ErrorsChanged += RaiseCanExecuteChanged; CopyState(EdditingPlcConnectorModuleConfigure, PLC); }
private void OnStopPLC(PLCConnectorModuleConfigure p_obj) { }
private void OnRestartPLC(PLCConnectorModuleConfigure p_obj) { }
private void OnComObject(PLCConnectorModuleConfigure p_state) { ComObjectRequested(p_state.Id); }
private void OnEditPLC(PLCConnectorModuleConfigure p_state) { AddEditPLCRequested(p_state); }