/// <summary> /// Updates form UI /// </summary> public void UpdateFormUI() { CategoryTheory.IAssociatedObject ao = atmosphere as CategoryTheory.IAssociatedObject; object o = ao.Object; if (o == null) { return; } IObjectLabel l = o as IObjectLabel; Text = l.Name; }
void IUpdatableForm.UpdateFormUI() { CategoryTheory.IAssociatedObject ao = grav as CategoryTheory.IAssociatedObject; object o = ao.Object; if (o == null) { return; } IObjectLabel l = o as IObjectLabel; Text = l.Name; }
private void fill(Panel p, bool b) { int k = b ? 0 : 1; int[,] num = selection.Numbers; int n = num[k, 0]; int m = num[k, 1]; IList <IStructuredSelectionCollection> l = selection.Selections; int y = 0; for (int i = 0; i < l.Count; i++) { IStructuredSelectionCollection coll = l[i]; CategoryTheory.IAssociatedObject ao = coll as CategoryTheory.IAssociatedObject; IObjectLabel lab = ao.Object as IObjectLabel; UserControlObject op = new UserControlObject(null, lab); op.Left = 0; op.Top = y; p.Controls.Add(op); y = op.Bottom + 5; int nSel = coll.Count; for (int j = 0; j < nSel; j++) { IStructuredSelection sel = coll[j]; RadioButton rb = new RadioButton(); rb.CheckedChanged += radioButtonSel_CheckedChanged; rb.Text = sel.Name; rb.Tag = new object[] { coll, j, b }; if (n == i & m == j) { rb.Checked = true; } rb.Left = 5; rb.Top = y; p.Controls.Add(rb); y = rb.Bottom + 5; } Panel bl = new Panel(); bl.BackColor = Color.Black; bl.Width = p.Width - 10; bl.Left = 0; bl.Top = y; bl.Height = 2; p.Controls.Add(bl); y = bl.Bottom + 5; } }