示例#1
0
        public void RefreshStatus(CloudConnectEntity entity)
        {
            Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
            {
                string title = string.Format("Connect to {0}", entity.CloudServiceName);
                this.Title = title;
                lblTitle.Content = title;

                _canCheckForAuthentication = entity.CurrentStep > 1;
                lblStep1.Foreground = entity.CurrentStep > 1 ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Color.FromRgb(153, 153, 153));
                lblStep2.Foreground = entity.CurrentStep > 2 ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Color.FromRgb(153, 153, 153));
                lblStep2B.Foreground = entity.CurrentStep > 2 ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Color.FromRgb(153, 153, 153));
                lblStep3.Foreground = entity.CurrentStep > 3 ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Color.FromRgb(153, 153, 153));
                lblStep4.Foreground = entity.IsAuthenticated ? new SolidColorBrush(Colors.White) : new SolidColorBrush(Color.FromRgb(153, 153, 153));
                btnOK.IsEnabled = entity.IsAuthenticated;

                if (entity.IsAuthenticated)
                {
                    progressBar.IsIndeterminate = false;
                    progressBar.Value = 100;
                }
            }));
        }
示例#2
0
 public void RefreshStatus(CloudConnectEntity entity)
 {
     Activity.RunOnUiThread(() =>
     {
         Dialog.SetTitle(string.Format("Connect to {0}", entity.CloudServiceName));
         _btnOK.Enabled = entity.IsAuthenticated;
         _progressBar.Visibility = entity.IsAuthenticated ? ViewStates.Gone : ViewStates.Visible;
         _lblStatus.Text = string.Format(entity.IsAuthenticated ? "Connected to {0} successfully!" : "Connecting to {0}...", entity.CloudServiceName);
     });
 }
        public void RefreshStatus(CloudConnectEntity entity)
        {
            InvokeOnMainThread(() =>
            {
                string title = string.Format("Connect to {0}", entity.CloudServiceName);
                Window.Title = title;
                lblTitle.StringValue = title;

                _canCheckForAuthentication = entity.CurrentStep > 1;
                lblStep1.TextColor = entity.CurrentStep > 1 ? NSColor.White : _uncompletedStepColor;
                lblStep2.TextColor = entity.CurrentStep > 2 ? NSColor.White : _uncompletedStepColor;
                lblStep2B.TextColor = entity.CurrentStep > 2 ? NSColor.White : _uncompletedStepColor;
                lblStep3.TextColor = entity.CurrentStep > 3 ? NSColor.White : _uncompletedStepColor;
                lblStep4.TextColor = entity.IsAuthenticated ? NSColor.White : _uncompletedStepColor;
                btnOK.Enabled = entity.IsAuthenticated;
                btnCancel.Enabled = !entity.IsAuthenticated;

                if (entity.IsAuthenticated)
                {
                    progressBar.Value = 1;
                    progressBar.IsIndeterminate = false;
                }
            });
        }