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 SetPsdResult Connect(PSDDevice psdDevice) { 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; }