Exemplo n.º 1
0
        private void CreateViewsColumns()
        {
            var objectCols = FormReplacementHelper.GetDefaultObjectColumnTitles();

            StaticMethods.CreateDataGridViewColumn(ObjectView, objectCols);
            var mayReplCols = FormReplacementHelper.GetDefaultMayReplacementColumnTitles();

            StaticMethods.CreateDataGridViewColumn(ObjectMayView, mayReplCols);
        }
Exemplo n.º 2
0
        private void SetStyleForActiveRows()
        {
            var activedStyle = ObjectView.Rows[0].InheritedStyle.Clone();

            activedStyle.BackColor = Color.LightGray;

            var checkColumns = FormReplacementHelper.GetCheckBoxColumnNames();

            SetRowsStyle(ObjectView, activedStyle, "ISNULL(_ActiveObjectId,0)<>0", checkColumns);
            SetRowsStyle(ObjectMayView, activedStyle, "ISNULL(_PassiveObjectId,0)<>0", checkColumns);
        }
Exemplo n.º 3
0
        private void SetDefaultCellStyleForPair(DataGridViewRow dgvRow)
        {
            var bs           = (BindingSource)ObjectMayView.DataSource;
            var row          = ((DataRowView)dgvRow.DataBoundItem).Row;
            var indx         = bs.Find("ObjectId", row["_ActiveObjectId"]);
            var checkColumns = FormReplacementHelper.GetCheckBoxColumnNames();

            if (indx > -1)
            {
                StaticMethods.SetDefaultCellStyleForRow(ObjectMayView.Rows[indx], _defaultStyle, checkColumns);
            }
            StaticMethods.SetDefaultCellStyleForRow(dgvRow, _defaultStyle, checkColumns);
        }