static public CCBFileProgress NewInstance(StackPanel parent, string pathname) { Label lblCtl = new Label(); ProgressBar pbCtl = new ProgressBar(); CCBFileProgress fp = new CCBFileProgress(pathname, pbCtl, lblCtl); CCBProgressPanel panelCtl = new CCBProgressPanel(fp); panelCtl.Children.Add(lblCtl); panelCtl.Children.Add(pbCtl); parent.Children.Add(panelCtl); return(fp); }
static public CCBFileProgress Find(StackPanel spCtl, string filename) { foreach (UIElement ctl in spCtl.Children) { if (ctl is CCBProgressPanel) { CCBProgressPanel spContent = (CCBProgressPanel)ctl; if (spContent.FileProgress.m_pathname.Equals(filename)) { return(spContent.FileProgress); } } } return(null); }