private void Editor_IsDirtyChanged(EditEntity editEntity) { var tab = editEntity.Parent as TabPage; tab.Text = editEntity.Entity.EntityName + "*"; isDirty = true; SetupToolbar(); }
private void LoadEntity(EntityInfo entity) { var tab = new TabPage(entity.EntityName); tab.Tag = entity; tabMain.TabPages.Add(tab); var editor = new EditEntity(entity, () => getNewFieldId()); tab.Controls.Add(editor); editor.Dock = DockStyle.Fill; editor.IsDirtyChanged += Editor_IsDirtyChanged; tabList.Add(new TabInfo(entity, editor, tab)); }
public TabInfo(EntityInfo entity, EditEntity editor, TabPage tagPage) { Entity = entity; Editor = editor; TagPage = tagPage; }