public ListEditorFrame(ListEditor editor, IList items) { InitializeComponent(); m_editor = editor; m_items = m_editor.ReloadItems(items); m_caps = m_editor.EditorCaps; propertyFrame1.Enabled = m_caps.Edit; btnDuplicate.Enabled = m_caps.Duplicate; btnRemove.Enabled = m_caps.Delete; btnAdd.Enabled = m_caps.CreateNew; btnRename.Enabled = m_caps.Rename; btnMoveUp.Visible = m_caps.Reorder; btnMoveDown.Visible = m_caps.Reorder; btnRefresh.Visible = m_caps.Refresh; LoadItems(); }
protected override void FillDefaultCaps(ListEditorCaps caps) { base.FillDefaultCaps(caps); caps.Edit = true; }
protected virtual void FillDefaultCaps(ListEditorCaps caps) { caps.AllFlags = true; }
public ListEditor() { EditorCaps = new ListEditorCaps(); FillDefaultCaps(EditorCaps); }