Exemplo n.º 1
0
        private void NotifyFeatureCommandsCollectionFinish(object sender, NotifyFeatureCommandsCollectionFinishEventArgs e)
        {
            if (e.Result.Success)
            {
                YesNo autoClose = Launcher.AutoClose;
                if (autoClose == YesNo.Yes)
                {
                    CloseForm();
                }

                if (UserInformationFirstLineLabel.InvokeRequired)
                {
                    var d = new SafeUpdateFinishButtonDelegate(UpdateFinishButton);
                    FeatureLabel.Invoke(d);
                }
                else
                {
                    UserInformationFirstLineLabel.Visible  = false;
                    UserInformationSecondLineLabel.Visible = false;
                    FinishButton.Visible = true;
                    FinishButton.Refresh();
                }
            }
            else
            {
                MessageBox.Show(e.Result.Errors.AsMessages().ToStringBuilder().ToString(), @"Error", MessageBoxButtons.OK);

                CloseForm();
            }
        }
Exemplo n.º 2
0
 private void NotifyFeatureCommandCollectionExecuted(object sender, NotifyFeatureCommandCollectionExecutedEventArgs e)
 {
     if (FeaturesProgressBar.InvokeRequired)
     {
         var d = new SafeUpdateProgressBarDelegate(UpdateProgressBar);
         FeatureLabel.Invoke(d);
     }
     else
     {
         FeaturesProgressBar.Value++;
     }
 }
Exemplo n.º 3
0
        private void NotifyFeatureCommandCollectionExecuting(object sender, NotifyFeatureCommandCollectionExecutingEventArgs e)
        {
            string featureDataText = $"{e.Feature} ({e.Index + 1}/{e.Total})";

            if (FeatureLabel.InvokeRequired)
            {
                var d = new SafeUpdateFeatureLabelDelegate(UpdateFeatureLabel);
                FeatureLabel.Invoke(d, featureDataText);
            }
            else
            {
                FeatureLabel.Text = $@"Feature: {featureDataText}";
                FeatureLabel.Refresh();
            }
        }