public DBLoadProgressEventArgs(IDBTableView view, int total, int current, DBItem row)
     : base(view, null)
 {
     this.totalCount = total;
     this.current    = current;
     this.row        = row;
 }
예제 #2
0
        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 ());
            }
        }
예제 #3
0
 public DBLoadColumnsEventArgs(IDBTableView synch)
     : base()
 {
     this.target = synch;
 }
예제 #4
0
 public DBLoadCompleteEventArgs(IDBTableView synch, IEnumerable rows)
     : base()
 {
     this.target = synch;
     this.rows   = rows;
 }
예제 #5
0
        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();
                }
            }
        }
예제 #6
0
파일: DBTableT.cs 프로젝트: radtek/datawf
 public override void AddView(IDBTableView view)
 {
     queryViews.Add(view);
 }
예제 #7
0
파일: DBTableT.cs 프로젝트: radtek/datawf
 public override void RemoveView(IDBTableView view)
 {
     queryViews.Remove(view);
 }