Esempio n. 1
0
        void ProcessLoginDetails(object sender, EventArgs e)
        {
            loginBtn.Enabled = false;
            password.Enabled = false;
            username.Enabled = false;

            statusProgress.Alpha      = 0;
            statusProgress.Visibility = ViewStates.Visible;
            if (statusText.Visibility == ViewStates.Visible)
            {
                statusText.AlphaAnimate(0, endAction: () => {
                    statusText.Visibility = ViewStates.Gone;
                    statusProgress.AlphaAnimate(1);
                });
            }
            else
            {
                statusProgress.Animate().Alpha(1).Start();
            }

            newCredentials.SetResult(new RentalCrendentials {
                Username = username.Text,
                Password = password.Text
            });
        }
Esempio n. 2
0
 private void StartAnimate()
 {
     progressBar.Progress      = 0;
     progressBar.ProgressColor = color;
     progressBar.Animate("SetProgress", arg =>
     {
         progressBar.Progress = arg;
         var three            = 1.0 / 3.0;
         var two = 1.0 / 1.5;
         progressBar.ProgressColor = arg < three
                 ? Color.Green
                 : arg < two
                     ? Color.Orange
                     : Color.Red;
     }, 8 * 60, levelType.LeadTime * 1000, Easing.Linear,
                         GetStack);
 }