コード例 #1
0
ファイル: DataList.cs プロジェクト: modulexcite/ListControls
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
		public DataList()
		{
            ptsCurrent = new Point[3];
            ptsNewRow = new Point[16];

            this.BorderStyle = BorderStyle.Fixed3D;
            sepColor = Color.Black;
            sepHeight = 1;
            showSep = showNav = showAddDel = allowAdditions = allowEdits = allowDeletes = true;
            dataMember = String.Empty;
            changePolicy = new ChangePolicy(this);
            shortcutAdd = Shortcut.CtrlShiftA;
            shortcutDel = Shortcut.CtrlShiftD;
            shortcutRowNum = Shortcut.F5;
            shortcutSwitchSection = Shortcut.F6;
            rowHeadersVisible = true;
            rowHeaderWidth = 20;
            brHeaderBack = new SolidBrush(SystemColors.Control);
            brHeaderFore = new SolidBrush(SystemColors.ControlDarkDark);
            brSelBack = new SolidBrush(SystemColors.ControlDark);
            brSelFore = new SolidBrush(SystemColors.Control);
            repeatWait = 500;
            repeatInterval = 50;
            selStart = selEnd = -1;

            // Turn on redraw on resize and double-buffering
            this.SetStyle(ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.DoubleBuffer |
                ControlStyles.AllPaintingInWmPaint, true);
            this.UpdateStyles();

			// This call is required by the Windows.Forms Form Designer
			InitializeComponent();

            showCaption = lblCaption.Visible = false;
		}
コード例 #2
0
        //=====================================================================

        /// <summary>
        /// Constructor
        /// </summary>
		public DataNavigator()
		{
            this.BorderStyle = BorderStyle.None;
            showAddDel = allowAdditions = allowEdits = allowDeletes = true;
            dataMember = String.Empty;
            changePolicy = new ChangePolicy(this);
            shortcutAdd = Shortcut.CtrlShiftA;
            shortcutDel = Shortcut.CtrlShiftD;
            shortcutRowNum = Shortcut.F5;
            repeatWait = 500;
            repeatInterval = 50;

			// This call is required by the Windows.Forms Form Designer
			InitializeComponent();
		}