private void enableProgressBar() { LaunchButton.IsEnabled = false; KeyPairComb.IsEnabled = false; SecurityGroupComb.IsEnabled = false; ZoneComb.IsEnabled = false; mediumInst.IsEnabled = false; smallInst.IsEnabled = false; StatusDesc.Text = ConstantString.Launching; LaunchProgBar.Visibility = Visibility.Visible; LaunchProgBar.IsIndeterminate = true; Duration duration = new Duration(TimeSpan.FromSeconds(10)); DoubleAnimation doubleanimation = new DoubleAnimation(200.0, duration); LaunchProgBar.BeginAnimation(System.Windows.Controls.ProgressBar.ValueProperty, doubleanimation); _dashboard.stopStatusUpdate(); }
private void disableProgressBar() { LaunchProgBar.IsIndeterminate = false; LaunchProgBar.BeginAnimation(System.Windows.Controls.ProgressBar.ValueProperty, null); LaunchProgBar.Visibility = Visibility.Hidden; if (_launchSucceed) { StatusDesc.Text = ConstantString.Done; } else { StatusDesc.Text = ConstantString.LaunchFailed; } LaunchButton.IsEnabled = true; KeyPairComb.IsEnabled = true; SecurityGroupComb.IsEnabled = true; ZoneComb.IsEnabled = true; mediumInst.IsEnabled = true; smallInst.IsEnabled = true; }