コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: PSDRepository.cs プロジェクト: mihver1/PSD
        public bool Connect(PSDDevice psdDevice)
        {
            Connected = psdDevice.Connect();
            if (Connected)
            {
                Psd  = psdDevice;
                Name = Psd.ToString();
            }
            else
            {
                Psd = null;
            }

            return(Connected);
        }
コード例 #3
0
        public bool Connect(PSDDevice psdDevice)
        {
            var connected = psdDevice.Connect();

            if (connected)
            {
                Psd  = psdDevice;
                Name = Psd.ToString();
                Base = new Base();
            }
            else
            {
                Psd = null;
            }
            return(connected);
        }