Ejemplo n.º 1
0
        void ConfigureOppCol(LookBoardColumn col, string tag, string filter)
        {
            col.LayoutView.ActiveFilterString = filter;

            col.LayoutView.MouseDown += new MouseEventHandler(layoutView_MouseDown);
            col.LayoutView.MouseMove += new MouseEventHandler(layoutView_MouseMove);
            //col.LayoutView.MouseUp += new MouseEventHandler(layoutView_MouseUp);
            col.LayoutView.DoubleClick += (sender, e) =>
            {
                LayoutView layoutView = sender as LayoutView;
                if (layoutView == null)
                {
                    return;
                }
                if (layoutView.FocusedRowHandle < 0)
                {
                    return;
                }
                if (OnEditItem != null)
                {
                    OnEditItem(sender, new EventArgs <object>(layoutView.GetRow(layoutView.FocusedRowHandle)));
                }
            };
            col.GridControl.DragDrop          += new DragEventHandler(gridControl_DragDrop);
            col.GridControl.DragOver          += new DragEventHandler(gridControl_DragOver);
            col.GridControl.DragLeave         += new EventHandler(gridControl_DragLeave);
            col.GridControl.GiveFeedback      += new GiveFeedbackEventHandler(gridControl_GiveFeedback);
            col.GridControl.QueryContinueDrag += new QueryContinueDragEventHandler(gridControl_QueryContinueDrag);
            col.GridControl.Tag = tag;
        }
Ejemplo n.º 2
0
        public void CreateBoards(List <LookupListItem <int> > columnTagList, string filterColumnName, Stream stream)
        {
            _filterColumnName = filterColumnName;
            tableLayoutPanelRoot.ColumnCount = columnTagList.Count;
            float percent = 100 / columnTagList.Count;

            tableLayoutPanelRoot.ColumnStyles.Clear();
            for (int tableColIndex = 0; tableColIndex < columnTagList.Count; tableColIndex++)
            {
                tableLayoutPanelRoot.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, percent));
            }
            _boardsList.Clear();
            _tagStatusCodeList.Clear();
            for (int colIndex = 0; colIndex < columnTagList.Count; colIndex++)
            {
                stream.Position = 0;
                LookBoardColumn col = new LookBoardColumn(stream);
                col.AllowDrop = true;
                col.Appearance.Options.UseBackColor = true;
                col.Dock     = System.Windows.Forms.DockStyle.Fill;
                col.Location = new System.Drawing.Point(856, 1);
                col.Margin   = new System.Windows.Forms.Padding(1, 1, 0, 1);
                col.Name     = columnTagList[colIndex] + "Proposed";
                col.Padding  = new System.Windows.Forms.Padding(7, 0, 7, 0);
                col.Size     = new System.Drawing.Size(287, 522);
                col.Tag      = "";
                tableLayoutPanelRoot.Controls.Add(col, colIndex, 0);
                string filter = "[" + _filterColumnName + "] = " + columnTagList[colIndex].Value;
                ConfigureOppCol(col, columnTagList[colIndex].DisplayName, filter);
                _tagStatusCodeList.Add(columnTagList[colIndex].DisplayName, columnTagList[colIndex].Value);
                _boardsList.Add(columnTagList[colIndex].Value, col);
            }
        }
Ejemplo n.º 3
0
        void SetColumnHoverColor(GridControl gridControl, bool hovering)
        {
            LayoutView      view   = (LayoutView)gridControl.MainView;
            LookBoardColumn oppCol = (LookBoardColumn)gridControl.Parent;

            if (hovering)
            {
                Color backColor = Color.FromArgb(242, 242, 242);
                view.Appearance.ViewBackground.BackColor = backColor; // Color.FromArgb(61, 61, 61);
                oppCol.BackColor = backColor;                         // Color.FromArgb(61, 61, 61);
            }
            else
            {
                Color activeColor = Color.FromArgb(204, 204, 204);
                view.Appearance.ViewBackground.BackColor = activeColor; // Color.FromArgb(51, 51, 51);
                oppCol.BackColor = activeColor;                         // Color.FromArgb(51, 51, 51);
            }
        }