void PropertyEditor_DocumentChanged(object sender, DocumentChangedEventArgs args) { ISelectionContext docBase = args.New as ISelectionContext; if (docBase != null) { docBase.SelectionChanged += docBase_SelectionChanged; if (docBase.SelectionCount != 0) { docBase_SelectionChanged(docBase, null); // EventArgs is unused } return; } Documents.IPropertyDocument pdoc = args.New as Documents.IPropertyDocument; if (pdoc != null) { pdoc.PropertyBoundChanged += pdoc_PropertyBoundChanged; sonygrid.Visible = true; sonygrid.Bind(pdoc.PropertyBound); return; } sonygrid.Bind(null); sonygrid.Visible = false; }
void tree_SelectionChanged(object sender, EventArgs e) { if (tree.SelectedNodes.Count() == 1) { propertyGrid.Visible = true; propertyGrid.Bind(tree.SelectedNodes.First().Tag); } else { propertyGrid.Visible = false; propertyGrid.Bind(null); } }
NewPlacementsPage() { m_config = new Config(); m_control = new Sce.Atf.Controls.PropertyEditing.PropertyGrid(); m_control.Dock = DockStyle.Fill; m_control.Visible = true; m_control.Bind((new Helper()).CreatePropertyContext(m_config)); }
NewPlacementsPage() { m_config = new Config(); m_control = new Sce.Atf.Controls.PropertyEditing.PropertyGrid(); m_control.Dock = DockStyle.Fill; m_control.Visible = true; m_control.Bind((new Helper()).CreatePropertyContext(m_config)); }