public void AddModule(IJFModule_Motion module, string moduleName) { if (null == module) { return; } if (_lstModules.Contains(module)) { return; } if (null == moduleName) { moduleName = "Motion"; } TabPage tp = new TabPage(); tabCtrl.TabPages.Add(tp); UcMotion uc = new UcMotion(); uc.Dock = DockStyle.Fill; uc.Parent = tp; uc.Visible = true; uc.SetModuleInfo(module, null); tp.Text = moduleName; tp.Name = moduleName; tp.Controls.Add(uc); _lstModules.Add(module); }
public void UpdateModleStatus() { if (InvokeRequired) { Invoke(new Action(UpdateModleStatus)); return; } if (_lstModules.Count == 0) { return; } if (tabCtrl.SelectedIndex < 0) { return; } UcMotion uc = tabCtrl.TabPages[tabCtrl.SelectedIndex].Controls[0] as UcMotion; uc.UpdateSrc2UI(); }