//========================================= // addElement //========================================= private void addElement(string strFName) { FileTimelineElement fte = new FileTimelineElement(strFName, this); fte.onConnect(); flowLayoutPanel1.Controls.Add(fte); flowLayoutPanel1.Invalidate(); FilenameControlBridge fcb = new FilenameControlBridge(); fcb.mFilename = strFName; fcb.mAssociatedControl = fte; mFileControlHash.Add(strFName, fcb); }
//========================================= // onConnect //========================================= public void onConnect() { timer1.Enabled = true; timer1.Interval = 1000; for (int i = 0; i < this.flowLayoutPanel1.Controls.Count; i++) { FileTimelineElement pEle = (FileTimelineElement)this.flowLayoutPanel1.Controls[i]; if (pEle == null) { continue; } pEle.onConnect(); } }