示例#1
0
        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();
        }
示例#2
0
 protected override void FillDefaultCaps(ListEditorCaps caps)
 {
     base.FillDefaultCaps(caps);
     caps.Edit = true;
 }
示例#3
0
 protected virtual void FillDefaultCaps(ListEditorCaps caps)
 {
     caps.AllFlags = true;
 }
示例#4
0
 public ListEditor()
 {
     EditorCaps = new ListEditorCaps();
     FillDefaultCaps(EditorCaps);
 }