コード例 #1
0
ファイル: LongActionForm.cs プロジェクト: Gvin/Diplom
 public LongActionForm(ILongAction action)
 {
     InitializeComponent();
     Text = action.Caption;
     var interfaceContainer = new InterfaceContainer(action, labelText, labelProgress, progressBarProgress);
     this.action = action;
     action.InterfaceContainer = interfaceContainer;
 }
コード例 #2
0
ファイル: LongActionForm.cs プロジェクト: Gvin/Diplom
            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;
            }