예제 #1
0
        private void initializeGridComponent()
        {
            adapter.Fill(ds, "Compras");
            userTable = ds.Tables[0];
            gridControlComprarLista.DataSource = null;
            gridControlComprarLista.DataSource = userTable.DefaultView;//ds.Tables[0];
            //   numberOfRows = gridViewComprarlista.RowCount;
            ((DevExpress.XtraGrid.Views.Grid.GridView)gridControlComprarLista.Views[0]).Columns[1].FieldName = "ComprasId";
            ((DevExpress.XtraGrid.Views.Grid.GridView)gridControlComprarLista.Views[0]).Columns[2].FieldName = "InsumoId";
            ((DevExpress.XtraGrid.Views.Grid.GridView)gridControlComprarLista.Views[0]).Columns[3].FieldName = "Cantidad";
            ((DevExpress.XtraGrid.Views.Grid.GridView)gridControlComprarLista.Views[0]).Columns[5].FieldName = "Total";       //"Total";
            ((DevExpress.XtraGrid.Views.Grid.GridView)gridControlComprarLista.Views[0]).Columns[4].FieldName = "CostoUnidad"; // "Descripcion";
            ((DevExpress.XtraGrid.Views.Grid.GridView)gridControlComprarLista.Views[0]).Columns[6].FieldName = "Descripcion";
            ((DevExpress.XtraGrid.Views.Grid.GridView)gridControlComprarLista.Views[0]).Columns[7].FieldName = "FechaCompra";
            //     ((DevExpress.XtraGrid.Views.Grid.GridView)gridControlComprarLista.Views[0]).Columns[8].FieldName = "InsumoId";

            RepositoryItemCheckEdit checkEdit = gridControlComprarLista.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;

            checkEdit.PictureChecked   = imageList1.Images[0]; // Image.FromFile("C:\\Users\\Daniel\\Downloads\\iInventory\\iInventory\\iInventory\\Resources\\bbsave.ico");
            checkEdit.PictureUnchecked = imageList1.Images[0]; //Image.FromFile("C:\\Users\\Daniel\\Downloads\\iInventory\\iInventory\\iInventory\\Resources\\bbsave.ico");
            checkEdit.CheckStyle       = DevExpress.XtraEditors.Controls.CheckStyles.UserDefined;
            gridViewComprarlista.Columns[0].ColumnEdit = checkEdit;
            gridViewComprarlista.Columns[0].Visible    = false;
            gridViewComprarlista.ValidateRow          += new DevExpress.XtraGrid.Views.Base.ValidateRowEventHandler(gridViewCompras_ValidateRow);
            gridViewComprarlista.ValidatingEditor     += new DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventHandler(gridViewComprarlista_ValidatingEditor);
            loadInsumosComponent();
            checkEdit.Click += new EventHandler(checkEdit_Click);
        }
예제 #2
0
        public static void AddModifyCheckMark(GridControl gridControl, RepositoryItemCheckEdit repCheck, GridColumn MODIFY_MARK)
        {
            GridView gv = (GridView)gridControl.MainView;

            MODIFY_MARK.OptionsColumn.AllowEdit = false;
            repCheck.CheckedChanged            += delegate(object sender, EventArgs e) {
                DataTable dt = (DataTable)gridControl.DataSource;

                if (!dt.Columns.Contains(MODIFY_MARK.FieldName))
                {
                    DataColumn colMark = new DataColumn("MODIFY_MARK");
                    colMark.DefaultValue = " ";
                    dt.Columns.Add(colMark);
                }

                int row = gv.FocusedRowHandle;

                string mark = gv.GetRowCellValue(row, MODIFY_MARK).AsString();

                if (String.IsNullOrEmpty(mark))
                {
                    gv.SetRowCellValue(row, MODIFY_MARK, "※");
                }
                else
                {
                    gv.SetRowCellValue(row, MODIFY_MARK, "");
                }
            };
        }
예제 #3
0
        protected virtual void Attach(GridView view)
        {
            if (view == null)
            {
                return;
            }
            selection.Clear();

            this.view              = view;
            edit                   = view.GridControl.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;
            edit.EditValueChanged += edit_EditValueChanged;

            column = view.Columns.Add();
            column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            column.VisibleIndex            = int.MaxValue;
            column.FieldName = "CheckMarkSelection";
            column.Caption   = "Mark";
            column.OptionsColumn.ShowCaption = false;
            column.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            column.ColumnEdit  = edit;
            column.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            column.Width = 60;

            view.CustomDrawColumnHeader  += View_CustomDrawColumnHeader;
            view.CustomDrawGroupRow      += View_CustomDrawGroupRow;
            view.CustomUnboundColumnData += view_CustomUnboundColumnData;
            //view.RowStyle += view_RowStyle;
            view.MouseDown += view_MouseDown; // clear selection
        }
        public void Init(ICollection <GridColumn> checkBoxColumns)
        {
            m_GridView = Views[0] as GridView;
            if (m_GridView == null)
            {
                throw new InvalidOperationException("No gridview initialized");
            }

            m_CheckBoxColumns = checkBoxColumns;

            if (checkBoxColumns != null && checkBoxColumns.Count > 0)
            {
                RepositoryItemCheckEdit checkEdit;
                foreach (GridColumn column in checkBoxColumns)
                {
                    checkEdit                = new RepositoryItemCheckEdit();
                    checkEdit.Caption        = string.Empty;
                    checkEdit.GlyphAlignment = DevExpress.Utils.HorzAlignment.Far;
                    m_DTColumn2CheckEdit.Add(column, checkEdit);
                }

                m_GridView.CellValueChanging      += new DevExpress.XtraGrid.Views.Base.CellValueChangedEventHandler(GridView_CellValueChanging);
                m_GridView.MouseDown              += new MouseEventHandler(GridView_MouseDown);
                m_GridView.CustomDrawColumnHeader += new ColumnHeaderCustomDrawEventHandler(GridView_CustomDrawColumnHeader);
                m_GridView.RowCountChanged        += new EventHandler(GridView_RowCountChanged);
            }
        }
예제 #5
0
        private void PopulateFlatType()
        {
            dtFlatType = new DataTable();
            try
            {
                dtFlatType             = CompetitorBL.GetFlatType(m_sFlatTypeId);
                grdFlatType.DataSource = dtFlatType;
                grdViewFlatType.Columns["FlatTypeId"].Visible = false;
                grdViewFlatType.Columns["MinArea"].Visible    = false;
                grdViewFlatType.Columns["MaxArea"].Visible    = false;
                grdViewFlatType.Columns["FlatTypeName"].OptionsColumn.AllowEdit        = false;
                grdViewFlatType.Columns["Sel"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
                RepositoryItemCheckEdit chkSel = new RepositoryItemCheckEdit();
                chkSel.CheckedChanged += chkSel_CheckedChanged;

                grdViewFlatType.BestFitColumns();

                grdViewFlatType.Appearance.FocusedCell.BackColor = Color.Teal;
                grdViewFlatType.Appearance.FocusedCell.ForeColor = Color.White;
                grdViewFlatType.Appearance.FocusedRow.ForeColor  = Color.Teal;
                grdViewFlatType.Appearance.FocusedRow.BackColor  = Color.White;

                grdViewFlatType.OptionsSelection.EnableAppearanceHideSelection = false;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        private RepositoryItemCheckEdit CreateCheckEdit(object value)
        {
            var ri = new RepositoryItemCheckEdit();
            try
            {
                // you can cache your items here

                ri.Assign(rceCheck);
                ri.LockEvents();

                if (value.ToString().Equals("Y"))
                {
                    //Uncheck
                    ri.Enabled = true;
                    ri.ValueChecked = "Y";
                }
                else if (value.ToString().Equals("N"))
                {
                    //Uncheck
                    ri.Enabled = true;
                    ri.ValueUnchecked = "N";
                }
                return ri;
            }
            catch (Exception ex)
            {

             //   Logger.Error(ex);
            }
            return ri;
        }
예제 #7
0
        private void ControlSettings_Load(object sender, EventArgs e)
        {
            if (DesignMode)
            {
                return;
            }

            _backendSettings = new BackendSettings();
            _backendSettings.Load(ConfigurationStorage.LocalAndGlobal);

            propertyGridControl1.SelectedObject      = _backendSettings;
            propertyDescriptionControl1.PropertyGrid = propertyGridControl1;
            var generalCheckBox = new RepositoryItemCheckEdit();

            propertyGridControl1.OptionsBehavior.PropertySort = PropertySort.NoSort;
            propertyGridControl1.DefaultEditors.Add(typeof(bool), generalCheckBox);
            var passwordField = new RepositoryItemTextEdit {
                PasswordChar = '*'
            };

            propertyGridControl1
            .Rows[$"row{AttributeNamesBackend.Password}"]
            .Properties
            .RowEdit = passwordField;

            propertyGridControl1
            .Rows[$"row{AttributeNamesBackend.TimeSpan}"]
            .Properties
            .RowEdit = GetSpinEdit(10, 60, 5);

            propertyGridControl1.CustomRecordCellEdit += (o, ev) =>
            {
                Console.WriteLine(ev.Row.Name);
            };
        }
예제 #8
0
        /// <summary>
        /// 그리드의 컬럼에 체크박스 형식을 바인딩한다.
        /// </summary>
        /// <param name="gv"></param>
        /// <param name="col"></param>
        /// <returns></returns>
        public static RepositoryItemCheckEdit GridView_Column_CheckEdit(GridView gv, GridColumn col, object ValueChecked = null, object ValueUnchecked = null,
                                                                        object ValueGrayed = null)
        {
            RepositoryItemCheckEdit item = new RepositoryItemCheckEdit();

            if (ValueChecked == null)
            {
                ValueChecked = true;
            }
            if (ValueUnchecked == null)
            {
                ValueUnchecked = false;
            }


            item.ValueGrayed    = ValueGrayed;
            item.ValueChecked   = ValueChecked;
            item.ValueUnchecked = ValueUnchecked;

            gv.GridControl.RepositoryItems.Add(item);
            item.AllowGrayed = false;
            col.ColumnEdit   = item;

            return(item);
        }
        private void DrawCheckBox(Graphics g, Rectangle r, RepositoryItemCheckEdit checkEdit, CheckState state)
        {
            DevExpress.XtraEditors.ViewInfo.CheckEditViewInfo      info;
            DevExpress.XtraEditors.Drawing.CheckEditPainter        painter;
            DevExpress.XtraEditors.Drawing.ControlGraphicsInfoArgs args;
            checkEdit.AllowGrayed = true;

            info = checkEdit.CreateViewInfo() as DevExpress.XtraEditors.ViewInfo.CheckEditViewInfo;
            if (state == CheckState.Unchecked)
            {
                info.EditValue = false;
            }
            else if (state == CheckState.Checked)
            {
                info.EditValue = true;
            }
            else
            {
                info.EditValue = null;
            }

            painter = checkEdit.CreatePainter() as DevExpress.XtraEditors.Drawing.CheckEditPainter;

            info.Bounds = r;
            info.PaintAppearance.ForeColor = Color.FromArgb(180, 180, 180);
            info.CalcViewInfo(g);
            args = new DevExpress.XtraEditors.Drawing.ControlGraphicsInfoArgs(info, new DevExpress.Utils.Drawing.GraphicsCache(g), r);
            painter.Draw(args);
            args.Cache.Dispose();
        }
예제 #10
0
        private void AddCheckBoxColumn()
        {
            // 为表格增加“是否保存”列,表示该记录是否保存进数据库
            //DataColumn newColumn = new DataColumn();

            //newColumn.DataType = System.Type.GetType("System.Boolean");
            //newColumn.ColumnName = "是否保存";
            //newColumn.DefaultValue = Boolean.FalseString; // 设置选择列的默认值为未选中状态
            //arvInfoTable.Columns.Add(newColumn);
            //GridColumn unbColumn = gvIntoCabinet.Columns.Add();
            GridColumn unbColumn = gvIntoCabinet.Columns.AddField("colCheck");

            unbColumn.Name        = "colCheck";
            unbColumn.Caption     = "是否保存";
            unbColumn.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;   // 数值类型
            RepositoryItemCheckEdit checkEdit = new RepositoryItemCheckEdit();

            checkEdit.NullStyle    = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked; //空值状态下是不选中
            unbColumn.ColumnEdit   = checkEdit;                                                    // 列格式设置为复选框
            unbColumn.VisibleIndex = 0;
            gvIntoCabinet.CustomUnboundColumnData += (sender, e) =>
            {
                if (e.IsGetData)
                {
                    e.Value = _Cache.GetValue(e.Row);
                }
                if (e.IsSetData)
                {
                    _Cache.SetValue(e.Row, e.Value);
                }
            };
        }
예제 #11
0
        public CurveSettingsView(IToolTipCreator toolTipCreator)
        {
            _toolTipCreator = toolTipCreator;
            InitializeComponent();

            _gridBinderCurves = new GridViewBinder <CurveDTO>(gridView)
            {
                BindingMode = BindingMode.TwoWay
            };

            _interpolationModeRepository = new UxRepositoryItemComboBox(gridView);
            _lineStyleRepository         = new UxRepositoryItemComboBox(gridView);
            _lineThicknessRepository     = new UxRepositoryItemComboBox(gridView);
            _symbolRepository            = new UxRepositoryItemComboBox(gridView);
            _axisTypeRepository          = new UxRepositoryItemComboBox(gridView);
            _colorRepository             = new UxRepositoryItemColorPickEditWithHistory(gridView);
            _visibleRepository           = new UxRepositoryItemCheckEdit(gridView);
            _deleteButtonRepository      = new UxRepositoryItemButtonEdit(ButtonPredefines.Delete);
            _showLowerLimitOfQuantificationRepository = new UxRepositoryItemCheckEdit(gridView);
            _deleteButtonRepository.ButtonClick      += deleteButtonClick;

            gridView.AllowsFiltering               = true;
            gridView.ShowColumnChooser             = true;
            gridView.ShouldUseColorForDisabledCell = false;
            gridView.OptionsView.ShowGroupPanel    = false;

            var toolTipController = new ToolTipController();

            toolTipController.GetActiveObjectInfo += onToolTipControllerGetActiveObjectInfo;

            gridControl.ToolTipController = toolTipController;
            InitializeWith(gridView);
            initializeDragDrop();
        }
예제 #12
0
        public StandardForm()
        {
            InitializeComponent();
            this.imageSlider1.Images.Add(Image.FromFile(Application.StartupPath + "\\Resources\\Min_Max.jpg"));

            DataTable table = new DataTable();

            table.Columns.Add(new DataColumn("列名", Type.GetType("System.String")));
            table.Columns.Add(new DataColumn("是否标准化", Type.GetType("System.Boolean")));
            table.Columns.Add(new DataColumn("是否取补", Type.GetType("System.Boolean")));
            table.Columns.Add(new DataColumn("标准化方法", Type.GetType("System.String")));
            this.grdStandard.DataSource = table;

            RepositoryItemCheckEdit riChEdit = new RepositoryItemCheckEdit();

            this.grdStandard.RepositoryItems.Add(riChEdit);

            RepositoryItemComboBox riCombo = new RepositoryItemComboBox();

            riCombo.Items.AddRange(new string[] { "Min-Max标准化" });
            this.grdStandard.RepositoryItems.Add(riCombo);

            this.gridView1.Columns.ColumnByFieldName("是否标准化").ColumnEdit = riChEdit;
            this.gridView1.Columns.ColumnByFieldName("是否取补").ColumnEdit  = riChEdit;
            this.gridView1.Columns.ColumnByFieldName("标准化方法").ColumnEdit = riCombo;
        }
예제 #13
0
        public void 绑定数据()
        {
            string[] coloumNames = new string[] { "ID", "水泵型号" };
            string[] columIDs = new string[] { "ID", "水泵型号" };
            string[] invisibleColums = new string[] { "ID"};
            this.grid1.SetGridColumns(coloumNames, columIDs, invisibleColums);
            string sql = "select ID,水泵型号 from 水泵型号管理";
            DataTable tb = 数据库操作类.GetTableBySql(sql);
            this.grid1.ExportView.GridControl.DataSource = tb;

            this.grid2.ExportView.OptionsView.EnableAppearanceEvenRow = false;
            this.grid2.ExportView.OptionsView.EnableAppearanceOddRow = false;
            string[] _coloumNames = new string[] { "选择试验组","ID", "试验组名","试验编号" };
            string[] _invisibleColums = new string[] { "ID" };
            string[] _columIDs = new string[] { "isCheck","ID", "试验组名","试验编号" };
            this.grid2.SetGridColumns(_coloumNames, _columIDs, _invisibleColums);
            RepositoryItemCheckEdit radio = new RepositoryItemCheckEdit();
            this.grid2.ExportView.Columns[0].ColumnEdit = radio;
            this.grid2.ExportView.Columns[0].OptionsColumn.AllowEdit = true;
            this.grid2.SetReadOnly(false);
            decimal id = -1;
            if (tb.Rows.Count > 0)
            {
                id = System.Convert.ToDecimal(tb.Rows[0]["id"].ToString());
            }
            sql = "select ID,试验组名,试验编号 from 生成试验组 where 被试水泵ID=" + id;
            试验组 = 数据库操作类.GetTableBySql(sql);
            试验组.Columns.Add("isCheck",typeof(bool));
            foreach (DataRow col in 试验组.Rows)
            {
                col["isCheck"] = false;
            }
            this.grid2.ExportView.GridControl.DataSource = 试验组;
        }
예제 #14
0
        private void Form1_Load(object sender, EventArgs e)
        {
            colorEdit1.EditValue = Color.LightBlue;
            colorEdit2.EditValue = Color.LightGray;

            gridControl1.DataSource = CreateDataSource();
            gridControl1.ForceInitialize();

            CreateUnboundColumn();

            string[] intColumns = new string[] { "Value1", "Value2" };

            RepositoryItemCheckEdit reCheckEdit = gridControl1.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;

            reCheckEdit.EditValueChanged            += new EventHandler(reCheckEdit_EditValueChanged);
            gridView1.Columns["Selected"].ColumnEdit = reCheckEdit;

            RepositoryItemTextEdit reTextEdit = gridControl1.RepositoryItems.Add("TextEdit") as RepositoryItemTextEdit;

            reTextEdit.EditValueChanged          += new EventHandler(reTextEdit_EditValueChanged);
            reTextEdit.EditValueChangedFiringMode = DevExpress.XtraEditors.Controls.EditValueChangedFiringMode.Buffered;
            foreach (string columnName in intColumns)
            {
                summaryCache.Add(columnName, 0);
                gridView1.Columns[columnName].SummaryItem.SummaryType   = DevExpress.Data.SummaryItemType.Custom;
                gridView1.Columns[columnName].SummaryItem.DisplayFormat = "Custom Sum = {0}";
                gridView1.Columns[columnName].ColumnEdit = reTextEdit;
            }
            gridView1.OptionsView.ShowFooter = true;
        }
예제 #15
0
        protected virtual void Attach(GridView view)
        {
            if (view == null)
            {
                return;
            }
            selection.Clear();
            this._view = view;
            view.BeginUpdate();
            try {
                edit = view.GridControl.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;

                column = view.Columns.Add();
                column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
                column.Visible      = true;
                column.VisibleIndex = 0;
                column.FieldName    = "CheckMarkSelection";
                column.Caption      = "Mark";
                column.OptionsColumn.ShowCaption = false;
                column.OptionsColumn.AllowEdit   = false;
                column.OptionsColumn.AllowSize   = false;
                column.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
                column.Width       = GetCheckBoxWidth();
                column.ColumnEdit  = edit;

                view.Click += new EventHandler(View_Click);
                view.CustomDrawColumnHeader  += new ColumnHeaderCustomDrawEventHandler(View_CustomDrawColumnHeader);
                view.CustomDrawGroupRow      += new RowObjectCustomDrawEventHandler(View_CustomDrawGroupRow);
                view.CustomUnboundColumnData += new CustomColumnDataEventHandler(view_CustomUnboundColumnData);
                view.KeyDown  += new KeyEventHandler(view_KeyDown);
                view.RowStyle += new RowStyleEventHandler(view_RowStyle);
            } finally {
                view.EndUpdate();
            }
        }
        public override void InitializeBinding()
        {
            pivotGridControl.EditValueChanged += (o, e) => OnEvent(() => handleEditorChanged(e), notifyViewChanged: true);

            _presenter.RowAreaColumns.Each(columnName => { addField(pivotGridControl.CreateRowAreaNamed(columnName)); });
            _presenter.VisibleColumnAreaColumns.Each(columnName => { addField(pivotGridControl.CreateColumnAreaNamed(columnName)); });
            _presenter.HiddenColumnAreaColumns.Each(columnName => { addField(pivotGridControl.CreateColumnAreaNamed(columnName), visible: false); });

            _valueField = pivotGridControl.CreateDataAreaNamed(_presenter.ValueAreaColumn);
            addField(_valueField);

            pivotGridControl.TotalsVisible = false;
            pivotGridControl.ShowHeaders   = false;
            pivotGridControl.OptionsSelection.MultiSelect = false;

            var repositoryItemCheckEdit = new RepositoryItemCheckEdit();

            pivotGridControl.RepositoryItems.Add(repositoryItemCheckEdit);
            pivotGridControl.OptionsCustomization.AllowEdit = true;
            pivotGridControl.OptionsBehavior.EditorShowMode = EditorShowMode.MouseDown;
            _valueField.FieldEdit                     = repositoryItemCheckEdit;
            _valueField.Options.AllowEdit             = true;
            repositoryItemCheckEdit.EditValueChanged += (o, e) => OnEvent(() => pivotGridControl.PostEditor());

            pivotGridControl.BestFitDataHeaders(considerRowArea: true);

            _categorialRunModeScreenBinder.Bind(x => x.AllTheSame)
            .To(chkAllTheSame)
            .Changed += () => OnEvent(_presenter.AllTheSameChanged, notifyViewChanged: true);
        }
예제 #17
0
        public frmLookUp_BaseNew(bool isMultiSelect, string searchInput)
        {
            InitializeComponent();
            sOldSearch         = sNewSearch = searchInput;
            selectedItems      = new List <T>();
            this.isMultiSelect = isMultiSelect;

            if (isMultiSelect)
            {
                repItemCheckEdit = new RepositoryItemCheckEdit
                {
                    ValueChecked   = true,
                    ValueUnchecked = false,
                };

                this.grcLookUp.RepositoryItems.Add(this.repItemCheckEdit);

                colCheckSeleted = grvLookUp.Columns.AddField("chk");
                colCheckSeleted.VisibleIndex            = 0;
                colCheckSeleted.Width                   = 40;
                colCheckSeleted.UnboundType             = UnboundColumnType.Boolean;
                colCheckSeleted.ColumnEdit              = repItemCheckEdit;
                repItemCheckEdit.Click                 += new EventHandler(repItemCheckEdit_Click);
                colCheckSeleted.OptionsColumn.AllowEdit = true;
                grvLookUp.CustomUnboundColumnData      += grvLookUp_CustomUnboundColumnData;
                grvLookUp.CellValueChanged             += grvLookUp_CellValueChanged;
            }
        }
예제 #18
0
        public override void InitializeResources()
        {
            base.InitializeResources();
            pivotGridControl.TotalsVisible = false;
            pivotGridControl.ShowHeaders   = false;
            pivotGridControl.OptionsSelection.MultiSelect = false;


            var compoundName = new PivotGridField("Compound", PivotArea.RowArea);

            compoundName.Options.AllowExpand = DefaultBoolean.False;
            var curveField = new PivotGridField("Calculation Method", PivotArea.ColumnArea);

            curveField.Options.AllowExpand = DefaultBoolean.False;
            var categoryField = new PivotGridField("Category", PivotArea.ColumnArea);

            categoryField.Options.AllowExpand = DefaultBoolean.False;
            _valueField = new PivotGridField("Value", PivotArea.DataArea)
            {
                SummaryType = PivotSummaryType.Max
            };

            pivotGridControl.Fields.Add(_valueField);
            pivotGridControl.Fields.Add(compoundName);
            pivotGridControl.Fields.Add(categoryField);
            pivotGridControl.Fields.Add(curveField);

            var repositoryItemCheckEdit = new RepositoryItemCheckEdit();

            pivotGridControl.RepositoryItems.Add(repositoryItemCheckEdit);
            pivotGridControl.OptionsCustomization.AllowEdit = true;
            _valueField.FieldEdit         = repositoryItemCheckEdit;
            _valueField.Options.AllowEdit = true;
        }
예제 #19
0
        protected virtual void Attach(GridView gridView)
        {
            if (gridView == null)
            {
                return;
            }
            Selection.Clear();
            view  = gridView;
            _edit = gridView.GridControl.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;
            if (_edit != null)
            {
                _edit.EditValueChanged += edit_EditValueChanged;
            }

            _column = gridView.Columns.Add();
            _column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            _column.VisibleIndex            = int.MaxValue;
            _column.FieldName = "CheckMarkSelection";
            _column.Caption   = "Mark";
            _column.OptionsColumn.ShowCaption = false;
            _column.UnboundType               = DevExpress.Data.UnboundColumnType.Boolean;
            _column.ColumnEdit                = _edit;
            _column.Width                     = 45;
            gridView.CustomDrawColumnHeader  += View_CustomDrawColumnHeader;
            gridView.CustomDrawGroupRow      += View_CustomDrawGroupRow;
            gridView.CustomUnboundColumnData += view_CustomUnboundColumnData;
            gridView.RowStyle                += view_RowStyle;
            gridView.MouseDown               += view_MouseDown; // clear selection
        }
예제 #20
0
        private void InitialList()
        {
            DataSet    dataSet = this.loginService.GetUsers4Grid();
            DataTable  tb      = dataSet.Tables[0];
            DataColumn col     = new DataColumn("check", System.Type.GetType("System.Boolean"));

            col.DefaultValue = false;
            tb.Columns.Add(col);

            tb.Columns.Remove("pwd");
            this.gridUsers.DataSource = tb;

            RepositoryItemCheckEdit riChEdit = new RepositoryItemCheckEdit();

            riChEdit.CheckedChanged += new EventHandler(riChEdit_CheckedChanged);
            this.gridUsers.RepositoryItems.Add(riChEdit);
            this.gridView1.Columns.ColumnByFieldName("check").ColumnEdit = riChEdit;
            this.gridView1.Columns.ColumnByFieldName("check").OptionsColumn.ShowCaption = false;//不显示列标题
            this.gridView1.Columns.ColumnByFieldName("ID").Caption = "用户编号";
            this.gridView1.Columns.ColumnByFieldName("ID").OptionsColumn.AllowEdit = false;

            this.gridView1.Columns.ColumnByFieldName("username").Caption = "用户名";
            this.gridView1.Columns.ColumnByFieldName("username").OptionsColumn.AllowEdit = false;

            this.gridView1.OptionsSelection.MultiSelect     = false;
            this.gridView1.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect;
        }
예제 #21
0
        public AxisSettingsView()
        {
            InitializeComponent();
            gridView.AllowsFiltering = true;
            gridView.OptionsCustomization.AllowFilter = false;
            gridView.OptionsCustomization.AllowSort   = false;
            gridView.OptionsCustomization.AllowGroup  = false;
            gridView.OptionsView.ShowGroupPanel       = false;
            gridView.ShowColumnChooser             = true;
            gridView.ShouldUseColorForDisabledCell = false;

            _dimensionRepository   = new UxRepositoryItemComboBox(gridView);
            _unitRepository        = new UxRepositoryItemComboBox(gridView);
            _scalingRepository     = new UxRepositoryItemScalings(gridView);
            _numberModeRepository  = new UxRepositoryItemComboBox(gridView);
            _gridLinesRepository   = new UxRepositoryItemCheckEdit(gridView);
            _lineStyleRepository   = new UxRepositoryItemComboBox(gridView);
            _colorRepository       = new UxRepositoryItemColorPickEditWithHistory(gridView);
            _disableRepositoryItem = new RepositoryItem {
                ReadOnly = true, Enabled = false
            };

            _deleteButtonRepository              = new UxRepositoryItemButtonEdit(ButtonPredefines.Delete);
            _deleteButtonRepository.ButtonClick += (o, e) => OnEvent(deleteButtonClick);

            _addButtonRepository              = new UxRepositoryItemButtonEdit(ButtonPredefines.Plus);
            _addButtonRepository.ButtonClick += (o, e) => OnEvent(addButtonClick);

            InitializeWith(gridView);
        }
예제 #22
0
        protected virtual void Attach(RepositoryItemGridLookUpEdit rep)
        {
            if (rep == null)
            {
                return;
            }
            selection.Clear();
            _currentRepository = rep;

            edit = _currentRepository.View.GridControl.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;

            GridColumn column = _currentRepository.View.Columns.Add();

            column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            column.Visible      = true;
            column.VisibleIndex = 0;
            column.FieldName    = checkColumnFieldName;
            column.Caption      = "Mark";
            column.OptionsColumn.ShowCaption = false;
            column.OptionsColumn.AllowEdit   = false;
            column.OptionsColumn.AllowSize   = false;
            column.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            column.Width       = GetCheckBoxWidth();
            column.ColumnEdit  = edit;

            _currentRepository.View.Click += new EventHandler(View_Click);
            _currentRepository.View.CustomDrawColumnHeader  += new ColumnHeaderCustomDrawEventHandler(View_CustomDrawColumnHeader);
            _currentRepository.View.CustomDrawGroupRow      += new RowObjectCustomDrawEventHandler(View_CustomDrawGroupRow);
            _currentRepository.View.CustomUnboundColumnData += new CustomColumnDataEventHandler(view_CustomUnboundColumnData);
            _currentRepository.View.KeyDown += new KeyEventHandler(view_KeyDown);
        }
예제 #23
0
        public RepositoryItemCheckEdit CreateRepositoryCheckEdit()
        {
            RepositoryItemCheckEdit ri = new RepositoryItemCheckEdit();

            ri.AutoHeight = false;
            return(ri);
        }
예제 #24
0
        private void PopulateFlatType()
        {
            BsfGlobal.OpenCRMDB();
            dtFT = new DataTable();
            string ssql = "";

            try
            {
                ssql = String.Format("SELECT FlatTypeId,TypeName,Convert(bit,0,0) Sel FROM FlatType WHERE ProjId={0} ORDER BY TypeName", m_iCCId);
                da   = new SqlDataAdapter(ssql, BsfGlobal.g_CRMDB);
                da.Fill(dtFT);

                grdArea.DataSource = dtFT;
                grdViewArea.Columns["FlatTypeId"].Visible = false;
                grdViewArea.Columns["Sel"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
                using (RepositoryItemCheckEdit chkSel = new RepositoryItemCheckEdit())
                {
                    chkSel.CheckedChanged += chkSel_CheckedChanged;
                }
                grdViewArea.BestFitColumns();

                BsfGlobal.g_CRMDB.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
        }
예제 #25
0
 public static void BoundRepCheckEdit(RepositoryItemCheckEdit lueCheck)
 {
     lueCheck.AutoHeight     = false;
     lueCheck.NullStyle      = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
     lueCheck.ValueChecked   = "Y";
     lueCheck.ValueUnchecked = "N";
 }
        protected virtual void Attach(GridView view)
        {
            if (view == null)
            {
                return;
            }
            selection.Clear();
            this.view              = view;
            edit                   = view.GridControl.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;
            edit.EditValueChanged += new EventHandler(edit_EditValueChanged);

            column = view.Columns.Add();
            column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            column.VisibleIndex            = int.MaxValue;
            column.FieldName = "CheckMarkSelection";
            column.Caption   = "Mark";
            column.OptionsColumn.ShowCaption = false;
            column.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            column.ColumnEdit  = edit;

            view.CustomDrawColumnHeader  += new ColumnHeaderCustomDrawEventHandler(View_CustomDrawColumnHeader);
            view.CustomDrawGroupRow      += new RowObjectCustomDrawEventHandler(View_CustomDrawGroupRow);
            view.CustomUnboundColumnData += new CustomColumnDataEventHandler(view_CustomUnboundColumnData);
            view.RowStyle  += new RowStyleEventHandler(view_RowStyle);
            view.MouseDown += new MouseEventHandler(view_MouseDown); // clear selection
        }
예제 #27
0
        public static void DrawCheckBox
            (DevExpress.XtraGrid.Views.Grid.ColumnHeaderCustomDrawEventArgs e, bool chk)
        {
            RepositoryItemCheckEdit repositoryCheck =
                e.Column.ColumnEdit as RepositoryItemCheckEdit;

            if (repositoryCheck != null)
            {
                Graphics  g = e.Graphics;
                Rectangle r = e.Bounds;

                DevExpress.XtraEditors.ViewInfo.CheckEditViewInfo      info;
                DevExpress.XtraEditors.Drawing.CheckEditPainter        painter;
                DevExpress.XtraEditors.Drawing.ControlGraphicsInfoArgs args;
                info = repositoryCheck.CreateViewInfo() as
                       DevExpress.XtraEditors.ViewInfo.CheckEditViewInfo;

                painter = repositoryCheck.CreatePainter()
                          as DevExpress.XtraEditors.Drawing.CheckEditPainter;
                info.EditValue = chk;
                info.Bounds    = r;
                info.CalcViewInfo(g);
                args = new DevExpress.XtraEditors.
                       Drawing.ControlGraphicsInfoArgs(info, new DevExpress.Utils.Drawing.GraphicsCache(g), r);
                painter.Draw(args);
                args.Cache.Dispose();
            }
        }
예제 #28
0
        private void PopulateGrid()
        {
            DataTable dt = new DataTable();

            dt = ControlPanelBL.GetUserDetails();
            gridControl1.DataSource = dt;
            gridView1.PopulateColumns();
            gridView1.Columns["UserId"].Visible = false;

            gridView1.Columns["EditAddress"].OptionsColumn.AllowEdit = true;
            gridView1.Columns["Live"].OptionsColumn.AllowEdit        = true;

            gridView1.Columns["EditAddress"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            RepositoryItemCheckEdit chkAddr = new RepositoryItemCheckEdit();

            gridView1.Columns["EditAddress"].ColumnEdit = chkAddr;
            chkAddr.CheckedChanged += chkAddr_CheckedChanged;

            gridView1.Columns["Live"].AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            RepositoryItemCheckEdit chkLive = new RepositoryItemCheckEdit();

            gridView1.Columns["Live"].ColumnEdit = chkLive;
            chkLive.CheckedChanged += chkLive_CheckedChanged;

            gridView1.Appearance.HeaderPanel.Font = new Font(gridView1.Appearance.HeaderPanel.Font, FontStyle.Bold);

            gridView1.Appearance.FocusedCell.BackColor = Color.Teal;
            gridView1.Appearance.FocusedCell.ForeColor = Color.White;
            gridView1.Appearance.FocusedRow.ForeColor  = Color.White;
            gridView1.Appearance.FocusedRow.BackColor  = Color.Teal;

            gridView1.OptionsSelection.EnableAppearanceHideSelection = false;
        }
예제 #29
0
 /// <summary>
 /// Focuses the control.
 /// </summary>
 protected override void InitControls()
 {
     RepositoryItemCheckEdit = new RepositoryItemCheckEdit();
     treeList.ForceInitialize();
     treeList.ParentFieldName = "ParentId";
     treeList.KeyFieldName    = "BudgetItemId";
 }
예제 #30
0
        protected virtual void Attach(GridView view)
        {
            if (view == null)
            {
                return;
            }
            _Selection.Clear();
            this._GridView               = view;
            _CheckEdit                   = (RepositoryItemCheckEdit)view.GridControl.RepositoryItems.Add("CheckEdit");
            _CheckEdit.NullStyle         = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
            _CheckEdit.EditValueChanged += Edit_EditValueChanged;

            _CheckColumn = view.Columns.Add();
            _CheckColumn.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            _CheckColumn.VisibleIndex            = 0;
            _CheckColumn.FieldName = "CheckMarkSelection";
            _CheckColumn.Caption   = "Mark";
            _CheckColumn.OptionsColumn.ShowCaption = false;
            _CheckColumn.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            _CheckColumn.ColumnEdit  = _CheckEdit;


            view.Click += View_Click;
            view.CustomDrawColumnHeader  += View_CustomDrawColumnHeader;
            view.CustomDrawGroupRow      += View_CustomDrawGroupRow;
            view.CustomUnboundColumnData += view_CustomUnboundColumnData;
            //view.RowStyle += view_RowStyle;
        }
예제 #31
0
        void GridView_CustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e)
        {
            if (m_CheckBoxColumns == null || m_CheckBoxColumns.Count == 0)
            {
                return;
            }

            if (m_CheckBoxColumns.Contains(e.Column))
            {
                e.Info.InnerElements.Clear();
                e.Info.Appearance.ForeColor = Color.FromArgb(180, 180, 180);
                e.Painter.DrawObject(e.Info);
                CheckState state = CheckState.Checked;
                int        count = getCheckedCount(e.Column);

                Debug.WriteLine("### count: " + count);

                if (count == 0)
                {
                    state = CheckState.Unchecked;
                }
                else if (count != m_GridView.DataRowCount)
                {
                    state = CheckState.Indeterminate;
                }
                RepositoryItemCheckEdit checkEdit = m_DTColumn2CheckEdit[e.Column];
                DrawCheckBox(e.Graphics, e.Bounds, checkEdit, state);
                e.Handled = true;
            }
        }
예제 #32
0
        private void AddEvents(GridView tablo)
        {
            if (tablo == null) return;
            _selectedRow.Clear();
            _tablo = tablo;

            _checkEdit = (RepositoryItemCheckEdit)_tablo.GridControl.RepositoryItems.Add("CheckEdit");
            _column = tablo.Columns.Add();
            _column.OptionsColumn.AllowSort = DefaultBoolean.False;
            _column.Visible = true;
            _column.VisibleIndex = 0;
            _column.FieldName = "Secim";
            _column.OptionsColumn.ShowCaption = false;
            _column.OptionsColumn.AllowEdit = false;
            _column.OptionsColumn.AllowSize = false;
            _column.UnboundType = UnboundColumnType.Boolean;
            _column.Width = 35;
            _column.OptionsColumn.FixedWidth = true;
            _column.ColumnEdit = _checkEdit;
            _tablo.FocusedColumn = _column;

            if (tablo is BandedGridView bView)
            {
                bView.Bands["bndSecim"].Visible = true;
                bView.Bands["bndSecim"].VisibleIndex = 0;
                bView.Bands["bndSecim"].Columns.Add((BandedGridColumn)_column);
            }
            _tablo.Click += Tablo_Click;
            _tablo.CustomDrawColumnHeader += Tablo_CustomDrawColumnHeader;
            _tablo.CustomUnboundColumnData += Tablo_CustomUnboundColumnData;
            _tablo.KeyDown += Tablo_KeyDown;
            _tablo.RowStyle += Tablo_RowStyle;
        }
예제 #33
0
 protected void DrawCheckBox(Graphics g, RepositoryItemCheckEdit edit, Rectangle r, bool Checked)
 {
     var info = edit.CreateViewInfo() as CheckEditViewInfo;
     var painter = edit.CreatePainter() as CheckEditPainter;
     info.EditValue = Checked;
     info.Bounds = r;
     info.CalcViewInfo(g);
     var args = new ControlGraphicsInfoArgs(info, new GraphicsCache(g), r);
     painter.Draw(args);
     args.Cache.Dispose();
 }
예제 #34
0
 public static RepositoryItemCheckEdit GetCheckEdit(bool UsingImage)
 {
     RepositoryItemCheckEdit checkEdit = new RepositoryItemCheckEdit();
     checkEdit.ValueChecked = "Y";
     checkEdit.ValueUnchecked = "N";
     //checkEdit.ValueGrayed = DBNull.Value;
     //checkEdit.AllowGrayed = true;
     if (UsingImage)
     {
         checkEdit.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.UserDefined;
         checkEdit.PictureChecked = HelpImage.getImage1616("ctsCheck.png");
     }
     else
     {
         checkEdit.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Standard;
     }
     return checkEdit;
 }
예제 #35
0
        private void InitGrid()
        {
            gridViewDetail._SetPermissionElement(BtnPrint, BtnExport);
            HelpPhieu.InitGrid(gridViewDetail, _isAdd);
            var edit = HelpGridColumn.CotSpinEdit(ColTapSo, QL_LICH_PHAT_SONG_CT.TAP_SO, 0);
            edit.MinValue = 1;
            edit.MaxValue = int.MaxValue;
            edit.AllowNullInput = DefaultBoolean.False;

            HelpGridColumn.CotTextLeft(ColMaBang, QL_LICH_PHAT_SONG_CT.MA_BANG);
            HelpGridColumn.CotDateEdit(ColGioPhat, QL_LICH_PHAT_SONG_CT.GIO_PHAT_SONG, "HH:mm");
            HelpGridColumn.CotDateEdit(ColNgayPhat, QL_LICH_PHAT_SONG_CT.NGAY_PHAT_SONG, "dddd , " + FrameworkParams.option.dateFormat);
            ColNgayPhat.GroupFormat.FormatString = "dddd," + FrameworkParams.option.dateFormat;
            ColNgayPhat.GroupFormat.FormatType = FormatType.DateTime;
            AppCtrl.InitCotTimecode(ColThoiLuong, QL_LICH_PHAT_SONG_CT.THOI_LUONG, QL_LICH_PHAT_SONG_CT.THOI_LUONG_NUM);
            AppCtrl.InitCotThuTrongTuan(ColThuTrongTuan, QL_LICH_PHAT_SONG_CT.THU_TRONG_TUAN, true);
            HelpGridColumn.CotSpinEdit(ColSoTap, QL_LICH_PHAT_SONG_CT.SO_TAP_NGAY, 0);
            gridViewDetail.OptionsView.NewItemRowPosition = NewItemRowPosition.None;

            HelpGridColumn.CotTextLeft(ColTenTap, QL_LICH_PHAT_SONG_CT.TEN_TAP);
            HelpGridColumn.CotTextLeft(ColCodeBM, QL_LICH_PHAT_SONG_CT.CODE_BM);
            ColStart.Caption = " Dòng bắt đầu thay đổi thứ\nhoặc tập số/ngày(nếu có)";
            gridViewDetail.ColumnPanelRowHeight = 70;
            ColStart.Width = 100;

            ColGioPhat.Caption = "Giờ\nphát sóng";
            ColSoTap.Caption = "Số tập\n/ngày";
            ColTapSo.Caption = "Tập\nsố";

            foreach (GridColumn c in gridViewDetail.Columns)
            {
                c.AppearanceHeader.TextOptions.WordWrap = WordWrap.Wrap;
                c.AppearanceHeader.Options.UseTextOptions = true;
            }
            _itemCheck = HelpGridColumn.CotCheckEdit(ColStart, QL_LICH_PHAT_SONG_CT.IS_START);
            _itemCheck.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Radio;
            var fDelete = new StyleFormatCondition
                              {
                                  Condition = FormatConditionEnum.Expression,
                                  ApplyToRow = true,
                                  Expression = "[STATE]='DEL'"
                              };
            fDelete.Appearance.BackColor = Color.Silver;
            fDelete.Appearance.ForeColor = Color.Gainsboro;
            fDelete.Appearance.Options.UseBackColor = true;
            fDelete.Appearance.Options.UseForeColor = true;
            gridViewDetail.FormatConditions.Add(fDelete);

            var fAdd = new StyleFormatCondition
                           {
                               Condition = FormatConditionEnum.Expression,
                               ApplyToRow = true,
                               Expression = "[STATE]='ADD'"
                           };
            fAdd.Appearance.BackColor = Color.PaleGreen;
            fAdd.Appearance.Options.UseBackColor = true;
            gridViewDetail.FormatConditions.Add(fAdd);

            if (_isAdd != null)
            {
                var fStart = new StyleFormatCondition
                                 {
                                     Condition = FormatConditionEnum.Expression,
                                     ApplyToRow = true,
                                     Expression = "[" + QL_LICH_PHAT_SONG_CT.IS_START + "]='Y'"
                                 };
                fStart.Appearance.BackColor = Color.DarkOrange;
                fStart.Appearance.Options.UseBackColor = true;
                gridViewDetail.FormatConditions.Add(fStart);
                lblStart.BackColor = fStart.Appearance.BackColor;
            }
            lblDel.BackColor = fDelete.Appearance.BackColor;
            lblAdd.BackColor = fAdd.Appearance.BackColor;

            gridViewDetail.FocusedRowChanged += GridViewDetailFocusedRowChanged;
            gridViewDetail.RowCellClick += gridViewDetail_RowCellClick;
            gridViewDetail.FocusedColumnChanged += gridViewDetail_FocusedColumnChanged;
        }
예제 #36
0
        void grvParams_CustomRowCellEdit(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e)
        {
            if (e.Column.FieldName != "Value") return;

            var dr = this.grvParams.GetDataRow(e.RowHandle) as DataRow;
            int iControlType = 0;
            int.TryParse(dr["ControlType"].ToStringEx(), out iControlType);
            var controlType = (ViewParameterControlType)iControlType;

            RepositoryItem item = new RepositoryItemTextEdit();
            switch (controlType)
            {
                case ViewParameterControlType.CheckEdit:
                    var temp = new RepositoryItemCheckEdit() { AllowGrayed = false };
                    item = temp;
                    break;
                case ViewParameterControlType.ComboboxEdit:
                    item = new RepositoryItemGridSearchEdit();
                    break;
                case ViewParameterControlType.FloatEdit:
                    item = new RepositoryItemSpinEdit() { IsFloatValue = true };
                    break;
                case ViewParameterControlType.IntEdit:
                    item = new RepositoryItemSpinEdit() { IsFloatValue = false };
                    break;
                case ViewParameterControlType.RichTextEdit:
                    item = new RepositoryItemMemoExEdit() { ShowIcon = false };
                    break;
                case ViewParameterControlType.TextEdit:
                    item = new RepositoryItemTextEdit();
                    break;
                default:
                    item = new RepositoryItemTextEdit();
                    break;
            }
            e.RepositoryItem = item;
        }
예제 #37
0
        private void frmUserRights_Load(object sender, EventArgs e)
        {
            if (tmp)
            {

            }
            //if (Convert.ToBoolean(dtFormRights.Rows[0]["CanView"]))
            //{
                try
                {
                    foreach (GridColumn column in gridView1.Columns) // disable editing for all columns
                    {
                        column.OptionsColumn.AllowEdit = true;
                        gridView1.Columns["mdlName"].OptionsColumn.AllowEdit = false;// enable editing for specific column
                    }
                    gridView1.ShowFindPanel();
                    txtuserid.Focus();
                    //tmp = true;

                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                checkEdit = new RepositoryItemCheckEdit();
                checkEdit.CheckedChanged += new EventHandler(checkEdit_CheckedChanged);
                gridView1.Columns["All"].ColumnEdit = checkEdit;
                LoadUserLevel();
               //txtuserid.Focus();
            //}

            //else
            //{
            //    MessageBox.Show("You are not authorized to view this form.");
            //    this.BeginInvoke(new MethodInvoker(this.Close));
            //    return;
            //}
        }
예제 #38
0
        private void BuildVisibleColumnsProc()
        {
            int iGroupIndexCount = -1;
            int i = 0;
            GridColumn[] grdCol = new GridColumn[m_dtTableData.Columns.Count];

            RepositoryItemTextEdit txtEdit = new RepositoryItemTextEdit();
            txtEdit.MouseWheel -= txtEdit_MouseWheel;
            txtEdit.MouseWheel += txtEdit_MouseWheel;
            rpeNumberMask.MouseWheel -= txtEdit_MouseWheel;
            rpeNumberMask.MouseWheel += txtEdit_MouseWheel;
            foreach (DataColumn dc in m_dtTableData.Columns)
            {

                GridColumn colAdd = new GridColumn() { FieldName = dc.Caption, Caption = dc.Caption, Name = dc.Caption };
                foreach (string readOnl in strColumnReadOnly)
                {
                    if (readOnl.ToLower().Equals(dc.Caption.ToLower()))
                    {
                        m_dtTableData.Columns[readOnl].ReadOnly = true;
                        break;
                    }
                }
                switch (dc.DataType.Name.ToLower())
                {
                    case "boolean":
                        RepositoryItemCheckEdit colBool = new RepositoryItemCheckEdit() { AllowFocused = false, BorderStyle = BorderStyles.NoBorder, ValueChecked = true, ValueUnchecked = false };

                        isShowCheckAllBtn = true;
                        if (colAdd.Name.ToLower().Contains("modifed"))
                            isContainModifedColumn = true;
                        colAdd.ColumnEdit = colBool;
                        colAdd.VisibleIndex = i;
                        colBool.MouseWheel -= txtEdit_MouseWheel;
                        colBool.MouseWheel += txtEdit_MouseWheel;
                        break;
                    case strDATETIME:
                        if (colAdd.Name.ToLower().Contains("time"))
                        {
                            colAdd.ColumnEdit = rpeDateTimeMask;
                        }
                        else
                        {
                            RepositoryItemDateEdit colDate = new RepositoryItemDateEdit(){
                                EditMask = UIMessage.DATE_FORMAT_PATTEN,
                                AllowFocused = false,
                                BorderStyle = BorderStyles.NoBorder};
                            colDate.Mask.UseMaskAsDisplayFormat = true;
                            colDate.MouseWheel -= txtEdit_MouseWheel;
                            colDate.MouseWheel += txtEdit_MouseWheel;
                            colAdd.ColumnEdit = colDate;
                        }
                        colAdd.VisibleIndex = i;
                        break;
                    case strFLOAT:
                    case strREAL:
                        colAdd.DisplayFormat.FormatString = "f";
                        colAdd.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                        colAdd.SummaryItem.DisplayFormat = "{0:#,##0;(#,##0);Zero}";
                        colAdd.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                        colAdd.ColumnEdit = txtEdit;
                        colAdd.VisibleIndex = i;
                        break;
                    case strBIGINT:
                    case strINT:
                    case strNUMERIC:
                    case strSMALLINT:
                    case strTINYINT:
                    case strDecimal:
                        colAdd.DisplayFormat.FormatString = "n0";
                        colAdd.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                        colAdd.ColumnEdit = this.rpeNumberMask;
                        colAdd.SummaryItem.DisplayFormat = "{0:#,##0;(#,##0);Zero}";
                        colAdd.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                        colAdd.VisibleIndex = i;
                        break;
                    case strMONEY:
                    case strSMALLMONEY:
                        colAdd.DisplayFormat.FormatString = "n0";
                        colAdd.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                        colAdd.ColumnEdit = this.rpeNumberMask;
                        colAdd.SummaryItem.DisplayFormat = "{0:#,##0;(#,##0);Zero}";
                        colAdd.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
                        colAdd.VisibleIndex = i;
                        break;
                    case strIMAGE:
                    case "byte[]":
                        RepositoryItemPictureEdit colPhoto = new RepositoryItemPictureEdit();
                        colAdd.ColumnEdit = colPhoto;
                        colAdd.VisibleIndex = i;
                        break;
                    default:
                        colAdd.ColumnEdit = txtEdit;
                        colAdd.VisibleIndex = i;
                        break;
                }
                if (colAdd.Name.ToLower().Equals(CommonConst.EmployeeID.ToLower()))
                {
                    //colAdd.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                    colAdd.ColumnEdit = null;//this.rpeNumberMask;
                    colAdd.SummaryItem.DisplayFormat = "{0:#,##0;(#,##0);Zero}";
                    colAdd.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Count;
                    colAdd.Fixed = FixedStyle.Left;

                }
                if (colAdd.Name.ToLower().Equals(CommonConst.FullName.ToLower()))
                {
                    //colAdd.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
                    colAdd.Fixed = FixedStyle.Left;
                }
                if (strColumnFormatFont != null && strColumnFormatFont.Length > 0 && strColumnFormatFont[0] != "")
                {
                    foreach (string strPairs in strColumnFormatFont)
                    {
                        if (colAdd.FieldName.Equals(strPairs.Split('#')[0]))
                        {
                            switch (strPairs.Split('#')[1].ToLower())
                            {
                                case "b":
                                    colAdd.AppearanceCell.Font = new Font("Tahoma", 8.25F, FontStyle.Bold);
                                    break;
                                case "i":
                                    colAdd.AppearanceCell.Font = new Font("Tahoma", 8.25F, FontStyle.Italic);
                                    break;
                                case "s":
                                    colAdd.AppearanceCell.Font = new Font("Tahoma", 8.25F, FontStyle.Strikeout);
                                    break;
                                case "u":
                                    colAdd.AppearanceCell.Font = new Font("Tahoma", 8.25F, FontStyle.Underline);
                                    break;
                            }
                        }
                    }
                }
                if (colAdd.Name.ToLower().Equals("month") || colAdd.Name.ToLower().Equals("year"))
                {
                    colAdd.DisplayFormat.FormatType = DevExpress.Utils.FormatType.None;
                    colAdd.ColumnEdit = null;
                    colAdd.SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.None;
                }
                //Set list box columns
                RepositoryItemLookUpEdit repCom = new RepositoryItemLookUpEdit();
                //set combobox value data
                if (strColumnCombobox.Length > 0)
                {
                    foreach (string com in strColumnCombobox)
                    {
                        string[] comboCol = com.Split('&');
                        if (comboCol.Length < 2)
                            continue;
                        if (dc.Caption == comboCol[0])
                        {
                            DataTable dtCom = DBEngine.execReturnDataTable(comboCol[1]);
                            if (dtCom != null && dtCom.Rows.Count > 0)
                            {
                                repCom.DataSource = dtCom;
                                repCom.ValueMember = dtCom.Columns[0].Caption;
                                if(dtCom.Columns.Count>1)
                                    repCom.DisplayMember = dtCom.Columns[1].Caption;
                                else
                                    repCom.DisplayMember = dtCom.Columns[0].Caption;
                                repCom.NullText = string.Empty;
                                repCom.CloseUp += new CloseUpEventHandler(repCom_CloseUp);
                                colAdd.ColumnEdit = repCom;
                                break;
                            }
                        }
                    }
                }
                if (strColumnHide != null && strColumnHide.Length > 0)
                {
                    foreach (string com in strColumnHide)
                    {
                        if (colAdd.Name.ToLower() == com.ToLower())
                        {
                            colAdd.VisibleIndex = -1;
                        }
                    }
                }
                if (strColumnFixed != null && strColumnFixed.Length > 0)
                {
                    foreach (string com in strColumnFixed)
                    {
                        if (colAdd.Name.ToLower() == com.ToLower())
                        {
                            colAdd.Fixed = FixedStyle.Left;
                        }
                    }
                }
                if (strColumnOrderBy != null && strColumnOrderBy.Length > 0)
                {
                    foreach (string com in strColumnOrderBy)
                    {
                        string[] comboCol = com.Split('&');
                        if (comboCol.Length < 2)
                            continue;
                        if (colAdd.Name.ToLower() == comboCol[0].ToLower())
                        {
                            colAdd.VisibleIndex = Convert.ToInt32(comboCol[1]);
                            break;
                        }
                    }
                }
                //int intWidth = Convert.ToInt16(dc.MaxLength) * 4;
                //colAdd.Width = (intWidth > 100 ? intWidth : 100);
                //colAdd.OptionsColumn.AllowEdit = !isReadOnly;
                grdCol[i++] = colAdd;
            }
            this.grvTableEditor.Columns.Clear();
            this.grvTableEditor.Columns.AddRange(grdCol);
            if (!isAllowAdd)
            {
                btnFWAdd.Enabled = false;
                btnFWDelete.Enabled = false;
            }
            m_dtTableData.DefaultView.AllowEdit = !isReadOnly;
            btnFWDelete.Visible = btnFWAdd.Visible = btnFWSave.Visible = btnFWReset.Visible = !isReadOnly;
            grvTableEditor.BestFitColumns();
            if (strGroupColumns != null && strGroupColumns.Length > 0)
            {
                grvTableEditor.OptionsView.ShowGroupPanel = true;
                foreach (string com in strGroupColumns)
                {
                    foreach (GridColumn colGroup in grvTableEditor.Columns)
                        if (colGroup.Name.ToLower() == com.ToLower())
                        {
                            colGroup.GroupIndex = ++iGroupIndexCount;
                        }
                }
                grvTableEditor.ExpandAllGroups();
            }
            if(grvTableEditor.GroupCount<=0)
                grvTableEditor.OptionsView.ShowGroupPanel = false;
        }
예제 #39
0
        public void displayData(XPCollection phones)
        {
            phones.DisplayableProperties = "Default;Number;PhoneType";
            phones.DeleteObjectOnRemove = true;
            this.gridControl1.DataSource = phones;
            gridView1.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom;
            gridView1.OptionsFilter.AllowFilterEditor = false;

            tempPhones = new List<IPhoneData>();
            testlist = new List<string>();

            this.gridView1.Columns.ColumnByName("colNumber").Caption = CaptionHelper.GetLocalizedText("Custom fomrs messages", "PhoneNumber");
            this.gridView1.Columns.ColumnByName("colPhoneType").Caption = CaptionHelper.GetLocalizedText("Custom fomrs messages", "PhoneType");
            this.gridView1.Columns.ColumnByName("colDefault").Caption = CaptionHelper.GetLocalizedText("Custom fomrs messages", "DefaultNumber");
            this.gridView1.Columns.ColumnByName("colDefault").Resize(30);

            phones.CollectionChanged += (object sender, XPCollectionChangedEventArgs args) =>
            {
                if (args.CollectionChangedType == XPCollectionChangedType.BeforeAdd)
                {
                    barAddNmbrBtn.Enabled = false;
                    rowAdded = true;
                    foreach (IPhoneData phone in ((XPCollection)sender))
                        tempPhones.Add(phone);
                }
                if (args.CollectionChangedType == XPCollectionChangedType.BeforeRemove && ((IPhoneData)args.ChangedObject).PhoneType == string.Empty)
                {
                    barAddNmbrBtn.Enabled = true;
                    rowAdded = false;
                }
            };

            phones.Session.ObjectChanged += (object sender, DevExpress.Xpo.ObjectChangeEventArgs args) =>
            {
                if (typeof(IPhoneData).IsAssignableFrom(args.Object.GetType()))
                {
                    if (args.Reason == ObjectChangeReason.BeforePropertyDescriptorChangeWithinBeginEdit)
                    {
                        testlist.Clear();
                        foreach (IPhoneData phoneType in phones)
                            testlist.Add((string)phoneType.PhoneType.Clone());
                    }
                    if (args.Reason == ObjectChangeReason.PropertyChanged)
                    {
                        if (args.NewValue == ((IPhoneData)args.Object).Number)
                            testlist.Clear();
                    }
                }
            };

            this.gridView1.ValidateRow += (object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs args) =>
            {
                GridView view = sender as GridView;
                if (((IPhoneData)args.Row).PhoneType != string.Empty)
                {
                    if (testlist.Any(p => p == ((IPhoneData)args.Row).PhoneType))
                    {
                        gridView1.OptionsView.NewItemRowPosition = NewItemRowPosition.None;
                        XtraMessageBox.Show(string.Format(CaptionHelper.GetLocalizedText("Messages", "DuplicatedPhoneType"), ((IPhoneData)args.Row).PhoneType), "MisarDataStudio", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        ((IPhoneData)args.Row).PhoneType = string.Empty;
                        return;
                    }
                    else
                        gridView1.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom;
                    if (((XPCollection)gridView1.DataSource).OfType<IPhoneData>().Any(p => p.PhoneType == string.Empty))
                    {
                        gridView1.OptionsView.NewItemRowPosition = NewItemRowPosition.None;
                    }
                    else
                        gridView1.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom;
                }
                else
                {
                    gridView1.OptionsView.NewItemRowPosition = NewItemRowPosition.None;
                }
            };

            this.gridView1.ShowingEditor += (object send, CancelEventArgs eArgs) =>
            {
                var checkGroupEn = CaptionHelper.GetLocalizedItems("Enums\\PhoneTypes");
                var checkGroupRu = CaptionHelper.GetLocalizedItems("Enums\\PhoneTypesEx");
                try
                {
                    if (((GridView)send).FocusedColumn.FieldName == "PhoneType" && checkGroupEn.Any(p => p.Value == ((GridView)send).FocusedValue.ToString()))
                        eArgs.Cancel = true;
                    if (((GridView)send).FocusedColumn.FieldName == "PhoneType" && checkGroupRu.Any(p => p.Value == ((GridView)send).FocusedValue.ToString()))
                        eArgs.Cancel = true;
                }
                catch (Exception ex) { }
            };

            this.gridView1.CustomRowCellEdit += delegate(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs args)
            {
                RepositoryItemTextEdit phoneEditor = new RepositoryItemTextEdit();
                phoneEditor.MaxLength = 15;
                phoneEditor.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                phoneEditor.Mask.EditMask = "\\d+";
                RepositoryItemTextEdit textEditor = new RepositoryItemTextEdit();
                textEditor.MaxLength = 100;

                RepositoryItemCheckEdit checkEditor = new RepositoryItemCheckEdit();
                checkEditor.AllowFocused = false;
                checkEditor.AllowGrayed = false;
                checkEditor.FullFocusRect = false;
                checkEditor.ReadOnly = true;
                checkEditor.DoubleClick += (object sendr,EventArgs eArgs) =>
                {
                    if (this.selectObject() != null)
                    {
                        foreach (IPhoneData phone in (XPCollection)gridControl1.DataSource)
                        {
                            if (phone.Default == true)
                                phone.Default = false;
                        }
                        (this.selectObject() as IPhoneData).Default = true;
                        ((CheckEdit)sendr).Checked = true;
                    }
                };

                if (args.Column.FieldName == "Number")
                {
                    args.RepositoryItem = phoneEditor;
                }
                if (args.Column.FieldName == "PhoneType")
                {
                    args.RepositoryItem = textEditor;
                }
                if (args.Column.FieldName == "Default")
                {
                    args.RepositoryItem = checkEditor;
                }

                this.Text = CaptionHelper.GetLocalizedText("Custom fomrs messages", "PhonesFormHeader");
                this.barAddNmbrBtn.Caption = CaptionHelper.GetLocalizedText("Custom fomrs messages", "Add phone ");
                this.barDelNmbrBtn.Caption = CaptionHelper.GetLocalizedText("Custom fomrs messages", "Delete phones");
                this.barSelectNmbrBtn.Caption = CaptionHelper.GetLocalizedText("Custom fomrs messages", "Set as default");
                this.btn_cancel.Text = CaptionHelper.GetLocalizedText("Custom fomrs messages", "NewPatientCancelBtn");
                this.OKBtn.Text = CaptionHelper.GetLocalizedText("DialogButtons", "Apply");
            };
        }
예제 #40
0
        public static void CreateGridColumn(GridView gridView, DataTable dt, string tableName)
        {
            DataColumn colError = new DataColumn("ERROR");
            dt.Columns.Add(colError);
            DataColumn colNewRow = new DataColumn("NEW_ROW");
            dt.Columns.Add(colNewRow);

            GridColumn cotLoi = new GridColumn();
            cotLoi.Caption = "Dòng lỗi";
            cotLoi.FieldName = "ERROR";
            cotLoi.OptionsColumn.AllowEdit = false;
            RepositoryItemCheckEdit chkEditErr = new RepositoryItemCheckEdit();
            chkEditErr.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Standard;
            chkEditErr.ValueChecked = "1";
            chkEditErr.ValueUnchecked = null;
            cotLoi.ColumnEdit = chkEditErr;
            cotLoi.VisibleIndex = 0;
            cotLoi.Visible = true;
            gridView.Columns.Add(cotLoi);
            GridColumn cotNewRow = new GridColumn();
            cotNewRow.Caption = "Dòng mới";
            cotNewRow.FieldName = "NEW_ROW";
            cotNewRow.OptionsColumn.AllowEdit = false;
            RepositoryItemCheckEdit chkEditNew = new RepositoryItemCheckEdit();
            chkEditNew.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Standard;
            chkEditNew.ValueChecked = "1";
            chkEditNew.ValueUnchecked = null;
            cotNewRow.ColumnEdit = chkEditNew;
            cotNewRow.VisibleIndex = 1;
            cotNewRow.Visible = true;
            gridView.Columns.Add(cotNewRow);

            DataSet ds = DABase.getDatabase().LoadTable("FW_MAP_FIELD_CAPTION");
            DataRow[] drows = ds.Tables[0].Select("TABLE_NAME='" + tableName + "'");
            if (drows.Length > 0)
            {
                for (int i = 0; i < drows.Length; i++)
                {
                    DataRow dr = drows[i];
                    GridColumn col = new GridColumn();
                    col.Caption = dr["CAPTION"].ToString();
                    col.FieldName = dr["FIELD_NAME"].ToString();
                    col.VisibleIndex = i + 2;
                    col.Visible = true;
                    gridView.Columns.Add(col);
                }
            }
            else
            {
                for (int i = 0; i < dt.Columns.Count - 2; i++)
                {
                    DataColumn dc = dt.Columns[i];
                    GridColumn col = new GridColumn();
                    col.Caption = dc.Caption;
                    col.FieldName = dc.ColumnName;
                    col.VisibleIndex = i + 2;
                    col.Visible = true;
                    gridView.Columns.Add(col);
                }
            }
        }
예제 #41
0
 private void InitializeComponent()
 {
     this.grid = new SmGridControl();
     this.view = new SmGridView();
     this.rschkSel = new RepositoryItemCheckEdit();
     this.bgLoadDataWorker = new BackgroundWorker();
     this.grid.BeginInit();
     this.view.BeginInit();
     this.rschkSel.BeginInit();
     base.SuspendLayout();
     this.grid.Dock = DockStyle.Fill;
     this.grid.EmbeddedNavigator.Name = "";
     this.grid.Location = new Point(0, 0);
     this.grid.MainView = this.view;
     this.grid.Name = "grid";
     this.grid.RepositoryItems.AddRange(new RepositoryItem[] { this.rschkSel });
     this.grid.Size = new Size(480, 0x1b0);
     this.grid.TabIndex = 4;
     this.grid.ViewCollection.AddRange(new BaseView[] { this.view });
     this.view.GridControl = this.grid;
     this.view.Name = "view";
     this.view.OptionsMenu.EnableColumnMenu = false;
     this.view.OptionsMenu.EnableFooterMenu = false;
     this.view.OptionsMenu.EnableGroupPanelMenu = false;
     this.view.OptionsView.EnableAppearanceEvenRow = true;
     this.view.OptionsView.EnableAppearanceOddRow = true;
     this.view.PaintStyleName = "Skin";
     this.view.DoubleClick += new EventHandler(this.ViewDoubleClick);
     this.rschkSel.AutoHeight = false;
     this.rschkSel.Name = "rschkSel";
     this.rschkSel.NullStyle = StyleIndeterminate.Unchecked;
     this.rschkSel.EditValueChanged += new EventHandler(this.rschkSel_EditValueChanged);
     this.bgLoadDataWorker.DoWork += new DoWorkEventHandler(this.LoadDataAsync);
     this.bgLoadDataWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(this.OnLoadDataCompleted);
     base.Controls.Add(this.grid);
     base.Name = "WfAbstractBox";
     base.Size = new Size(480, 0x1b0);
     this.grid.EndInit();
     this.view.EndInit();
     this.rschkSel.EndInit();
     base.ResumeLayout(false);
 }
예제 #42
0
 private void InitializeComponent()
 {
     this.components = new Container();
     LineSeriesView view = new LineSeriesView();
     this.btnGetStats = new GPGButton();
     this.gpgChartControl = new GPGChartControl(this.components);
     this.gpgTreeList = new GPGTreeList(this.components);
     this.colVisible = new TreeListColumn();
     this.riVisible = new RepositoryItemCheckEdit();
     this.colFilterName = new TreeListColumn();
     ((ISupportInitialize) this.gpgChartControl).BeginInit();
     ((ISupportInitialize) view).BeginInit();
     this.gpgTreeList.BeginInit();
     this.riVisible.BeginInit();
     base.SuspendLayout();
     base.ttDefault.DefaultController.AutoPopDelay = 0x3e8;
     this.btnGetStats.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     this.btnGetStats.Location = new Point(0x1f3, 0x18c);
     this.btnGetStats.LookAndFeel.SkinName = "London Liquid Sky";
     this.btnGetStats.LookAndFeel.UseDefaultLookAndFeel = false;
     this.btnGetStats.Name = "btnGetStats";
     this.btnGetStats.Size = new Size(130, 0x17);
     this.btnGetStats.TabIndex = 8;
     this.btnGetStats.Text = "<LOC>Get Stats";
     this.btnGetStats.UseVisualStyleBackColor = false;
     this.btnGetStats.Click += new EventHandler(this.btnGetStats_Click);
     this.gpgChartControl.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     this.gpgChartControl.AppearanceName = "Pastel Kit";
     this.gpgChartControl.Location = new Point(240, 0x73);
     this.gpgChartControl.Name = "gpgChartControl";
     this.gpgChartControl.SeriesTemplate.PointOptionsTypeName = "PointOptions";
     this.gpgChartControl.SeriesTemplate.View = view;
     this.gpgChartControl.Size = new Size(0x184, 0x113);
     this.gpgChartControl.TabIndex = 9;
     this.gpgTreeList.Anchor = AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     this.gpgTreeList.Columns.AddRange(new TreeListColumn[] { this.colVisible, this.colFilterName });
     this.gpgTreeList.Location = new Point(12, 0x73);
     this.gpgTreeList.Name = "gpgTreeList";
     this.gpgTreeList.BeginUnboundLoad();
     this.gpgTreeList.AppendNode(new object[] { false, "Unit Stats" }, -1);
     this.gpgTreeList.AppendNode(new object[] { false, "Summary Stats" }, -1);
     this.gpgTreeList.AppendNode(new object[] { false, "Economy Stats" }, -1);
     this.gpgTreeList.AppendNode(new object[] { true, "Totals Stats" }, -1);
     this.gpgTreeList.EndUnboundLoad();
     this.gpgTreeList.RepositoryItems.AddRange(new RepositoryItem[] { this.riVisible });
     this.gpgTreeList.Size = new Size(0xde, 0x113);
     this.gpgTreeList.TabIndex = 10;
     this.colVisible.Caption = "Visible";
     this.colVisible.ColumnEdit = this.riVisible;
     this.colVisible.FieldName = "Visible";
     this.colVisible.MinWidth = 0x1c;
     this.colVisible.Name = "colVisible";
     this.colVisible.VisibleIndex = 0;
     this.colVisible.Width = 50;
     this.riVisible.AutoHeight = false;
     this.riVisible.Name = "riVisible";
     this.riVisible.CheckedChanged += new EventHandler(this.riVisible_CheckedChanged);
     this.colFilterName.Caption = "Filter Name";
     this.colFilterName.FieldName = "FilterName";
     this.colFilterName.Name = "colFilterName";
     this.colFilterName.VisibleIndex = 1;
     this.colFilterName.Width = 0x97;
     base.AutoScaleDimensions = new SizeF(7f, 16f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.ClientSize = new Size(640, 480);
     base.Controls.Add(this.gpgTreeList);
     base.Controls.Add(this.gpgChartControl);
     base.Controls.Add(this.btnGetStats);
     base.Location = new Point(0, 0);
     base.Name = "DlgSupcomStatsWatcher";
     this.Text = "DlgSupcomStatsWatcher";
     base.Controls.SetChildIndex(this.btnGetStats, 0);
     base.Controls.SetChildIndex(this.gpgChartControl, 0);
     base.Controls.SetChildIndex(this.gpgTreeList, 0);
     ((ISupportInitialize) view).EndInit();
     ((ISupportInitialize) this.gpgChartControl).EndInit();
     this.gpgTreeList.EndInit();
     this.riVisible.EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
예제 #43
0
        protected virtual void Attach(GridView view)
        {
            if (view == null) return;
            selection.Clear();
            this._view = view;
            view.BeginUpdate();
            try
            {
                edit = view.GridControl.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;

                column = view.Columns.Add();
                column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
                column.Visible = true;
                column.VisibleIndex = 0;
                column.FieldName = "CheckMarkSelection";
                column.Caption = "Selecione";
                column.OptionsColumn.ShowCaption = true;
                column.OptionsColumn.AllowEdit = false;
                column.OptionsColumn.AllowSize = false;
                column.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
                column.Width = GetCheckBoxWidth();
                column.ColumnEdit = edit;

                view.Click += new EventHandler(View_Click);
                view.MouseDown += new MouseEventHandler(view_MouseDown);
                view.CustomDrawColumnHeader += new ColumnHeaderCustomDrawEventHandler(View_CustomDrawColumnHeader);
                view.CustomDrawGroupRow += new RowObjectCustomDrawEventHandler(View_CustomDrawGroupRow);
                view.CustomUnboundColumnData += new CustomColumnDataEventHandler(view_CustomUnboundColumnData);
                view.KeyDown += new KeyEventHandler(view_KeyDown);
                view.RowStyle += new RowStyleEventHandler(view_RowStyle);
            }
            finally
            {
                view.EndUpdate();
            }
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CommonParentForm));
     this.rbnMain = new DevExpress.XtraBars.Ribbon.RibbonControl();
     this.appMenu = new DevExpress.XtraBars.Ribbon.ApplicationMenu(this.components);
     this.bbiSettings = new DevExpress.XtraBars.BarButtonItem();
     this.bbiExitUser = new DevExpress.XtraBars.BarButtonItem();
     this.siVersion = new DevExpress.XtraBars.BarStaticItem();
     this.alignButtonGroup = new DevExpress.XtraBars.BarButtonGroup();
     this.bbiAdd = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRemove = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRefresh = new DevExpress.XtraBars.BarButtonItem();
     this.bbiExel = new DevExpress.XtraBars.BarButtonItem();
     this.bbiAdmin = new DevExpress.XtraBars.BarButtonItem();
     this.bbiSave = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRoleEdit = new DevExpress.XtraBars.BarButtonItem();
     this.brDockMenuItem = new DevExpress.XtraBars.BarDockingMenuItem();
     this.brEdItControlsStates = new DevExpress.XtraBars.BarEditItem();
     this.ripceControlsStates = new DevExpress.XtraEditors.Repository.RepositoryItemPopupContainerEdit();
     this.rpMain = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgMain = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.rpDictionaries = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgCommonDictionaries = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.rpReports = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpSettings = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpAdmin = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgAdmin = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.riceStates = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
     this.rsbMain = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
     this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
     this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
     this.documentMng = new DevExpress.XtraBars.Docking2010.DocumentManager(this.components);
     this.MDIViewNative = new DevExpress.XtraBars.Docking2010.Views.NativeMdi.NativeMdiView(this.components);
     this.MDIViewTabbed = new DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView(this.components);
     this.bbiChangeUser = new DevExpress.XtraBars.BarButtonItem();
     ((System.ComponentModel.ISupportInitialize)(this.rbnMain)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.appMenu)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ripceControlsStates)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.riceStates)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.documentMng)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewNative)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewTabbed)).BeginInit();
     this.SuspendLayout();
     //
     // rbnMain
     //
     this.rbnMain.ApplicationButtonDropDownControl = this.appMenu;
     this.rbnMain.ApplicationButtonText = "Меню";
     this.rbnMain.AutoSizeItems = true;
     this.rbnMain.Categories.AddRange(new DevExpress.XtraBars.BarManagerCategory[] {
     new DevExpress.XtraBars.BarManagerCategory("Dictionaries", new System.Guid("bfb17616-73d9-42e6-8028-a10ce19e5160"))});
     this.rbnMain.ExpandCollapseItem.Id = 0;
     this.rbnMain.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
     this.rbnMain.ExpandCollapseItem,
     this.siVersion,
     this.alignButtonGroup,
     this.bbiAdd,
     this.bbiRemove,
     this.bbiRefresh,
     this.bbiExel,
     this.bbiAdmin,
     this.bbiSave,
     this.bbiRoleEdit,
     this.brDockMenuItem,
     this.bbiSettings,
     this.brEdItControlsStates,
     this.bbiExitUser,
     this.bbiChangeUser});
     this.rbnMain.Location = new System.Drawing.Point(0, 0);
     this.rbnMain.MaxItemId = 162;
     this.rbnMain.Name = "rbnMain";
     this.rbnMain.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
     this.rpMain,
     this.rpDictionaries,
     this.rpReports,
     this.rpSettings,
     this.rpAdmin});
     this.rbnMain.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
     this.ripceControlsStates,
     this.riceStates});
     this.rbnMain.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonControlStyle.Office2013;
     this.rbnMain.ShowToolbarCustomizeItem = false;
     this.rbnMain.Size = new System.Drawing.Size(1210, 173);
     this.rbnMain.StatusBar = this.rsbMain;
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiAdd);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiRemove);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiRefresh);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiSave);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiExel);
     this.rbnMain.Toolbar.ItemLinks.Add(this.brDockMenuItem);
     this.rbnMain.Toolbar.ShowCustomizeItem = false;
     this.rbnMain.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Below;
     this.rbnMain.ShowCustomizationMenu += new DevExpress.XtraBars.Ribbon.RibbonCustomizationMenuEventHandler(this.RibbonShowCustomizationMenu);
     this.rbnMain.Merge += new DevExpress.XtraBars.Ribbon.RibbonMergeEventHandler(this.MainMerge);
     //
     // appMenu
     //
     this.appMenu.ItemLinks.Add(this.bbiSettings, true);
     this.appMenu.ItemLinks.Add(this.bbiChangeUser);
     this.appMenu.ItemLinks.Add(this.bbiExitUser);
     this.appMenu.Name = "appMenu";
     this.appMenu.Ribbon = this.rbnMain;
     //
     // bbiSettings
     //
     this.bbiSettings.Caption = "Настройки";
     this.bbiSettings.Description = "Настройки программы";
     this.bbiSettings.Hint = "Настройки программы";
     this.bbiSettings.Id = 76;
     this.bbiSettings.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiSettings.LargeGlyph")));
     this.bbiSettings.Name = "bbiSettings";
     //
     // bbiExitUser
     //
     this.bbiExitUser.Caption = "Выход";
     this.bbiExitUser.CategoryGuid = new System.Guid("6ffddb2b-9015-4d97-a4c1-91613e0ef537");
     this.bbiExitUser.Id = 160;
     this.bbiExitUser.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiExitUser.LargeGlyph")));
     this.bbiExitUser.Name = "bbiExitUser";
     //
     // siVersion
     //
     this.siVersion.Caption = "Версия:";
     this.siVersion.Id = 31;
     this.siVersion.Name = "siVersion";
     this.siVersion.TextAlignment = System.Drawing.StringAlignment.Near;
     //
     // alignButtonGroup
     //
     this.alignButtonGroup.Caption = "Align Commands";
     this.alignButtonGroup.Id = 52;
     this.alignButtonGroup.Name = "alignButtonGroup";
     //
     // bbiAdd
     //
     this.bbiAdd.Caption = "Добавить данные";
     this.bbiAdd.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiAdd.Glyph")));
     this.bbiAdd.Hint = "Добавить новую запись в текущий элемент интерфейса";
     this.bbiAdd.Id = 62;
     this.bbiAdd.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N));
     this.bbiAdd.Name = "bbiAdd";
     this.bbiAdd.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.AddItemClick);
     //
     // bbiRemove
     //
     this.bbiRemove.Caption = "Удалить данные";
     this.bbiRemove.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRemove.Glyph")));
     this.bbiRemove.Hint = "Удалить текущие данные";
     this.bbiRemove.Id = 63;
     this.bbiRemove.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete));
     this.bbiRemove.Name = "bbiRemove";
     this.bbiRemove.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RemoveItemClick);
     //
     // bbiRefresh
     //
     this.bbiRefresh.Caption = "Обновить данные";
     this.bbiRefresh.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRefresh.Glyph")));
     this.bbiRefresh.Hint = "Обновить записи из базы данных";
     this.bbiRefresh.Id = 65;
     this.bbiRefresh.ItemShortcut = new DevExpress.XtraBars.BarShortcut(System.Windows.Forms.Keys.F5);
     this.bbiRefresh.Name = "bbiRefresh";
     this.bbiRefresh.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RefreshItemClick);
     //
     // bbiExel
     //
     this.bbiExel.Caption = "Сохранить в Exel";
     this.bbiExel.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiExel.Glyph")));
     this.bbiExel.Hint = "Сохранить данные в виде Excel";
     this.bbiExel.Id = 66;
     this.bbiExel.Name = "bbiExel";
     this.bbiExel.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.ExelItemClick);
     //
     // bbiAdmin
     //
     this.bbiAdmin.Caption = "Настройка интерфейсов";
     this.bbiAdmin.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiAdmin.Glyph")));
     this.bbiAdmin.Hint = "Администрирование внешнего вида форм";
     this.bbiAdmin.Id = 69;
     this.bbiAdmin.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiAdmin.LargeGlyph")));
     this.bbiAdmin.Name = "bbiAdmin";
     this.bbiAdmin.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.AdminItemClick);
     //
     // bbiSave
     //
     this.bbiSave.Caption = "Сохранить в базу";
     this.bbiSave.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiSave.Glyph")));
     this.bbiSave.Hint = "Сохранить изменения текущего элемента на сервер";
     this.bbiSave.Id = 70;
     this.bbiSave.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S));
     this.bbiSave.Name = "bbiSave";
     this.bbiSave.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.CommitItemClick);
     //
     // bbiRoleEdit
     //
     this.bbiRoleEdit.Caption = "Настройка ролей и сотрудников";
     this.bbiRoleEdit.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRoleEdit.Glyph")));
     this.bbiRoleEdit.Id = 71;
     this.bbiRoleEdit.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiRoleEdit.LargeGlyph")));
     this.bbiRoleEdit.Name = "bbiRoleEdit";
     this.bbiRoleEdit.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RoleEditItemClick);
     //
     // brDockMenuItem
     //
     this.brDockMenuItem.Caption = "Расположение форм";
     this.brDockMenuItem.Glyph = ((System.Drawing.Image)(resources.GetObject("brDockMenuItem.Glyph")));
     this.brDockMenuItem.Hint = "Настройка расположения форм";
     this.brDockMenuItem.Id = 78;
     this.brDockMenuItem.Name = "brDockMenuItem";
     //
     // brEdItControlsStates
     //
     this.brEdItControlsStates.Edit = this.ripceControlsStates;
     this.brEdItControlsStates.Id = 89;
     this.brEdItControlsStates.Name = "brEdItControlsStates";
     //
     // ripceControlsStates
     //
     this.ripceControlsStates.AutoHeight = false;
     this.ripceControlsStates.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
     new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
     this.ripceControlsStates.Name = "ripceControlsStates";
     //
     // rpMain
     //
     this.rpMain.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgMain});
     this.rpMain.Name = "rpMain";
     this.rpMain.Text = "Главная";
     //
     // rpgMain
     //
     this.rpgMain.Name = "rpgMain";
     this.rpgMain.Text = "Главное";
     //
     // rpDictionaries
     //
     this.rpDictionaries.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgCommonDictionaries});
     this.rpDictionaries.Name = "rpDictionaries";
     this.rpDictionaries.Text = "Справочники";
     //
     // rpgCommonDictionaries
     //
     this.rpgCommonDictionaries.Name = "rpgCommonDictionaries";
     this.rpgCommonDictionaries.Text = "Общие";
     //
     // rpReports
     //
     this.rpReports.Name = "rpReports";
     this.rpReports.Text = "Отчёты";
     //
     // rpSettings
     //
     this.rpSettings.Name = "rpSettings";
     this.rpSettings.Text = "Настройки системы";
     //
     // rpAdmin
     //
     this.rpAdmin.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgAdmin});
     this.rpAdmin.Name = "rpAdmin";
     this.rpAdmin.Text = "Администрирование";
     this.rpAdmin.Visible = false;
     //
     // rpgAdmin
     //
     this.rpgAdmin.ItemLinks.Add(this.bbiAdmin);
     this.rpgAdmin.ItemLinks.Add(this.bbiRoleEdit);
     this.rpgAdmin.Name = "rpgAdmin";
     this.rpgAdmin.Text = "Администратор";
     //
     // riceStates
     //
     this.riceStates.Name = "riceStates";
     this.riceStates.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
     //
     // rsbMain
     //
     this.rsbMain.ItemLinks.Add(this.siVersion);
     this.rsbMain.Location = new System.Drawing.Point(0, 669);
     this.rsbMain.Name = "rsbMain";
     this.rsbMain.Ribbon = this.rbnMain;
     this.rsbMain.Size = new System.Drawing.Size(1210, 31);
     //
     // dxErrorProvider
     //
     this.dxErrorProvider.ContainerControl = this;
     //
     // documentMng
     //
     this.documentMng.MdiParent = this;
     this.documentMng.MenuManager = this.rbnMain;
     this.documentMng.ShowThumbnailsInTaskBar = DevExpress.Utils.DefaultBoolean.False;
     this.documentMng.View = this.MDIViewNative;
     this.documentMng.ViewCollection.AddRange(new DevExpress.XtraBars.Docking2010.Views.BaseView[] {
     this.MDIViewNative,
     this.MDIViewTabbed});
     //
     // bbiChangeUser
     //
     this.bbiChangeUser.Caption = "Сменить пользователя";
     this.bbiChangeUser.Id = 161;
     this.bbiChangeUser.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiChangeUser.LargeGlyph")));
     this.bbiChangeUser.Name = "bbiChangeUser";
     //
     // CommonParentForm
     //
     this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(1210, 700);
     this.Controls.Add(this.rsbMain);
     this.Controls.Add(this.rbnMain);
     this.IsMdiContainer = true;
     this.Name = "CommonParentForm";
     this.Ribbon = this.rbnMain;
     this.StatusBar = this.rsbMain;
     this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
     this.Activated += new System.EventHandler(this.CommonParentFormActivated);
     this.Load += new System.EventHandler(this.CommonParentFormLoad);
     this.Shown += new System.EventHandler(this.CommonParentFormShown);
     ((System.ComponentModel.ISupportInitialize)(this.rbnMain)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.appMenu)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ripceControlsStates)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.riceStates)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.documentMng)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewNative)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewTabbed)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
예제 #45
0
 public RefreshBySsiForm(IRefreshBySsiController controller)
 {
     _controller = controller;
     InitializeComponent();
     checkEdit = new RepositoryItemCheckEdit();
 }
예제 #46
0
 private void AddStateItemToMenu(int id, string name)
 {
     var riceStates = new RepositoryItemCheckEdit
     {
         AutoWidth = true,
         Caption = string.Empty,
         GlyphAlignment = HorzAlignment.Far,
         NullStyle = StyleIndeterminate.Unchecked,
         Appearance = { BackColor = Color.Transparent }
     };
     AddBarButton(dxsmiSaved, name, UserStateItemClick, id);
     var checkStateBtn = new DXEditMenuItem
     {
         Caption = name,
         Edit = riceStates,
         Tag = id
     };
     dxsmiRemove.Items.Add(checkStateBtn);
 }
예제 #47
0
파일: XtraGrid.cs 프로젝트: labeuze/source
        public static void SetGridColumnsDefaultEdit_check(GridView view, GridColumn colGrid)
        {
            //if (gbTrace) cTrace.StartNestedLevel("Set_DefaultEdit_Check");

            DataTable dt;
            DataColumn col;
            RepositoryItemCheckEdit edit_check;

            edit_check = new RepositoryItemCheckEdit();
            edit_check.Name = "PKT_Grid_Check" + colGrid.FieldName;
            ((System.ComponentModel.ISupportInitialize)edit_check).BeginInit();
            view.GridControl.RepositoryItems.AddRange(new RepositoryItem[] { edit_check });
            edit_check.AllowGrayed = true;
            if (view.GridControl.DataSource is DataTable)
            {
                dt = (DataTable)view.GridControl.DataSource;
                if (dt.Columns.Contains(colGrid.FieldName))
                {
                    col = dt.Columns[colGrid.FieldName];
                    if (!col.AllowDBNull)
                    {
                        if (col.DefaultValue == null) col.DefaultValue = false;
                        edit_check.AllowGrayed = false;
                    }
                }
            }
            //edit_check.AutoHeight = false;
            ((System.ComponentModel.ISupportInitialize)edit_check).EndInit();
            colGrid.ColumnEdit = edit_check;

            //if (gbTrace) cTrace.StopNestedLevel("Set_DefaultEdit_Check");
        }
예제 #48
0
 /// <summary>
 /// 设置RepositoryItemCheckEdit组件的绑定样式.
 /// </summary>
 /// <param name="propCheckEdit">RepositoryItemCheckEdit</param>
 private static void SetCheckEditLayout(RepositoryItemCheckEdit propCheckEdit)
 {
     if (propCheckEdit == null) return;
     propCheckEdit.ValueChecked = "Y"; //当值为Y勾选
     propCheckEdit.ValueGrayed = ""; //当值为空变为灰色
     propCheckEdit.ValueUnchecked = "N";//当值为N取消勾选
     propCheckEdit.NullStyle = StyleIndeterminate.Unchecked;
 }
예제 #49
0
        protected virtual void Attach(GridView view)
        {
            if (view == null) return;
            selection.Clear();
            this.view = view;
            edit = view.GridControl.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;
            edit.EditValueChanged += new EventHandler(edit_EditValueChanged);
            if (view is DevExpress.XtraGrid.Views.BandedGrid.BandedGridView || view is DevExpress.XtraGrid.Views.BandedGrid.AdvBandedGridView)
            {
                column =  view.Columns.Add();
            }
            else
            {
                column = new GridColumn();
            }
            column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            column.VisibleIndex = int.MaxValue;
            //column.FieldName = "selected";
            column.FieldName = SelectionFiledName;
            column.Caption = " ";
            column.OptionsColumn.ShowCaption = false;
            column.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            column.ColumnEdit = edit;
            column.Fixed = FixedStyle.Left;
            column.Width = 35;
            view.FixedLineWidth = 1;
            view.CustomDrawColumnHeader += new
            ColumnHeaderCustomDrawEventHandler(View_CustomDrawColumnHeader);
            view.CustomDrawGroupRow += new
            RowObjectCustomDrawEventHandler(View_CustomDrawGroupRow);
            view.CustomUnboundColumnData += new
            CustomColumnDataEventHandler(view_CustomUnboundColumnData);
            //  view.RowStyle += new RowStyleEventHandler(view_RowStyle);
            view.MouseDown += new MouseEventHandler(view_MouseDown);
            //view.MouseUp += new MouseEventHandler(view_MouseUp);
            //view.Click += new EventHandler(view_Click);

            edit.Tag = true;
        }
예제 #50
0
 private void InitializeComponent()
 {
     ComponentResourceManager manager = new ComponentResourceManager(typeof(DlgJoinGame));
     this.skinButtonJoin = new SkinButton();
     this.skinButtonCancel = new SkinButton();
     this.skinButtonRefresh = new SkinButton();
     this.gpgGameGrid = new GPGChatGrid();
     this.gvGameView = new GridView();
     this.colHasPassword = new GridColumn();
     this.riHasPassword = new RepositoryItemCheckEdit();
     this.colDescription = new GridColumn();
     this.colHostName = new GridColumn();
     this.colPlayerCount = new GridColumn();
     this.colPlayerLevels = new GridColumn();
     this.rimPictureEdit3 = new RepositoryItemPictureEdit();
     this.rimTextEdit = new RepositoryItemTextEdit();
     this.rimMemoEdit3 = new RepositoryItemMemoEdit();
     this.repositoryItemPictureEdit1 = new RepositoryItemPictureEdit();
     ((ISupportInitialize) base.pbBottom).BeginInit();
     this.gpgGameGrid.BeginInit();
     this.gvGameView.BeginInit();
     this.riHasPassword.BeginInit();
     this.rimPictureEdit3.BeginInit();
     this.rimTextEdit.BeginInit();
     this.rimMemoEdit3.BeginInit();
     this.repositoryItemPictureEdit1.BeginInit();
     base.SuspendLayout();
     base.pbBottom.Size = new Size(0x264, 0x39);
     base.ttDefault.SetSuperTip(base.pbBottom, null);
     base.ttDefault.DefaultController.AutoPopDelay = 0x3e8;
     base.ttDefault.DefaultController.ToolTipLocation = ToolTipLocation.RightTop;
     this.skinButtonJoin.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     this.skinButtonJoin.AutoStyle = true;
     this.skinButtonJoin.BackColor = Color.Black;
     this.skinButtonJoin.ButtonState = 0;
     this.skinButtonJoin.DialogResult = DialogResult.OK;
     this.skinButtonJoin.DisabledForecolor = Color.Gray;
     this.skinButtonJoin.DrawColor = Color.White;
     this.skinButtonJoin.DrawEdges = true;
     this.skinButtonJoin.Enabled = false;
     this.skinButtonJoin.FocusColor = Color.Yellow;
     this.skinButtonJoin.Font = new Font("Verdana", 8f, FontStyle.Bold);
     this.skinButtonJoin.ForeColor = Color.White;
     this.skinButtonJoin.HorizontalScalingMode = ScalingModes.Tile;
     this.skinButtonJoin.IsStyled = true;
     this.skinButtonJoin.Location = new Point(0x150, 430);
     this.skinButtonJoin.Name = "skinButtonJoin";
     this.skinButtonJoin.Size = new Size(0x68, 0x17);
     this.skinButtonJoin.SkinBasePath = @"Controls\Button\Round Edge";
     base.ttDefault.SetSuperTip(this.skinButtonJoin, null);
     this.skinButtonJoin.TabIndex = 0x23;
     this.skinButtonJoin.TabStop = true;
     this.skinButtonJoin.Text = "<LOC>Join Game";
     this.skinButtonJoin.TextAlign = ContentAlignment.MiddleCenter;
     this.skinButtonJoin.TextPadding = new Padding(0);
     this.skinButtonJoin.Click += new EventHandler(this.skinButtonJoin_Click);
     this.skinButtonCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     this.skinButtonCancel.AutoStyle = true;
     this.skinButtonCancel.BackColor = Color.Black;
     this.skinButtonCancel.ButtonState = 0;
     this.skinButtonCancel.DialogResult = DialogResult.OK;
     this.skinButtonCancel.DisabledForecolor = Color.Gray;
     this.skinButtonCancel.DrawColor = Color.White;
     this.skinButtonCancel.DrawEdges = true;
     this.skinButtonCancel.FocusColor = Color.Yellow;
     this.skinButtonCancel.Font = new Font("Verdana", 8f, FontStyle.Bold);
     this.skinButtonCancel.ForeColor = Color.White;
     this.skinButtonCancel.HorizontalScalingMode = ScalingModes.Tile;
     this.skinButtonCancel.IsStyled = true;
     this.skinButtonCancel.Location = new Point(0x22c, 430);
     this.skinButtonCancel.Name = "skinButtonCancel";
     this.skinButtonCancel.Size = new Size(0x68, 0x17);
     this.skinButtonCancel.SkinBasePath = @"Controls\Button\Round Edge";
     base.ttDefault.SetSuperTip(this.skinButtonCancel, null);
     this.skinButtonCancel.TabIndex = 0x22;
     this.skinButtonCancel.TabStop = true;
     this.skinButtonCancel.Text = "<LOC>Cancel";
     this.skinButtonCancel.TextAlign = ContentAlignment.MiddleCenter;
     this.skinButtonCancel.TextPadding = new Padding(0);
     this.skinButtonCancel.Click += new EventHandler(this.skinButtonCancel_Click);
     this.skinButtonRefresh.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;
     this.skinButtonRefresh.AutoStyle = true;
     this.skinButtonRefresh.BackColor = Color.Black;
     this.skinButtonRefresh.ButtonState = 0;
     this.skinButtonRefresh.DialogResult = DialogResult.OK;
     this.skinButtonRefresh.DisabledForecolor = Color.Gray;
     this.skinButtonRefresh.DrawColor = Color.White;
     this.skinButtonRefresh.DrawEdges = true;
     this.skinButtonRefresh.FocusColor = Color.Yellow;
     this.skinButtonRefresh.Font = new Font("Verdana", 8f, FontStyle.Bold);
     this.skinButtonRefresh.ForeColor = Color.White;
     this.skinButtonRefresh.HorizontalScalingMode = ScalingModes.Tile;
     this.skinButtonRefresh.IsStyled = true;
     this.skinButtonRefresh.Location = new Point(0x1be, 430);
     this.skinButtonRefresh.Name = "skinButtonRefresh";
     this.skinButtonRefresh.Size = new Size(0x68, 0x17);
     this.skinButtonRefresh.SkinBasePath = @"Controls\Button\Round Edge";
     base.ttDefault.SetSuperTip(this.skinButtonRefresh, null);
     this.skinButtonRefresh.TabIndex = 0x21;
     this.skinButtonRefresh.TabStop = true;
     this.skinButtonRefresh.Text = "<LOC>Refresh List";
     this.skinButtonRefresh.TextAlign = ContentAlignment.MiddleCenter;
     this.skinButtonRefresh.TextPadding = new Padding(0);
     this.skinButtonRefresh.Click += new EventHandler(this.skinButtonRefresh_Click);
     this.gpgGameGrid.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     this.gpgGameGrid.CustomizeStyle = false;
     this.gpgGameGrid.EmbeddedNavigator.Name = "";
     this.gpgGameGrid.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.gpgGameGrid.IgnoreMouseWheel = false;
     this.gpgGameGrid.Location = new Point(12, 0x53);
     this.gpgGameGrid.LookAndFeel.SkinName = "London Liquid Sky";
     this.gpgGameGrid.LookAndFeel.UseDefaultLookAndFeel = false;
     this.gpgGameGrid.MainView = this.gvGameView;
     this.gpgGameGrid.Name = "gpgGameGrid";
     this.gpgGameGrid.RepositoryItems.AddRange(new RepositoryItem[] { this.rimPictureEdit3, this.rimTextEdit, this.rimMemoEdit3, this.riHasPassword, this.repositoryItemPictureEdit1 });
     this.gpgGameGrid.ShowOnlyPredefinedDetails = true;
     this.gpgGameGrid.Size = new Size(0x287, 0x155);
     this.gpgGameGrid.TabIndex = 0x20;
     this.gpgGameGrid.ViewCollection.AddRange(new BaseView[] { this.gvGameView });
     this.gpgGameGrid.DoubleClick += new EventHandler(this.gpgGameGrid_DoubleClick);
     this.gvGameView.Appearance.ColumnFilterButton.BackColor = Color.Black;
     this.gvGameView.Appearance.ColumnFilterButton.BackColor2 = Color.FromArgb(20, 20, 20);
     this.gvGameView.Appearance.ColumnFilterButton.BorderColor = Color.Black;
     this.gvGameView.Appearance.ColumnFilterButton.ForeColor = Color.Gray;
     this.gvGameView.Appearance.ColumnFilterButton.Options.UseBackColor = true;
     this.gvGameView.Appearance.ColumnFilterButton.Options.UseBorderColor = true;
     this.gvGameView.Appearance.ColumnFilterButton.Options.UseForeColor = true;
     this.gvGameView.Appearance.ColumnFilterButtonActive.BackColor = Color.FromArgb(20, 20, 20);
     this.gvGameView.Appearance.ColumnFilterButtonActive.BackColor2 = Color.FromArgb(0x4e, 0x4e, 0x4e);
     this.gvGameView.Appearance.ColumnFilterButtonActive.BorderColor = Color.FromArgb(20, 20, 20);
     this.gvGameView.Appearance.ColumnFilterButtonActive.ForeColor = Color.Blue;
     this.gvGameView.Appearance.ColumnFilterButtonActive.Options.UseBackColor = true;
     this.gvGameView.Appearance.ColumnFilterButtonActive.Options.UseBorderColor = true;
     this.gvGameView.Appearance.ColumnFilterButtonActive.Options.UseForeColor = true;
     this.gvGameView.Appearance.Empty.BackColor = Color.Black;
     this.gvGameView.Appearance.Empty.Options.UseBackColor = true;
     this.gvGameView.Appearance.FilterCloseButton.BackColor = Color.FromArgb(0xd4, 0xd0, 200);
     this.gvGameView.Appearance.FilterCloseButton.BackColor2 = Color.FromArgb(90, 90, 90);
     this.gvGameView.Appearance.FilterCloseButton.BorderColor = Color.FromArgb(0xd4, 0xd0, 200);
     this.gvGameView.Appearance.FilterCloseButton.ForeColor = Color.Black;
     this.gvGameView.Appearance.FilterCloseButton.GradientMode = LinearGradientMode.ForwardDiagonal;
     this.gvGameView.Appearance.FilterCloseButton.Options.UseBackColor = true;
     this.gvGameView.Appearance.FilterCloseButton.Options.UseBorderColor = true;
     this.gvGameView.Appearance.FilterCloseButton.Options.UseForeColor = true;
     this.gvGameView.Appearance.FilterPanel.BackColor = Color.Black;
     this.gvGameView.Appearance.FilterPanel.BackColor2 = Color.FromArgb(0xd4, 0xd0, 200);
     this.gvGameView.Appearance.FilterPanel.ForeColor = Color.White;
     this.gvGameView.Appearance.FilterPanel.GradientMode = LinearGradientMode.ForwardDiagonal;
     this.gvGameView.Appearance.FilterPanel.Options.UseBackColor = true;
     this.gvGameView.Appearance.FilterPanel.Options.UseForeColor = true;
     this.gvGameView.Appearance.FixedLine.BackColor = Color.FromArgb(0x3a, 0x3a, 0x3a);
     this.gvGameView.Appearance.FixedLine.Options.UseBackColor = true;
     this.gvGameView.Appearance.FocusedCell.BackColor = Color.Black;
     this.gvGameView.Appearance.FocusedCell.Font = new Font("Tahoma", 10f);
     this.gvGameView.Appearance.FocusedCell.ForeColor = Color.White;
     this.gvGameView.Appearance.FocusedCell.Options.UseBackColor = true;
     this.gvGameView.Appearance.FocusedCell.Options.UseFont = true;
     this.gvGameView.Appearance.FocusedCell.Options.UseForeColor = true;
     this.gvGameView.Appearance.FocusedRow.BackColor = Color.FromArgb(0xbb, 0xc9, 0xe2);
     this.gvGameView.Appearance.FocusedRow.BackColor2 = Color.FromArgb(0x52, 0x83, 190);
     this.gvGameView.Appearance.FocusedRow.Font = new Font("Arial", 9.75f);
     this.gvGameView.Appearance.FocusedRow.ForeColor = Color.White;
     this.gvGameView.Appearance.FocusedRow.GradientMode = LinearGradientMode.ForwardDiagonal;
     this.gvGameView.Appearance.FocusedRow.Options.UseBackColor = true;
     this.gvGameView.Appearance.FocusedRow.Options.UseFont = true;
     this.gvGameView.Appearance.FocusedRow.Options.UseForeColor = true;
     this.gvGameView.Appearance.FooterPanel.BackColor = Color.Black;
     this.gvGameView.Appearance.FooterPanel.BorderColor = Color.Black;
     this.gvGameView.Appearance.FooterPanel.Font = new Font("Tahoma", 10f);
     this.gvGameView.Appearance.FooterPanel.ForeColor = Color.White;
     this.gvGameView.Appearance.FooterPanel.Options.UseBackColor = true;
     this.gvGameView.Appearance.FooterPanel.Options.UseBorderColor = true;
     this.gvGameView.Appearance.FooterPanel.Options.UseFont = true;
     this.gvGameView.Appearance.FooterPanel.Options.UseForeColor = true;
     this.gvGameView.Appearance.GroupButton.BackColor = Color.Black;
     this.gvGameView.Appearance.GroupButton.BorderColor = Color.Black;
     this.gvGameView.Appearance.GroupButton.ForeColor = Color.White;
     this.gvGameView.Appearance.GroupButton.Options.UseBackColor = true;
     this.gvGameView.Appearance.GroupButton.Options.UseBorderColor = true;
     this.gvGameView.Appearance.GroupButton.Options.UseForeColor = true;
     this.gvGameView.Appearance.GroupFooter.BackColor = Color.FromArgb(10, 10, 10);
     this.gvGameView.Appearance.GroupFooter.BorderColor = Color.FromArgb(10, 10, 10);
     this.gvGameView.Appearance.GroupFooter.ForeColor = Color.White;
     this.gvGameView.Appearance.GroupFooter.Options.UseBackColor = true;
     this.gvGameView.Appearance.GroupFooter.Options.UseBorderColor = true;
     this.gvGameView.Appearance.GroupFooter.Options.UseForeColor = true;
     this.gvGameView.Appearance.GroupPanel.BackColor = Color.Black;
     this.gvGameView.Appearance.GroupPanel.BackColor2 = Color.Black;
     this.gvGameView.Appearance.GroupPanel.Font = new Font("Tahoma", 10f, FontStyle.Bold);
     this.gvGameView.Appearance.GroupPanel.ForeColor = Color.White;
     this.gvGameView.Appearance.GroupPanel.Options.UseBackColor = true;
     this.gvGameView.Appearance.GroupPanel.Options.UseFont = true;
     this.gvGameView.Appearance.GroupPanel.Options.UseForeColor = true;
     this.gvGameView.Appearance.GroupRow.BackColor = Color.Gray;
     this.gvGameView.Appearance.GroupRow.Font = new Font("Tahoma", 10f);
     this.gvGameView.Appearance.GroupRow.ForeColor = Color.White;
     this.gvGameView.Appearance.GroupRow.Options.UseBackColor = true;
     this.gvGameView.Appearance.GroupRow.Options.UseFont = true;
     this.gvGameView.Appearance.GroupRow.Options.UseForeColor = true;
     this.gvGameView.Appearance.HeaderPanel.BackColor = Color.Black;
     this.gvGameView.Appearance.HeaderPanel.BorderColor = Color.Black;
     this.gvGameView.Appearance.HeaderPanel.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
     this.gvGameView.Appearance.HeaderPanel.ForeColor = Color.Black;
     this.gvGameView.Appearance.HeaderPanel.Options.UseBackColor = true;
     this.gvGameView.Appearance.HeaderPanel.Options.UseBorderColor = true;
     this.gvGameView.Appearance.HeaderPanel.Options.UseFont = true;
     this.gvGameView.Appearance.HeaderPanel.Options.UseForeColor = true;
     this.gvGameView.Appearance.HideSelectionRow.BackColor = Color.Gray;
     this.gvGameView.Appearance.HideSelectionRow.Font = new Font("Tahoma", 10f);
     this.gvGameView.Appearance.HideSelectionRow.ForeColor = Color.FromArgb(0xd4, 0xd0, 200);
     this.gvGameView.Appearance.HideSelectionRow.Options.UseBackColor = true;
     this.gvGameView.Appearance.HideSelectionRow.Options.UseFont = true;
     this.gvGameView.Appearance.HideSelectionRow.Options.UseForeColor = true;
     this.gvGameView.Appearance.HorzLine.BackColor = Color.FromArgb(0x52, 0x83, 190);
     this.gvGameView.Appearance.HorzLine.Options.UseBackColor = true;
     this.gvGameView.Appearance.Preview.BackColor = Color.White;
     this.gvGameView.Appearance.Preview.Font = new Font("Tahoma", 10f);
     this.gvGameView.Appearance.Preview.ForeColor = Color.Purple;
     this.gvGameView.Appearance.Preview.Options.UseBackColor = true;
     this.gvGameView.Appearance.Preview.Options.UseFont = true;
     this.gvGameView.Appearance.Preview.Options.UseForeColor = true;
     this.gvGameView.Appearance.Row.BackColor = Color.Black;
     this.gvGameView.Appearance.Row.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0xb2);
     this.gvGameView.Appearance.Row.ForeColor = Color.White;
     this.gvGameView.Appearance.Row.Options.UseBackColor = true;
     this.gvGameView.Appearance.Row.Options.UseFont = true;
     this.gvGameView.Appearance.Row.Options.UseForeColor = true;
     this.gvGameView.Appearance.RowSeparator.BackColor = Color.White;
     this.gvGameView.Appearance.RowSeparator.BackColor2 = Color.White;
     this.gvGameView.Appearance.RowSeparator.Options.UseBackColor = true;
     this.gvGameView.Appearance.SelectedRow.BackColor = Color.FromArgb(0xbb, 0xc9, 0xe2);
     this.gvGameView.Appearance.SelectedRow.BackColor2 = Color.FromArgb(0x52, 0x83, 190);
     this.gvGameView.Appearance.SelectedRow.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
     this.gvGameView.Appearance.SelectedRow.ForeColor = Color.White;
     this.gvGameView.Appearance.SelectedRow.GradientMode = LinearGradientMode.ForwardDiagonal;
     this.gvGameView.Appearance.SelectedRow.Options.UseBackColor = true;
     this.gvGameView.Appearance.SelectedRow.Options.UseFont = true;
     this.gvGameView.Appearance.SelectedRow.Options.UseForeColor = true;
     this.gvGameView.Appearance.TopNewRow.Font = new Font("Tahoma", 10f);
     this.gvGameView.Appearance.TopNewRow.ForeColor = Color.White;
     this.gvGameView.Appearance.TopNewRow.Options.UseFont = true;
     this.gvGameView.Appearance.TopNewRow.Options.UseForeColor = true;
     this.gvGameView.Appearance.VertLine.BackColor = Color.FromArgb(0x52, 0x83, 190);
     this.gvGameView.Appearance.VertLine.Options.UseBackColor = true;
     this.gvGameView.BorderStyle = BorderStyles.NoBorder;
     this.gvGameView.Columns.AddRange(new GridColumn[] { this.colHasPassword, this.colDescription, this.colHostName, this.colPlayerCount, this.colPlayerLevels });
     this.gvGameView.GridControl = this.gpgGameGrid;
     this.gvGameView.GroupPanelText = "<LOC>Drag a column header here to group by that column.";
     this.gvGameView.Name = "gvGameView";
     this.gvGameView.OptionsBehavior.AutoPopulateColumns = false;
     this.gvGameView.OptionsCustomization.AllowRowSizing = true;
     this.gvGameView.OptionsDetail.AllowZoomDetail = false;
     this.gvGameView.OptionsDetail.EnableMasterViewMode = false;
     this.gvGameView.OptionsDetail.ShowDetailTabs = false;
     this.gvGameView.OptionsDetail.SmartDetailExpand = false;
     this.gvGameView.OptionsMenu.EnableColumnMenu = false;
     this.gvGameView.OptionsMenu.EnableFooterMenu = false;
     this.gvGameView.OptionsMenu.EnableGroupPanelMenu = false;
     this.gvGameView.OptionsSelection.EnableAppearanceFocusedCell = false;
     this.gvGameView.OptionsSelection.MultiSelect = true;
     this.gvGameView.OptionsView.RowAutoHeight = true;
     this.gvGameView.RowHeight = 50;
     this.gvGameView.SelectionChanged += new SelectionChangedEventHandler(this.gvGameView_SelectionChanged);
     this.colHasPassword.ColumnEdit = this.riHasPassword;
     this.colHasPassword.FieldName = "HasPassword";
     this.colHasPassword.MinWidth = 0x19;
     this.colHasPassword.Name = "colHasPassword";
     this.colHasPassword.OptionsColumn.AllowSize = false;
     this.colHasPassword.OptionsColumn.FixedWidth = true;
     this.colHasPassword.OptionsColumn.ReadOnly = true;
     this.colHasPassword.OptionsColumn.ShowCaption = false;
     this.colHasPassword.Visible = true;
     this.colHasPassword.VisibleIndex = 0;
     this.colHasPassword.Width = 0x19;
     this.riHasPassword.AutoHeight = false;
     this.riHasPassword.CheckStyle = CheckStyles.UserDefined;
     this.riHasPassword.Name = "riHasPassword";
     this.riHasPassword.PictureChecked = (Image) manager.GetObject("riHasPassword.PictureChecked");
     this.riHasPassword.PictureGrayed = (Image) manager.GetObject("riHasPassword.PictureGrayed");
     this.riHasPassword.PictureUnchecked = (Image) manager.GetObject("riHasPassword.PictureUnchecked");
     this.colDescription.Caption = "<LOC>Game Name";
     this.colDescription.FieldName = "Description";
     this.colDescription.Name = "colDescription";
     this.colDescription.OptionsColumn.AllowEdit = false;
     this.colDescription.Visible = true;
     this.colDescription.VisibleIndex = 1;
     this.colDescription.Width = 0x9a;
     this.colHostName.Caption = "<LOC>Host Name";
     this.colHostName.FieldName = "HostName";
     this.colHostName.Name = "colHostName";
     this.colHostName.OptionsColumn.AllowEdit = false;
     this.colHostName.Visible = true;
     this.colHostName.VisibleIndex = 2;
     this.colHostName.Width = 0x68;
     this.colPlayerCount.Caption = "<LOC>Player Count";
     this.colPlayerCount.FieldName = "PlayerCount";
     this.colPlayerCount.Name = "colPlayerCount";
     this.colPlayerCount.OptionsColumn.AllowEdit = false;
     this.colPlayerCount.Visible = true;
     this.colPlayerCount.VisibleIndex = 3;
     this.colPlayerCount.Width = 0x68;
     this.colPlayerLevels.Caption = "<LOC>Avg. Player Level";
     this.colPlayerLevels.FieldName = "PlayerLevels";
     this.colPlayerLevels.Name = "colPlayerLevels";
     this.colPlayerLevels.Visible = true;
     this.colPlayerLevels.VisibleIndex = 4;
     this.rimPictureEdit3.Name = "rimPictureEdit3";
     this.rimPictureEdit3.PictureAlignment = ContentAlignment.TopCenter;
     this.rimTextEdit.AutoHeight = false;
     this.rimTextEdit.Name = "rimTextEdit";
     this.rimMemoEdit3.MaxLength = 500;
     this.rimMemoEdit3.Name = "rimMemoEdit3";
     this.repositoryItemPictureEdit1.CustomHeight = 0x18;
     this.repositoryItemPictureEdit1.Name = "repositoryItemPictureEdit1";
     this.repositoryItemPictureEdit1.ReadOnly = true;
     this.repositoryItemPictureEdit1.SizeMode = PictureSizeMode.Zoom;
     base.AcceptButton = this.skinButtonJoin;
     base.AutoScaleDimensions = new SizeF(7f, 13f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.CancelButton = this.skinButtonCancel;
     base.ClientSize = new Size(0x29f, 0x204);
     base.Controls.Add(this.skinButtonJoin);
     base.Controls.Add(this.skinButtonCancel);
     base.Controls.Add(this.skinButtonRefresh);
     base.Controls.Add(this.gpgGameGrid);
     this.Font = new Font("Verdana", 8f);
     base.Location = new Point(0, 0);
     base.Name = "DlgJoinGame";
     base.ttDefault.SetSuperTip(this, null);
     this.Text = "<LOC>Available Games";
     base.Controls.SetChildIndex(this.gpgGameGrid, 0);
     base.Controls.SetChildIndex(this.skinButtonRefresh, 0);
     base.Controls.SetChildIndex(this.skinButtonCancel, 0);
     base.Controls.SetChildIndex(this.skinButtonJoin, 0);
     ((ISupportInitialize) base.pbBottom).EndInit();
     this.gpgGameGrid.EndInit();
     this.gvGameView.EndInit();
     this.riHasPassword.EndInit();
     this.rimPictureEdit3.EndInit();
     this.rimTextEdit.EndInit();
     this.rimMemoEdit3.EndInit();
     this.repositoryItemPictureEdit1.EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
예제 #51
0
        protected virtual void Attach(RepositoryItemGridLookUpEdit rep)
        {
            if (rep == null) return;
            selection.Clear();
            _currentRepository = rep;

            edit = _currentRepository.View.GridControl.RepositoryItems.Add("CheckEdit") as RepositoryItemCheckEdit;

            GridColumn column = _currentRepository.View.Columns.Add();
            column.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            column.Visible = true;
            column.VisibleIndex = 0;
            column.FieldName = checkColumnFieldName;
            column.Caption = "Mark";
            column.OptionsColumn.ShowCaption = false;
            column.OptionsColumn.AllowEdit = false;
            column.OptionsColumn.AllowSize = false;
            column.UnboundType = DevExpress.Data.UnboundColumnType.Boolean;
            column.Width = GetCheckBoxWidth();
            column.ColumnEdit = edit;

            _currentRepository.View.Click += new EventHandler(View_Click);
            _currentRepository.View.CustomDrawColumnHeader += new ColumnHeaderCustomDrawEventHandler(View_CustomDrawColumnHeader);
            _currentRepository.View.CustomDrawGroupRow += new RowObjectCustomDrawEventHandler(View_CustomDrawGroupRow);
            _currentRepository.View.CustomUnboundColumnData += new CustomColumnDataEventHandler(view_CustomUnboundColumnData);
            _currentRepository.View.KeyDown += new KeyEventHandler(view_KeyDown);
        }
 private DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit GridColumnsCheckEdit(GridColumn InputCoulumn, string FieldName,object ValueChecked,object ValueUnchecked)
 {
     RepositoryItemCheckEdit rep = new RepositoryItemCheckEdit();
     rep.ValueChecked = ValueChecked;
     rep.ValueUnchecked = ValueUnchecked;
     rep.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
     InputCoulumn.ColumnEdit = rep;
     return rep;
 }