public CopyProgress(FileCopier.BuildType buildType, bool copyTestFiles) { InitializeComponent(); this.Size = new Size(1200, 600); mBuildType = buildType; mCopyTestFiles = copyTestFiles; }
public CopyProgress(Window owner, FileCopier.BuildType buildType, bool copyTestFiles) { InitializeComponent(); Owner = owner; DataContext = this; mBuildType = buildType; mCopyTestFiles = copyTestFiles; mDefaultColor = ((SolidColorBrush)progressRichTextBox.Foreground).Color; // Create and configure the BackgroundWorker. mWorker = new BackgroundWorker(); mWorker.WorkerReportsProgress = true; mWorker.WorkerSupportsCancellation = true; mWorker.DoWork += BackgroundWorker_DoWork; mWorker.ProgressChanged += BackgroundWorker_ProgressChanged; mWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted; progressRichTextBox.Document = mFlowDoc; }