Exemplo n.º 1
0
 public LongActionForm(ILongAction action)
 {
     InitializeComponent();
     Text = action.Caption;
     var interfaceContainer = new InterfaceContainer(action, labelText, labelProgress, progressBarProgress);
     this.action = action;
     action.InterfaceContainer = interfaceContainer;
 }
Exemplo n.º 2
0
            public InterfaceContainer(ILongAction action, Label textLabel, Label progressLabel, ProgressBar progressBar)
            {
                this.textLabel = textLabel;
                this.progressLabel = progressLabel;
                this.progressBar = progressBar;
                this.action = action;

                progressBar.Maximum = action.Max;
                UpdateProgress(0);
                textLabel.Text = action.Text;
            }