예제 #1
0
 public HDITEM(HeaderItemMask mask = HeaderItemMask.All)
 {
     if (mask.IsFlagSet(HeaderItemMask.Text))
     {
         cchTextMax = 1024;
         InteropUtil.AllocString(ref pszText, ref cchTextMax);
     }
 }
예제 #2
0
 public LVCOLUMN(ListViewColumMask mask)
 {
     this.mask = mask;
     if (mask.IsFlagSet(ListViewColumMask.Text))
     {
         InteropUtil.AllocString(ref pszText, ref cchTextMax);
     }
 }
예제 #3
0
 public LVBKIMAGE(ListViewBkImageFlag flags)
 {
     ulFlags = flags;
     if (ulFlags.IsFlagSet(ListViewBkImageFlag.SourceUrl))
     {
         cchImageMax = 1024;
         InteropUtil.AllocString(ref pszImage, ref cchImageMax);
     }
 }
예제 #4
0
 public LVITEM(int item, int subitem = 0, ListViewItemMask mask = ListViewItemMask.All, ListViewItemState stateMask = ListViewItemState.None)
 {
     if (mask.IsFlagSet(ListViewItemMask.Text))
     {
         cchTextMax = 1024;
         InteropUtil.AllocString(ref pszText, ref cchTextMax);
     }
     iItem          = item;
     iSubItem       = subitem;
     this.stateMask = stateMask;
 }
예제 #5
0
            /*public LVGROUP(ListViewGroupEx grp)
             * {
             *      this.cbSize = Marshal.SizeOf(this);
             *      this.Header = grp.Header;
             *      this.ID = grp.ID;
             *      this.SetAlignment(grp.HeaderAlignment, grp.FooterAlignment);
             *      this.Footer = grp.Footer;
             *      this.DescriptionBottom = grp.DescriptionBottom;
             *      this.DescriptionTop = grp.DescriptionTop;
             *      this.Subtitle = grp.Subtitle;
             *      this.Task = grp.Task;
             *      if (grp.TitleImageIndex > 0)
             *      {
             *              this.iTitleImage = grp.TitleImageIndex;
             *              this.mask |= ListViewGroupMask.TitleImage;
             *      }
             *      ListViewGroupState s, m;
             *      grp.GetSetState(out m, out s);
             *      if (s != ListViewGroupState.Normal)
             *      {
             *              this.stateMask = m;
             *              this.state = s;
             *              this.mask |= ListViewGroupMask.State;
             *      }
             * }*/

            public LVGROUP(ListViewGroupMask mask = ListViewGroupMask.None, string header = null)
            {
                cbSize    = Marshal.SizeOf(this);
                this.mask = mask;

                if (header != null)
                {
                    this.Header = header;
                }
                else if ((mask & ListViewGroupMask.Header) != 0)
                {
                    InteropUtil.AllocString(ref pszHeader, ref cchHeader);
                }

                if ((mask & ListViewGroupMask.Footer) != 0)
                {
                    InteropUtil.AllocString(ref pszFooter, ref cchFooter);
                }

                if ((mask & ListViewGroupMask.Subtitle) != 0)
                {
                    InteropUtil.AllocString(ref pszSubtitle, ref cchSubtitle);
                }

                if ((mask & ListViewGroupMask.Task) != 0)
                {
                    InteropUtil.AllocString(ref pszTask, ref cchTask);
                }

                if ((mask & ListViewGroupMask.DescriptionBottom) != 0)
                {
                    InteropUtil.AllocString(ref pszDescriptionBottom, ref cchDescriptionBottom);
                }

                if ((mask & ListViewGroupMask.DescriptionTop) != 0)
                {
                    InteropUtil.AllocString(ref pszDescriptionTop, ref cchDescriptionTop);
                }
            }