//public void AddNewItem(int pStorageItemID)
        //{
        //    View_GroupStorageItem view_GroupStorageItem = new View_GroupStorageItem();
        //    view_GroupStorageItem.Where.ListID.Value = mQList.ID;
        //    view_GroupStorageItem.Where.StorageItemID.Value = pStorageItemID;
        //    //view_GroupStorageItem.Query.AddOrderBy(View_ListStorageItem.ColumnNames.StorageItemID, WhereParameter.Dir.ASC);
        //    view_GroupStorageItem.Query.Load();
        //    foreach (View_GroupStorageItem view_GroupStorageItemLoop in view_GroupStorageItem.AsList())
        //    {
        //        AddNewNodeForView_GroupStorageItem(view_GroupStorageItemLoop);

        //    }
        //}

        private TreeNodeQuickList GetNewItemNodeForView_ListStorageItem(View_ListStorageItemRow pView_ListStorageItem)
        {
            TreeNodeQuickList node = new TreeNodeQuickList();

            node.Text = string.Format("{0}({1})", pView_ListStorageItem.ItemName, pView_ListStorageItem.Description);
            node.Tag  = pView_ListStorageItem;
            node.View_ListStorageItem = pView_ListStorageItem;
            node.ImageIndex           = node.SelectedImageIndex = mSysIcons.GetIconIndex(pView_ListStorageItem.GetPathIcon());
            //this.Nodes.Add(node);
            if (pView_ListStorageItem.StorageItemID == mStorageItem.ID)
            {
                node.BackColor = Color.Red;
            }

            return(node);
        }
Esempio n. 2
0
        public TreeNodeRef AddNewNodeForView_ListStorageItem(View_RefStorageItemRow pView_RefStorageItemRow)
        {
            TreeNodeRef node = new TreeNodeRef();

            //node.Text = string.Format("{0}({1})", pView_ListStorageItem.ItemName, pView_ListStorageItem.Desciption);
            node.Text = string.Format("{0} ({1})", pView_RefStorageItemRow.s_RefDesciption, pView_RefStorageItemRow.s_ItemName);
            node.Tag  = pView_RefStorageItemRow;
            node.View_RefStorageItemRow = pView_RefStorageItemRow;
            node.ImageIndex             = node.SelectedImageIndex = mSysIcons.GetIconIndex(pView_RefStorageItemRow.GetPathIcon());
            this.Nodes.Add(node);
            //node.BackColor = Color.Yellow;
            //if (!node.View_RefStorageItemRow.IsNull(View_RefStorageItemDT.ColumnNames.Color))
            //    node.BackColor = System.Drawing.Color.FromArgb(node.View_ListStorageItem.Color);

            return(node);
        }
        private TreeNodeQuickList AddNewNodeForView_ListStorageItem(View_ListStorageItemRow pView_ListStorageItem)
        {
            TreeNodeQuickList node = new TreeNodeQuickList();

            //node.Text = string.Format("{0}({1})", pView_ListStorageItem.ItemName, pView_ListStorageItem.Desciption);
            node.Text = string.Format("{0} ({1})", pView_ListStorageItem.Description, pView_ListStorageItem.ItemName);
            node.Tag  = pView_ListStorageItem;
            node.View_ListStorageItem = pView_ListStorageItem;
            node.ImageIndex           = node.SelectedImageIndex = mSysIcons.GetIconIndex(pView_ListStorageItem.GetPathIcon());
            this.Nodes.Add(node);
            //node.BackColor = Color.Yellow;
            if (!node.View_ListStorageItem.IsNull(View_ListStorageItemDT.ColumnNames.Color))
            {
                node.BackColor = System.Drawing.Color.FromArgb(node.View_ListStorageItem.Color);
            }

            return(node);
        }
        public void PutStorageItemInListViewItem(ListViewStorageItem pListViewItem, StorageItemRow pStorageItem)
        {
            pStorageItem.ListViewStorageItem = pListViewItem;
            pListViewItem.SubItems.Clear();
            pListViewItem.Text = pStorageItem.s_URL;

            //pListViewItem.SubItems.Add(pStorageItem.s_URL);
            pListViewItem.SubItems.Add(pStorageItem.s_FullPath);
            pListViewItem.SubItems.Add(pStorageItem.s_ItemName);
            pListViewItem.SubItems.Add(pStorageItem.s_Size);
            pListViewItem.SubItems.Add(pStorageItem.s_Priority);
            pListViewItem.SubItems.Add(pStorageItem.s_PagesCount);
            pListViewItem.SubItems.Add(pStorageItem.s_Description);
            //pListViewItem.SubItems.Add(pStorageItem.s_NoteItemID);
            pListViewItem.SubItems.Add(pStorageItem.NoteAsYesEmpty);
            pListViewItem.SubItems.Add(pStorageItem.s_Citation);
            pListViewItem.SubItems.Add(pStorageItem.s_ReferenceBib);
            pListViewItem.SubItems.Add(pStorageItem.s_ImportantParts);

            if (string.IsNullOrEmpty(pStorageItem.s_AdditionDate))
            {
                pListViewItem.SubItems.Add(String.Empty);
            }
            else
            {
                pListViewItem.SubItems.Add(pStorageItem.AdditionDate.ToString("dd/MM/yyyy"));
            }
            pListViewItem.Tag         = pStorageItem;
            pListViewItem.StorageItem = pStorageItem;
            // item.ImageIndex = GetImageIndexForExtension(GetExtensionForStorageItem(sItem)); ;
            pListViewItem.ImageIndex = mSysIcons.GetIconIndex(pStorageItem.GetPathIconForStorageItem());
            //if (pStorageItem.IsFixed)
            //    pListViewItem.BackColor = mFixedItemBackColor;
            //else
            //    pListViewItem.BackColor = mUnFixedItemBackColor;

            pListViewItem.ToolTipText = pStorageItem.s_Description;
        }