Exemplo n.º 1
0
        public bool connectToServer()
        {
            bool flag = false;
            LicenseServiceClient licenseServiceClient = new LicenseServiceClient();

            if (licenseServiceClient.checkUser(new Trader()
            {
                Account = Settings.LocalSetting.User,
                Signature = Settings.LocalSetting.Config
            }) == 0)
            {
                flag = true;
            }
            licenseServiceClient.Close();
            return(true);
        }
Exemplo n.º 2
0
        public bool Authorize(UserData _user)
        {
            LicenseServiceClient licenseServiceClient = new LicenseServiceClient();
            bool flag;

            try
            {
                flag = licenseServiceClient.checkUser(new Trader()
                {
                    Account   = _user.User,
                    Signature = _user.Signature
                }) == 0;
                licenseServiceClient.Close();
            }
            catch
            {
                flag = false;
            }
            return(true);
        }