private void Editor_IsDirtyChanged(EntityEditor editEntity)
        {
            var tab = editEntity.Parent as TabPage;

            tab.Text = editEntity.Entity.EntityName + "*";
            _isDirty = true;
            SetupToolbar();
        }
        private void LoadEntity(Entity entity)
        {
            var tab = new TabPage(entity.EntityName);

            tab.Tag = entity;
            tabMain.TabPages.Add(tab);
            // see if we need to make a copy
            var item = entity;

            if (entity.StatusCode == EntityStatusCodes.Active)
            {
                // make a copy of this entity
                item = EntityLogic.CopyEntity(entity, _currentRevision);
            }

            var editor = new EntityEditor(item, _project);

            tab.Controls.Add(editor);
            editor.Dock            = DockStyle.Fill;
            editor.IsDirtyChanged += Editor_IsDirtyChanged;
            _tabList.Add(new TabData(tab, editor, entity));
        }
Example #3
0
 public TabData(TabPage tab, EntityEditor editor, Entity entity)
 {
     Tab    = tab;
     Editor = editor;
     Entity = entity;
 }