コード例 #1
0
 /// <summary>
 /// Siteye giriş yap
 /// </summary>
 /// <param name="loginProperty">Kullanıcı bilgileri</param>
 /// <returns></returns>
 public Task<Response> Login(LoginProperty loginProperty)
 {
     return Task.Run(() =>
     {
         Constants.BrowserService.LoadSetting();
         return Constants.LoginService.Login(loginProperty);
     });
 }
コード例 #2
0
        /// <summary>
        /// Giriş yap metodu
        /// </summary>
        /// <param name="loginProperty">Kullanıcı bilgileri</param>
        /// <returns></returns>
        public async Task <Response> Login(LoginProperty loginProperty)
        {
            // Çıktı
            var response = new Response();

            //// without an element
            //new Actions(Constants.Driver)
            //    .SendKeys(Keys.Control + Keys.Shift + "ı")
            //    .Perform();

            Constants.BrowserService.Request(Constants.LoginUrl); // sayfayı aç
            await Task.Delay(Constants.DelayTime1);               // bekle

            // Giriş açık mı kontrol et
            if (LoginStatus())
            {
                // Evet
                response.Message = "Giriş yapıldı";
                response.Code    = ResponseStatus.Success;
            }
            else
            {
                // Hayır

                // Epostayı aktar
                Constants.Driver.FindElement(By.XPath(Constants.LoginXpathEmail))
                .SendKeys(loginProperty.Username);
                await Task.Delay(Constants.DelayTime1);

                // Şifreyi aktar
                Constants.Driver.FindElement(By.XPath(Constants.LoginXpathPassword))
                .SendKeys(loginProperty.Password);
                await Task.Delay(Constants.DelayTime1);

                // Giriş yapa tıkla
                Constants.Driver.FindElement(By.XPath(Constants.LoginXpathSubmit))
                .Click();

                // Captcha çözümle
                response.Message = CaptchaResolve();
                await Task.Delay(Constants.DelayTime2);

                // Giriş kontrolü yap
                if (LoginStatus())
                {
                    response.Message = "Giriş yapıldı";
                    response.Code    = ResponseStatus.Success;
                }
                else
                {
                    response.Message = "Giriş yapılamadı";
                    response.Code    = ResponseStatus.Error;
                }
            }
            return(response);
        }
コード例 #3
0
ファイル: frmMain.cs プロジェクト: Ausadamos/Input
        private void btnLogin_Click(object sender, EventArgs e)
        {
            frmLogin_Main _frmLogin = new frmLogin_Main();

            _frmLogin.ShowDialog();
            _resultLogin = _frmLogin._resultLogin;

            //_resultLogin = new LoginProperty
            //{
            //    loginStatus = true,
            //    empDetial = new EmpProperty
            //    {
            //        name = "Ausada",
            //        sername = "Sukkheesuec"
            //    }
            //};

            if (_resultLogin.loginStatus == true)
            {
                _empLogin = _resultLogin.empDetial;

                this.btnLogin.Visible = false;

                this.panShowName.Visible     = true;
                this.panSettingTopic.Visible = true;

                this.btnInput.Visible             = true;
                this.btnSetFlow.Visible           = true;
                this.btnSetPurchase.Visible       = true;
                this.btnUpdateInput.Visible       = true;
                this.btnProcessSetting.Visible    = true;
                this.btnSubProcessSetting.Visible = true;
                this.btnCreateProductType.Visible = true;
                this.btnPO.Visible = true;

                this.lblShowName.Text = String.Format("{0} {1}.", _empLogin.name, _empLogin.sername.Substring(0, 3));


                //if (_empPCControllors.CheckEmpPCExist(_empLogin) == true)
                //{
                //    this.bttNewOrder.Visible = true;
                //    this.panOnNewOrder.Visible = true;

                //    this.bttNewCondition.Visible = true;
                //    this.panOnNewCondition.Visible = true;

                //    this.bttUploadFile.Visible = true;
                //    this.panOnUploadFile.Visible = true;

                //    this.bttUpdateData.Visible = true;
                //    this.panOnUpdateData.Visible = true;

                //}
            }
        }
コード例 #4
0
ファイル: FormMain.cs プロジェクト: lalijiw0/FaucetCryptoBot
        /// <summary>
        /// Siteye giriş yap butonu
        /// </summary>
        private async void btnLogin_ClickAsync(object sender, EventArgs e)
        {
            btnLogin.Enabled       = false;
            btnBrowserQuit.Enabled = true;

            var userParam = new LoginProperty
            {
                Username = tbxEmail.Text,
                Password = tbxPassword.Text
            };

            var loginResult = await _faucetCryptoBotApi.Login(userParam);

            lblStatus.Text       = loginResult.Message;
            toolStatusLabel.Text = loginResult.Message;
            if (loginResult.Code == ResponseStatus.Success)
            {
                BalanceFirst            = 0;
                _isLogin                = true;
                grpbxApiService.Enabled = true;
            }
        }
 set => SetValue(LoginProperty, value);
コード例 #6
0
        public async Task <IHttpActionResult> Login([FromBody] LoginProperty postparams)
        {
            var data = await Task.Run(() => asp.GET_USERLOGIN(postparams.uM_USER_NAME, postparams.uM_PASSWORD));

            return(Ok(data));
        }
コード例 #7
0
 get => (string)GetValue(LoginProperty); set => SetValue(LoginProperty, value);