public DBLoadProgressEventArgs(IDBTableView view, int total, int current, DBItem row) : base(view, null) { this.totalCount = total; this.current = current; this.row = row; }
public void Initialize(IDBTableView view, DBItem row, DBColumn ownColumn, TableEditorMode openmode, bool readOnly) { TableView = view; OwnerColumn = ownColumn; OwnerRow = row; if (Table == null) { return; } ReadOnly = readOnly; OpenMode = openmode; Name = Table.Name.Replace(" ", "_") + ownColumn; Text = GetText(this); // toolInsert.DropDownItems.Clear(); if (openmode == TableEditorMode.Referencing) { foreach (var cs in Table.Columns.GetIsReference()) { if (cs.ReferenceTable != null && cs.Name.ToLower() != baseColumn.Name.ToLower()) { var item = new ToolMenuItem { Tag = cs, Name = cs.Name, Text = cs.ToString() }; toolAdd.DropDownItems.Add(item); } } //toolInsert.Add(new SeparatorToolItem ()); } }
public DBLoadColumnsEventArgs(IDBTableView synch) : base() { this.target = synch; }
public DBLoadCompleteEventArgs(IDBTableView synch, IEnumerable rows) : base() { this.target = synch; this.rows = rows; }
public void InitItem(IDBTableView view, bool show, GlyphType glyph, Color glyphColor) { if (view == null) { return; } TableItemNode node = null; if (show) { view.CollectionChanged += OnCollectionChanged; view.ItemPropertyChanged += OnItemPropertyChanged; views.Add(view); if (ShowListNode) { node = InitItem((IDBTableContent)view); node.Glyph = glyph; node.GlyphColor = glyphColor; node.CheckNodes = true; node.Localize(); } IEnumerable enumer = view; if (view.Table.GroupKey != null) { enumer = view.Table.SelectItems(view.Table.GroupKey, CompareType.Is, null); } foreach (DBItem item in enumer) { if ((!Current || ((DBStatus.Actual | DBStatus.Edit | DBStatus.New | DBStatus.Error) & item.Status) != DBStatus.Empty) && (!Access || item.Access.GetFlag(AccessType.Read, GuiEnvironment.User))) { var element = InitItem(item); if (ShowListNode) { element.Group = node; } else { Nodes.Add(element); } } } if (ShowListNode) { Nodes.Add(node); } } else { view.CollectionChanged -= OnCollectionChanged; view.ItemPropertyChanged -= OnItemPropertyChanged; views.Remove(view); node = (TableItemNode)Nodes.Find(GetName(view)); if (node != null) { node.Hide(); } } }
public override void AddView(IDBTableView view) { queryViews.Add(view); }
public override void RemoveView(IDBTableView view) { queryViews.Remove(view); }