示例#1
0
        public RowNode(ListWnd parent)
        {
            m_Parent = parent;
            m_Row    = m_Parent.GetNewRow();

            m_PreviousNode = null;
            m_NextNode     = null;
        }
示例#2
0
        public RowNode(ListWnd parent, Row r)
        {
            m_Parent         = parent;
            m_Row            = r;
            m_Row.ParentNode = this;

            m_PreviousNode = null;
            m_NextNode     = null;
        }
示例#3
0
        protected override void Dispose(bool bDisposing)
        {
            if (bDisposing)
            {
                this.Items.Clear();
                m_ParentList.Controls.Remove(this);
                m_ParentList = null;
            }

            base.Dispose(bDisposing);
        }
示例#4
0
        internal Row(ListWnd parent)
        {
            m_Cells  = new CellCollection(this);
            m_Parent = parent;

            m_Height = 2 * m_Parent.CellPadding + m_Parent.Font.Height;

            for (int i = 0; i < m_Parent.Columns.Count; i++)
            {
                Cell JustAdded = m_Cells.Add(this, i);
            }
        }
示例#5
0
        internal ColumnHeader(ListWnd ParentWnd)
        {
            m_Parent                  = ParentWnd;
            m_Columns                 = new ColumnCollection(ParentWnd);
            m_Columns.ColumnAdded    += new ColumnCollectionChanged(OnColumnAdded);
            m_Columns.ColumnRemoving += new ColumnCollectionChanged(OnColumnRemoving);
            m_Columns.ColumnRemoved  += new ColumnCollectionColumnChanged(OnColumnRemoved);

            m_bVisible           = false;
            m_bMouseDownInHeader = false;

            ColumnsDiag = new ThresholdDiag("ColumnHeader.OnPaint", null, 100.0);
        }
示例#6
0
        internal ColumnComboBox(ListWnd parent, string strComboSource)
        {
            m_ParentList = parent;
            m_ParentList.Controls.Add(this);
            m_IDtoComboValue = new Dictionary <long, ComboValue>();
            SetComboSource(strComboSource);
            this.DropDownStyle  = ComboBoxStyle.DropDownList;
            this.Visible        = false;
            this.DroppedDown    = false;
            m_bCancelOnDblClick = false;

            m_PendEdit          = new Timer();
            m_PendEdit.Interval = SystemInformation.DoubleClickTime;
            m_PendEdit.Tick    += new EventHandler(OnPendTimerTick);
        }
示例#7
0
        internal DropDownWnd(DataList parent, ListWnd control)
        {
            m_Parent = parent;
            m_List   = control;

            m_host      = new ToolStripControlHost(control);
            m_host.Font = m_Parent.Font;

            Padding  = new Padding(0);
            Margin   = new Padding(0);
            AutoSize = true;

            this.DropShadowEnabled = false;
            this.Items.Add(m_host);
        }
示例#8
0
        protected override void Dispose(bool disposing)
        {
            if (!m_bDisposed)
            {
                if (disposing)
                {
                    m_ToolTipWnd.DestroyHandle();

                    m_ShowTimer.Dispose();
                    m_Parent     = null;
                    m_ParentCell = null;

                    m_bDisposed = true;
                }
            }

            base.Dispose(disposing);
        }
示例#9
0
        public CellToolTip(ListWnd parent)
        {
            m_Parent = parent;

            m_bDisposed  = false;
            m_ToolTipWnd = new ToolTipNativeWindow(this);

            m_Visible = false;

            m_ShowTimer = new Timer();
            m_ShowTimer.Stop();
            m_ShowTimer.Interval = SystemInformation.DoubleClickTime + 200;

            CreateToolTipWnd();

            m_ShowTimer.Tick += new EventHandler(m_ShowTimer_Tick);

            m_bTrackingMouseLeave = false;
        }
示例#10
0
        public DataList()
        {
            SetStyle(
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.OptimizedDoubleBuffer |
                ControlStyles.UserPaint |
                ControlStyles.Selectable |
                ControlStyles.UserMouse,
                true);

            m_nStateId      = (int)ComboBoxState.Normal;
            m_nComboStateId = (int)ComboBoxState.Normal;
            m_bReadOnly     = false;

            m_bMouseDownInButton = false;
            m_nDropDownMaxHeight = 300;
            m_nDropDownWidth     = -1;
            m_strComboText       = "";

            m_ThemeManager = new MultiWindowUxThemeManager(this);

            m_ShowNull           = false;
            m_ShowGridLines      = true;
            m_bAllowEdit         = true;
            m_bIsComboBox        = false;
            m_bComboClosedButton = false;
            m_rButtonArea        = Rectangle.Empty;
            m_AllowRowColorCombo = false;

            m_RowWnd      = new ListWnd(this);
            m_RowWnd.Size = this.ClientRectangle.Size;
            this.Controls.Add(m_RowWnd);

            m_RowWnd.CellEditFinishing += new DataListCellEditFinishing(FireCellEditFinishing);
            m_RowWnd.CellEditStarting  += new DataListCellEditStarting(FireCellEditStarting);
            m_RowWnd.RowSelectionMade  += new DataListRowSelected(FireRowSelected);
            m_RowWnd.RowDoubleClicked  += new DataListRowClicked(FireRowDoubleClicked);
            m_RowWnd.RowClicked        += new DataListRowClicked(FireRowClicked);
            m_RowWnd.CellEditFinished  += new DataListCellEditFinished(FireCellEditFinished);
            m_RowWnd.CellEditStarted   += new DataListCellEditStarted(FireCellEditStarted);
            m_RowWnd.CellEditFailed    += new DataListCellEditFailed(FireCellEditFailed);
        }
示例#11
0
        internal CellTextBox(ListWnd parent)
        {
            m_Parent         = parent;
            base.BorderStyle = BorderStyle.FixedSingle;
            base.Multiline   = true;
            base.WordWrap    = true;

            // this is how to set margins, but you can only do it for the first time... may have to set up the datalist to destroy and recreate the handle each time
            //Win32.SendMessage(this.Handle, (uint)WindowsMessages.EM_SETMARGINS, 0x1 | 0x2, new IntPtr((m_Parent.CellPadding << 16) + m_Parent.CellPadding));

            m_CurrentRow = null;
            m_CurrentCol = -1;

            m_PendEdit          = new Timer();
            m_PendEdit.Interval = SystemInformation.DoubleClickTime;
            m_PendEdit.Tick    += new EventHandler(OnPendTimerTick);

            m_bCancelOnDblClick = false;
            //m_bNumericOnly = false;
            m_bCtrlDown = false;
        }
示例#12
0
 internal ColumnCollection(ListWnd parent)
     : base()
 {
     m_Parent = parent;
 }
示例#13
0
 internal RowColorManager(ListWnd Parent) : base()
 {
     m_Parent = Parent;
 }
示例#14
0
 internal CellColorManager(ListWnd Parent)
 {
     m_Parent = Parent;
 }
示例#15
0
 internal RowCollection(ListWnd parent)
 {
     m_Parent          = parent;
     m_nCount          = 0;
     m_nTotalRowHeight = 0;
 }