protected override void OnShown(EventArgs e) { this.taskViewItems = new Dictionary <CompressorTaskItem, CompressorTaskViewItem>(); this.ltvTasks.BeginUpdate(); this.ltvTasks.Items.Clear(); foreach (CompressorTaskItem key in this.taskItems) { CompressorTaskViewItem compressorTaskViewItem = new CompressorTaskViewItem(key); this.taskViewItems.Add(key, compressorTaskViewItem); this.ltvTasks.Items.Add((ListViewItem)compressorTaskViewItem); } this.ltvTasks.EndUpdate(); ThreadPool.QueueUserWorkItem(new WaitCallback(this.Do)); base.OnShown(e); }
protected override void OnShown(EventArgs e) { this.taskViewItems = new Dictionary<CompressorTaskItem, CompressorTaskViewItem>(); this.ltvTasks.BeginUpdate(); this.ltvTasks.Items.Clear(); foreach (CompressorTaskItem key in this.taskItems) { CompressorTaskViewItem compressorTaskViewItem = new CompressorTaskViewItem(key); this.taskViewItems.Add(key, compressorTaskViewItem); this.ltvTasks.Items.Add((ListViewItem) compressorTaskViewItem); } this.ltvTasks.EndUpdate(); ThreadPool.QueueUserWorkItem(new WaitCallback(this.Do)); base.OnShown(e); }