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 bool Connect(PSDDevice psdDevice) { var connected = psdDevice.Connect(); if (connected) { Psd = psdDevice; Name = Psd.ToString(); Base = new Base(); } else { Psd = null; } return(connected); }