コード例 #1
0
 public static int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong)
 {
     if (IntPtr.Size == 4)
     {
         return((int)MetroListView.SetWindowLongPtr32(hWnd, nIndex, dwNewLong));
     }
     return((int)((long)MetroListView.SetWindowLongPtr64(hWnd, nIndex, dwNewLong)));
 }
コード例 #2
0
 public static int GetWindowLong(IntPtr hWnd, int nIndex)
 {
     if (IntPtr.Size == 4)
     {
         return((int)MetroListView.GetWindowLong32(hWnd, nIndex));
     }
     return((int)((long)MetroListView.GetWindowLongPtr64(hWnd, nIndex)));
 }
コード例 #3
0
 private void EndDisableChangeEvents()
 {
     if (this._disableChangeEvents > 0)
     {
         MetroListView metroListView = this;
         metroListView._disableChangeEvents = metroListView._disableChangeEvents - 1;
     }
 }
コード例 #4
0
 public void GetScrollPosition(out int min, out int max, out int pos, out int smallchange, out int largechange)
 {
     MetroListView.SCROLLINFO sCROLLINFO = new MetroListView.SCROLLINFO()
     {
         cbSize = (uint)Marshal.SizeOf(typeof(MetroListView.SCROLLINFO)),
         fMask  = 23
     };
     if (!MetroListView.GetScrollInfo(base.Handle, 1, ref sCROLLINFO))
     {
         min         = 0;
         max         = 0;
         pos         = 0;
         smallchange = 0;
         largechange = 0;
         return;
     }
     min         = sCROLLINFO.nMin;
     max         = sCROLLINFO.nMax;
     pos         = sCROLLINFO.nPos + 1;
     smallchange = 1;
     largechange = (int)sCROLLINFO.nPage;
 }
コード例 #5
0
        protected override void WndProc(ref Message m)
        {
            int num;
            int num1;
            int num2;
            int num3;
            int num4;

            if ((long)m.Msg == (long)277)
            {
                this.GetScrollPosition(out num1, out num, out num2, out num3, out num4);
                if (this.ScrollPositionChanged != null)
                {
                    this.ScrollPositionChanged(this, num2);
                }
                if (this._vScrollbar != null)
                {
                    this._vScrollbar.Value = num2;
                }
            }
            else if ((long)m.Msg == (long)131)
            {
                int windowLong = MetroListView.GetWindowLong(base.Handle, -16);
                if ((windowLong & 2097152) == 2097152)
                {
                    MetroListView.SetWindowLong(base.Handle, -16, windowLong & -2097153);
                }
            }
            else if ((long)m.Msg == (long)4103 || (long)m.Msg == (long)4173)
            {
                this.OnItemAdded();
            }
            else if ((long)m.Msg == (long)4104 || (long)m.Msg == (long)4105)
            {
                this.OnItemsRemoved();
            }
            base.WndProc(ref m);
        }
コード例 #6
0
        private void BeginDisableChangeEvents()
        {
            MetroListView metroListView = this;

            metroListView._disableChangeEvents = metroListView._disableChangeEvents + 1;
        }