public SetPsdResult Connect(PSDDevice psdDevice) { if (psdDevice == null) { return(SetPsdResult.NotConnected); } var connected = psdDevice.Connect(); if (connected) { Psd = psdDevice; Name = Psd.ToString(); Base = new Base(); if (!Psd.Login(LoginPass)) { return(SetPsdResult.WrongPassword); } } else { Psd = null; } return(connected ? SetPsdResult.Connected : SetPsdResult.NotConnected); }
public bool Connect(PSDDevice psdDevice) { Connected = psdDevice.Connect(); if (Connected) { Psd = psdDevice; Name = Psd.ToString(); } else { Psd = null; } return(Connected); }
public PSDRepository.SetPsdResult TrySetPsdBase(PSDDevice newDevice) { /* if (_userPasses == null) * return false;*/ var newPsdBase = new PSDRepository(_userPasses.PsdLoginPass); var res = newPsdBase.Connect(newDevice); if (res == PSDRepository.SetPsdResult.Connected || res == PSDRepository.SetPsdResult.WrongPassword) { PsdBase = newPsdBase; } return(res); }
public bool TrySetPsdBase(PSDDevice newDevice) { if (_userPasses == null) { return(false); } var newPsdBase = new PSDRepository(_userPasses.PsdLoginPass); if (!newPsdBase.Connect(newDevice)) { return(false); } PsdBase = newPsdBase; return(true); }
public bool Connect(PSDDevice psdDevice) { var connected = psdDevice.Connect(); if (connected) { Psd = psdDevice; Name = Psd.ToString(); Base = new Base(); } else { Psd = null; } return(connected); }
public bool SetPsdDevice(PSDDevice device) { return(false); }