public ViewTab(IChemControl chemControl) { InitializeComponent(); this.chemControl = chemControl; Controls.Add((Control)chemControl); ((Control)chemControl).Dock = DockStyle.Fill; chemControl.BackColor = Color.White;//SystemColors.Control; //this.Text = chemControl.Title; }
public ListViewItem[] GetConnectedItemsForListView(IChemControl chemControl, ListViewGroup atomGroup, ListViewGroup bondGroup) { IChemObject[] objs = chemControl.QueryConnected(atom); if (objs != null && objs.Length > 0) { ListViewItem[] items = new ListViewItem[objs.Length]; for (int i = 0; i < objs.Length; i++) { if (objs[i] is IAtom) items[i] = new ListViewItem("atom:" + ((IAtom)objs[i]).ID, atomGroup); else if (objs[i] is IBond) items[i] = new ListViewItem("bond", bondGroup); items[i].Tag = objs[i]; } return items; } return null; }
public ListViewItem[] GetConnectedItemsForListView(IChemControl chemControl, ListViewGroup atomGroup, ListViewGroup bondGroup) { IChemObject[] objs = chemControl.QueryConnected(atom); if (objs != null && objs.Length > 0) { ListViewItem[] items = new ListViewItem[objs.Length]; for (int i = 0; i < objs.Length; i++) { if (objs[i] is IAtom) { items[i] = new ListViewItem("atom:" + ((IAtom)objs[i]).ID, atomGroup); } else if (objs[i] is IBond) { items[i] = new ListViewItem("bond", bondGroup); } items[i].Tag = objs[i]; } return(items); } return(null); }