Пример #1
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();
        }
Пример #2
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);
        }
Пример #3
0
        protected override RepositoryItem OnCreateRepositoryItem(Type objectType)
        {
            var edit = new RepositoryItemColorEdit();

            WinFormPublic.AddClearButton(edit);
            return(edit);
        }
Пример #4
0
        public RepositoryItemColorEdit CreateRepositoryColorEdit()
        {
            RepositoryItemColorEdit ri = new RepositoryItemColorEdit();

            ri.StoreColorAsInteger = true;
            ri.AutoHeight          = false;
            return(ri);
        }
Пример #5
0
 public void AddColorEdit(string string_2, object object_0, bool bool_0)
 {
     this.repositoryItemColorEdit_0 = new RepositoryItemColorEdit();
     this.gridEditorCollection_0.Add(this.repositoryItemColorEdit_0, string_2, object_0);
     this.repositoryItemColorEdit_0.AutoHeight  = false;
     this.repositoryItemColorEdit_0.BorderStyle = BorderStyles.NoBorder;
     this.repositoryItemColorEdit_0.Name        = "repositoryItemColorEdit";
     this.repositoryItemColorEdit_0.ReadOnly    = bool_0;
 }
Пример #6
0
        /// <summary>
        /// 创建GridView的列编辑为ColorEdit
        /// </summary>
        /// <param name="gridColumn">GridColumn列对象</param>
        /// <returns></returns>
        public static RepositoryItemColorEdit CreateColorEdit(this GridColumn gridColumn)
        {
            RepositoryItemColorEdit repositoryItem = new RepositoryItemColorEdit
            {
                AutoHeight = false
            };

            gridColumn.View.GridControl.RepositoryItems.Add(repositoryItem);
            gridColumn.ColumnEdit = repositoryItem;
            return(repositoryItem);
        }
Пример #7
0
        public static RepositoryItemColorEdit CreateTreeColorEdit(this TreeListColumn treeColumn)
        {
            RepositoryItemColorEdit repositoryItem = new RepositoryItemColorEdit
            {
                AutoHeight = false
            };

            treeColumn.TreeList.RepositoryItems.Add(repositoryItem);
            treeColumn.ColumnEdit = repositoryItem;
            return(repositoryItem);
        }
Пример #8
0
 public CurveTemplateView()
 {
     InitializeComponent();
     _gridViewBinder          = new GridViewBinder <CurveTemplateDTO>(mainView);
     _lineStyleRepository     = new UxRepositoryItemLineStyles(mainView);
     _lineThicknessRepository = new UxRepositoryItemComboBox(mainView);
     _symbolRepository        = new UxRepositoryItemSymbols(mainView);
     _colorRepository         = new UxRepositoryItemColorPickEditWithHistory(mainView);
     _buttonRepository        = new UxRepositoryItemButtonEdit(ButtonPredefines.Delete);
     _quantityTypeRepository  = new UxRepositoryItemCheckedComboBoxEdit(mainView, typeof(QuantityType));
     _deleteButton            = _buttonRepository.Buttons[0];
     mainView.AllowsFiltering = false;
 }
Пример #9
0
 public PWColorCellsControl(PopupBaseForm shadowForm, int columnCount, int rowCount)
 {
     if (columnCount * rowCount > 64)
     {
         throw new Exception("Incorrect cells count.");
     }
     SetStyle(ControlStyles.UserMouse, false);
     this.shadowForm = shadowForm;
     viewInfo        = new PWColorCellsControlViewInfo(this, columnCount, rowCount);
     painter         = new PWColorCellsControlPainter(columnCount * rowCount);
     properties      = null;
     lockFocus       = false;
     SetStyle(ControlStyles.AllPaintingInWmPaint | ControlConstants.DoubleBuffer, true);
 }
Пример #10
0
        private void InitialData()
        {
            try
            {
                DataSet dataSet = spcEntity.GetAbnormalRule();

                if (spcEntity.ErrorMsg.Length > 0)
                {
                    MessageService.ShowError("get spc AbnormalRule error:" + spcEntity.ErrorMsg);
                }
                else
                {
                    DataTable dtMain = dataSet.Tables[EDC_ABNORMAL_FIELDS.DATABASE_TABLE_NAME];
                    dtMain.Columns.Add("isSelected", typeof(bool));

                    gridView1.Columns[EDC_ABNORMAL_FIELDS.FIELD_ABNORMALCOLOR].Visible = false;

                    if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables.Contains(EDC_ABNORMAL_FIELDS.DATABASE_TABLE_NAME))
                    {
                        this.gcMainAbnormal.DataSource = null;
                        this.gcMainAbnormal.DataSource = dataSet.Relations[0].ParentTable;

                        for (int i = 0; i < gridView1.DataRowCount; i++)
                        {
                            string _code = gridView1.GetRowCellValue(i, EDC_ABNORMAL_FIELDS.FIELD_ARULECODE).ToString();
                            if (lst.Contains(_code))
                            {
                                gridView1.SetRowCellValue(i, "isSelected", true);
                            }
                        }

                        if (!isAddColorField)
                        {
                            GridColumn unboundColumn = gridView1.Columns.AddField("Color");
                            unboundColumn.VisibleIndex = gridView1.Columns.Count;
                            unboundColumn.UnboundType  = DevExpress.Data.UnboundColumnType.Object;
                            RepositoryItemColorEdit ce = new RepositoryItemColorEdit();
                            ce.ShowCustomColors      = false;
                            unboundColumn.ColumnEdit = ce;
                            isAddColorField          = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageService.ShowMessage(ex.Message);
            }
        }
        public Form1()
        {
            InitializeComponent();
            vGridControl1.DataSource = CreateTable(6);
            RepositoryItemCheckEdit riCheckEdit = new RepositoryItemCheckEdit();

            new RowInplaceEditorHelper(vGridControl1.GetRowByFieldName("Check"), riCheckEdit);
            riCheckEdit.AllowFocused      = false;
            riCheckEdit.EditValueChanged += riCheckEdit_EditValueChanged;
            RepositoryItemColorEdit riColorEdit = new RepositoryItemColorEdit();

            new RowInplaceEditorHelper(vGridControl1.GetRowByFieldName("Name"), riColorEdit);
            riColorEdit.ColorAlignment    = HorzAlignment.Center;
            riColorEdit.EditValueChanged += riColorEdit_EditValueChanged;
        }
Пример #12
0
        private void Form1_Load(object sender, EventArgs e)
        {
            DataTable dt = FillDataTable();

            gridControl1.DataSource = dt;
            gridControl2.DataSource = dt;
            gridView1.Columns["ColorString"].Visible = false;

            GridColumn unboundColumn = gridView1.Columns.AddField("Color");

            unboundColumn.VisibleIndex = gridView1.Columns.Count;
            unboundColumn.UnboundType  = DevExpress.Data.UnboundColumnType.Object;
            RepositoryItemColorEdit ce = new RepositoryItemColorEdit();

            ce.ShowCustomColors      = false;
            unboundColumn.ColumnEdit = ce;
        }
Пример #13
0
        private void InitialData(DataSet dataSet)
        {
            try
            {
                this.CtrlState = ControlState.ReadOnly;

                if (spcEntity.ErrorMsg.Length > 0)
                {
                    MessageService.ShowError("get spc AbnormalRule error:" + spcEntity.ErrorMsg);
                }
                else
                {
                    gridView1.Columns[EDC_ABNORMAL_FIELDS.FIELD_ABNORMALCOLOR].Visible = false;

                    if (dataSet != null && dataSet.Tables.Count > 0 && dataSet.Tables.Contains(EDC_ABNORMAL_FIELDS.DATABASE_TABLE_NAME))
                    {
                        this.gcMainAbnormal.DataSource = null;
                        this.gcMainAbnormal.DataSource = dataSet.Relations[0].ParentTable;

                        if (!isAddColorField)
                        {
                            GridColumn unboundColumn = gridView1.Columns.AddField("Color");
                            unboundColumn.VisibleIndex = gridView1.Columns.Count;
                            unboundColumn.UnboundType  = DevExpress.Data.UnboundColumnType.Object;
                            RepositoryItemColorEdit ce = new RepositoryItemColorEdit();
                            ce.ShowCustomColors      = false;
                            unboundColumn.ColumnEdit = ce;
                            isAddColorField          = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageService.ShowMessage(ex.Message);
            }
        }
Пример #14
0
 private void InitializeComponent()
 {
     this.splitContainerMain = new SplitContainer();
     this.OptionsTree = new GPGTreeView();
     this.splitContainerGridAndLabel = new SplitContainer();
     this.pgcProps = new PropertyGridControl();
     this.riComboBox = new RepositoryItemComboBox();
     this.repositoryItemColorEdit1 = new RepositoryItemColorEdit();
     this.repositoryItemTextEdit1 = new RepositoryItemTextEdit();
     this.repositoryItemLookUpEdit1 = new RepositoryItemLookUpEdit();
     this.repositoryItemComboBox1 = new RepositoryItemComboBox();
     this.repositoryItemTextEdit2 = new RepositoryItemTextEdit();
     this.editor_Color = new RepositoryItemColorEdit();
     this.repositoryItemTextEdit3 = new RepositoryItemTextEdit();
     this.gpgLabelDescription = new GPGLabel();
     this.splitContainerMain.Panel1.SuspendLayout();
     this.splitContainerMain.Panel2.SuspendLayout();
     this.splitContainerMain.SuspendLayout();
     this.splitContainerGridAndLabel.Panel1.SuspendLayout();
     this.splitContainerGridAndLabel.Panel2.SuspendLayout();
     this.splitContainerGridAndLabel.SuspendLayout();
     this.pgcProps.BeginInit();
     this.riComboBox.BeginInit();
     this.repositoryItemColorEdit1.BeginInit();
     this.repositoryItemTextEdit1.BeginInit();
     this.repositoryItemLookUpEdit1.BeginInit();
     this.repositoryItemComboBox1.BeginInit();
     this.repositoryItemTextEdit2.BeginInit();
     this.editor_Color.BeginInit();
     this.repositoryItemTextEdit3.BeginInit();
     base.SuspendLayout();
     this.splitContainerMain.BackColor = Color.FromArgb(0xcc, 0xcc, 0xff);
     this.splitContainerMain.Dock = DockStyle.Fill;
     this.splitContainerMain.Location = new Point(2, 2);
     this.splitContainerMain.Margin = new Padding(0);
     this.splitContainerMain.Name = "splitContainerMain";
     this.splitContainerMain.Panel1.Controls.Add(this.OptionsTree);
     this.splitContainerMain.Panel2.Controls.Add(this.splitContainerGridAndLabel);
     this.splitContainerMain.Size = new Size(0x1cf, 0x12f);
     this.splitContainerMain.SplitterDistance = 0x99;
     this.splitContainerMain.TabIndex = 1;
     this.OptionsTree.BackColor = Color.Black;
     this.OptionsTree.BorderStyle = BorderStyle.None;
     this.OptionsTree.Dock = DockStyle.Fill;
     this.OptionsTree.ForeColor = Color.White;
     this.OptionsTree.HideSelection = false;
     this.OptionsTree.Location = new Point(0, 0);
     this.OptionsTree.Margin = new Padding(0);
     this.OptionsTree.Name = "OptionsTree";
     this.OptionsTree.Size = new Size(0x99, 0x12f);
     this.OptionsTree.TabIndex = 0;
     this.splitContainerGridAndLabel.Dock = DockStyle.Fill;
     this.splitContainerGridAndLabel.Location = new Point(0, 0);
     this.splitContainerGridAndLabel.Name = "splitContainerGridAndLabel";
     this.splitContainerGridAndLabel.Orientation = Orientation.Horizontal;
     this.splitContainerGridAndLabel.Panel1.BackColor = Color.LightSteelBlue;
     this.splitContainerGridAndLabel.Panel1.Controls.Add(this.pgcProps);
     this.splitContainerGridAndLabel.Panel2.Controls.Add(this.gpgLabelDescription);
     this.splitContainerGridAndLabel.Size = new Size(0x132, 0x12f);
     this.splitContainerGridAndLabel.SplitterDistance = 0xe7;
     this.splitContainerGridAndLabel.SplitterWidth = 2;
     this.splitContainerGridAndLabel.TabIndex = 0;
     this.pgcProps.Appearance.Empty.BackColor = Color.LightSteelBlue;
     this.pgcProps.Appearance.Empty.Options.UseBackColor = true;
     this.pgcProps.AutoGenerateRows = true;
     this.pgcProps.BorderStyle = BorderStyles.NoBorder;
     this.pgcProps.DefaultEditors.AddRange(new DevExpress.XtraVerticalGrid.Rows.DefaultEditor[] { new DevExpress.XtraVerticalGrid.Rows.DefaultEditor(null, this.riComboBox), new DevExpress.XtraVerticalGrid.Rows.DefaultEditor(typeof(Color), this.repositoryItemColorEdit1) });
     this.pgcProps.Dock = DockStyle.Fill;
     this.pgcProps.Location = new Point(0, 0);
     this.pgcProps.LookAndFeel.SkinName = "Money Twins";
     this.pgcProps.LookAndFeel.UseDefaultLookAndFeel = false;
     this.pgcProps.Margin = new Padding(0);
     this.pgcProps.Name = "pgcProps";
     this.pgcProps.OptionsBehavior.UseEnterAsTab = true;
     this.pgcProps.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemTextEdit1, this.repositoryItemLookUpEdit1, this.repositoryItemComboBox1, this.riComboBox, this.repositoryItemTextEdit2, this.editor_Color, this.repositoryItemColorEdit1, this.repositoryItemTextEdit3 });
     this.pgcProps.Size = new Size(0x132, 0xe7);
     this.pgcProps.TabIndex = 4;
     this.pgcProps.RowChanging += new RowChangingEventHandler(this.pgcProps_RowChanging);
     this.riComboBox.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
     this.riComboBox.Items.AddRange(new object[] { "None", "True", "False" });
     this.riComboBox.Name = "riComboBox";
     this.repositoryItemColorEdit1.AutoHeight = false;
     this.repositoryItemColorEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
     this.repositoryItemColorEdit1.Name = "repositoryItemColorEdit1";
     this.repositoryItemTextEdit1.AutoHeight = false;
     this.repositoryItemTextEdit1.Name = "repositoryItemTextEdit1";
     this.repositoryItemLookUpEdit1.AutoHeight = false;
     this.repositoryItemLookUpEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
     this.repositoryItemLookUpEdit1.Name = "repositoryItemLookUpEdit1";
     this.repositoryItemComboBox1.AutoHeight = false;
     this.repositoryItemComboBox1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
     this.repositoryItemComboBox1.Name = "repositoryItemComboBox1";
     this.repositoryItemTextEdit2.Appearance.Options.UseTextOptions = true;
     this.repositoryItemTextEdit2.Appearance.TextOptions.HAlignment = HorzAlignment.Near;
     this.repositoryItemTextEdit2.AppearanceDisabled.Options.UseTextOptions = true;
     this.repositoryItemTextEdit2.AppearanceDisabled.TextOptions.HAlignment = HorzAlignment.Near;
     this.repositoryItemTextEdit2.AppearanceFocused.Options.UseTextOptions = true;
     this.repositoryItemTextEdit2.AppearanceFocused.TextOptions.HAlignment = HorzAlignment.Near;
     this.repositoryItemTextEdit2.AutoHeight = false;
     this.repositoryItemTextEdit2.DisplayFormat.FormatType = FormatType.Numeric;
     this.repositoryItemTextEdit2.EditFormat.FormatType = FormatType.Numeric;
     this.repositoryItemTextEdit2.HideSelection = false;
     this.repositoryItemTextEdit2.Name = "repositoryItemTextEdit2";
     this.editor_Color.AutoHeight = false;
     this.editor_Color.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
     this.editor_Color.Name = "editor_Color";
     this.repositoryItemTextEdit3.AutoHeight = false;
     this.repositoryItemTextEdit3.Name = "repositoryItemTextEdit3";
     this.gpgLabelDescription.AutoStyle = false;
     this.gpgLabelDescription.BackColor = Color.LightSteelBlue;
     this.gpgLabelDescription.Dock = DockStyle.Fill;
     this.gpgLabelDescription.Font = new Font("Verdana", 8f, FontStyle.Bold, GraphicsUnit.Point, 0);
     this.gpgLabelDescription.ForeColor = Color.Black;
     this.gpgLabelDescription.IgnoreMouseWheel = false;
     this.gpgLabelDescription.IsStyled = false;
     this.gpgLabelDescription.Location = new Point(0, 0);
     this.gpgLabelDescription.Name = "gpgLabelDescription";
     this.gpgLabelDescription.Size = new Size(0x132, 70);
     this.gpgLabelDescription.TabIndex = 0;
     this.gpgLabelDescription.TextAlign = ContentAlignment.MiddleCenter;
     this.gpgLabelDescription.TextStyle = TextStyles.Default;
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode = AutoScaleMode.Font;
     this.BackColor = Color.Black;
     base.Controls.Add(this.splitContainerMain);
     base.Margin = new Padding(0);
     base.Name = "GPGOptionsEditor";
     base.Padding = new Padding(2);
     base.Size = new Size(0x1d3, 0x133);
     this.splitContainerMain.Panel1.ResumeLayout(false);
     this.splitContainerMain.Panel2.ResumeLayout(false);
     this.splitContainerMain.ResumeLayout(false);
     this.splitContainerGridAndLabel.Panel1.ResumeLayout(false);
     this.splitContainerGridAndLabel.Panel2.ResumeLayout(false);
     this.splitContainerGridAndLabel.ResumeLayout(false);
     this.pgcProps.EndInit();
     this.riComboBox.EndInit();
     this.repositoryItemColorEdit1.EndInit();
     this.repositoryItemTextEdit1.EndInit();
     this.repositoryItemLookUpEdit1.EndInit();
     this.repositoryItemComboBox1.EndInit();
     this.repositoryItemTextEdit2.EndInit();
     this.editor_Color.EndInit();
     this.repositoryItemTextEdit3.EndInit();
     base.ResumeLayout(false);
 }
Пример #15
0
        private void InitializeComponent()
        {
            this.components = (IContainer) new Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(ColorForm));

            this.panel1              = new Panel();
            this.button3             = new Button();
            this.button2             = new Button();
            this.button1             = new Button();
            this.gridControl6        = new GridControl();
            this.contextMenuStrip1   = new ContextMenuStrip(this.components);
            this.toolStripMenuItem1  = new ToolStripMenuItem();
            this.toolStripMenuItem2  = new ToolStripMenuItem();
            this.toolStripSeparator2 = new ToolStripSeparator();
            this.toolStripMenuItem7  = new ToolStripMenuItem();
            this.ds         = new ds();
            this.gridView6  = new GridView();
            this.colname    = new GridColumn();
            this.colcomment = new GridColumn();
            this.colcolor1  = new GridColumn();
            this.repositoryItemColorEdit1 = new RepositoryItemColorEdit();
            this.colcolorgroup            = new GridColumn();
            this.colwindraw               = new GridColumn();
            this.colshortname             = new GridColumn();
            this.colidcolorgroup          = new GridColumn();
            this.colnumpos                = new GridColumn();
            this.treeList1                = new TreeList();
            this.treeListColumn1          = new TreeListColumn();
            this.treeListColumn2          = new TreeListColumn();
            this.repositoryItemCheckEdit1 = new RepositoryItemCheckEdit();
            this.treeListColumn3          = new TreeListColumn();
            this.contextMenuStrip2        = new ContextMenuStrip(this.components);
            this.toolStripMenuItem3       = new ToolStripMenuItem();
            this.toolStripMenuItem4       = new ToolStripMenuItem();
            this.toolStripMenuItem5       = new ToolStripMenuItem();
            this.toolStripSeparator1      = new ToolStripSeparator();
            this.toolStripMenuItem6       = new ToolStripMenuItem();
            this.imageList1               = new ImageList(this.components);
            this.splitterControl1         = new SplitterControl();
            this.panel1.SuspendLayout();
            this.gridControl6.BeginInit();
            this.contextMenuStrip1.SuspendLayout();
            this.ds.BeginInit();
            this.gridView6.BeginInit();
            this.repositoryItemColorEdit1.BeginInit();
            this.treeList1.BeginInit();
            this.repositoryItemCheckEdit1.BeginInit();
            this.contextMenuStrip2.SuspendLayout();
            this.SuspendLayout();
            this.panel1.Controls.Add((Control)this.button3);
            this.panel1.Controls.Add((Control)this.button2);
            this.panel1.Controls.Add((Control)this.button1);
            this.panel1.Dock                                    = DockStyle.Bottom;
            this.panel1.Location                                = new Point(0, 443);
            this.panel1.Name                                    = "panel1";
            this.panel1.Size                                    = new Size(796, 33);
            this.panel1.TabIndex                                = 3;
            this.button3.Anchor                                 = AnchorStyles.Top | AnchorStyles.Right;
            this.button3.FlatStyle                              = FlatStyle.Flat;
            this.button3.Location                               = new Point(709, 5);
            this.button3.Name                                   = "button3";
            this.button3.Size                                   = new Size(75, 23);
            this.button3.TabIndex                               = 2;
            this.button3.Text                                   = "Закрыть";
            this.button3.Click                                 += new EventHandler(this.button3_Click);
            this.button2.Anchor                                 = AnchorStyles.Top | AnchorStyles.Right;
            this.button2.FlatStyle                              = FlatStyle.Flat;
            this.button2.Location                               = new Point(628, 5);
            this.button2.Name                                   = "button2";
            this.button2.Size                                   = new Size(75, 23);
            this.button2.TabIndex                               = 1;
            this.button2.Text                                   = "Отменить";
            this.button2.Click                                 += new EventHandler(this.button2_Click);
            this.button1.Anchor                                 = AnchorStyles.Top | AnchorStyles.Right;
            this.button1.FlatStyle                              = FlatStyle.Flat;
            this.button1.Location                               = new Point(547, 5);
            this.button1.Name                                   = "button1";
            this.button1.Size                                   = new Size(75, 23);
            this.button1.TabIndex                               = 0;
            this.button1.Text                                   = "Применить";
            this.button1.Click                                 += new EventHandler(this.button1_Click);
            this.gridControl6.ContextMenuStrip                  = this.contextMenuStrip1;
            this.gridControl6.DataMember                        = "color";
            this.gridControl6.DataSource                        = (object)this.ds;
            this.gridControl6.Dock                              = DockStyle.Fill;
            this.gridControl6.EmbeddedNavigator.Name            = "";
            this.gridControl6.Location                          = new Point(306, 0);
            this.gridControl6.LookAndFeel.Style                 = LookAndFeelStyle.Flat;
            this.gridControl6.LookAndFeel.UseDefaultLookAndFeel = false;
            this.gridControl6.MainView                          = (BaseView)this.gridView6;
            this.gridControl6.Name                              = "gridControl6";
            this.gridControl6.RepositoryItems.AddRange(new RepositoryItem[1]
            {
                (RepositoryItem)this.repositoryItemColorEdit1
            });
            this.gridControl6.Size     = new Size(490, 443);
            this.gridControl6.TabIndex = 10;
            this.gridControl6.ViewCollection.AddRange(new BaseView[1]
            {
                (BaseView)this.gridView6
            });
            this.contextMenuStrip1.Items.AddRange(new ToolStripItem[4]
            {
                (ToolStripItem)this.toolStripMenuItem1,
                (ToolStripItem)this.toolStripMenuItem2,
                (ToolStripItem)this.toolStripSeparator2,
                (ToolStripItem)this.toolStripMenuItem7
            });
            this.contextMenuStrip1.Name     = "contextMenuStrip1";
            this.contextMenuStrip1.Size     = new Size(200, 76);
            this.toolStripMenuItem1.Name    = "toolStripMenuItem1";
            this.toolStripMenuItem1.Size    = new Size(199, 22);
            this.toolStripMenuItem1.Text    = "Добавить цвет";
            this.toolStripMenuItem1.Click  += new EventHandler(this.toolStripMenuItem1_Click);
            this.toolStripMenuItem2.Name    = "toolStripMenuItem2";
            this.toolStripMenuItem2.Size    = new Size(199, 22);
            this.toolStripMenuItem2.Text    = "Удалить цвет";
            this.toolStripMenuItem2.Click  += new EventHandler(this.toolStripMenuItem2_Click);
            this.toolStripSeparator2.Name   = "toolStripSeparator2";
            this.toolStripSeparator2.Size   = new Size(196, 6);
            this.toolStripMenuItem7.Name    = "toolStripMenuItem7";
            this.toolStripMenuItem7.Size    = new Size(199, 22);
            this.toolStripMenuItem7.Text    = "Переместить в группу...";
            this.toolStripMenuItem7.Click  += new EventHandler(this.toolStripMenuItem7_Click);
            this.ds.DataSetName             = "ds";
            this.ds.EnforceConstraints      = false;
            this.ds.SchemaSerializationMode = SchemaSerializationMode.IncludeSchema;
            this.gridView6.Appearance.FocusedRow.BackColor                    = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridView6.Appearance.FocusedRow.BackColor2                   = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridView6.Appearance.FocusedRow.BorderColor                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridView6.Appearance.FocusedRow.ForeColor                    = Color.Black;
            this.gridView6.Appearance.FocusedRow.Options.UseBackColor         = true;
            this.gridView6.Appearance.FocusedRow.Options.UseBorderColor       = true;
            this.gridView6.Appearance.FocusedRow.Options.UseForeColor         = true;
            this.gridView6.Appearance.GroupPanel.BackColor                    = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridView6.Appearance.GroupPanel.BackColor2                   = Color.FromArgb(192, 192, (int)byte.MaxValue);
            this.gridView6.Appearance.GroupPanel.Options.UseBackColor         = true;
            this.gridView6.Appearance.HideSelectionRow.BackColor              = Color.FromArgb(192, 192, (int)byte.MaxValue);
            this.gridView6.Appearance.HideSelectionRow.BackColor2             = Color.FromArgb(192, 192, (int)byte.MaxValue);
            this.gridView6.Appearance.HideSelectionRow.BorderColor            = Color.FromArgb(192, 192, (int)byte.MaxValue);
            this.gridView6.Appearance.HideSelectionRow.ForeColor              = Color.Black;
            this.gridView6.Appearance.HideSelectionRow.Options.UseBackColor   = true;
            this.gridView6.Appearance.HideSelectionRow.Options.UseBorderColor = true;
            this.gridView6.Appearance.HideSelectionRow.Options.UseForeColor   = true;
            this.gridView6.Appearance.SelectedRow.BackColor                   = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridView6.Appearance.SelectedRow.BackColor2                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridView6.Appearance.SelectedRow.BorderColor                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridView6.Appearance.SelectedRow.ForeColor                   = Color.Black;
            this.gridView6.Appearance.SelectedRow.Options.UseBackColor        = true;
            this.gridView6.Appearance.SelectedRow.Options.UseBorderColor      = true;
            this.gridView6.Appearance.SelectedRow.Options.UseForeColor        = true;
            this.gridView6.BorderStyle = BorderStyles.Simple;
            this.gridView6.Columns.AddRange(new GridColumn[8]
            {
                this.colname,
                this.colcomment,
                this.colcolor1,
                this.colcolorgroup,
                this.colwindraw,
                this.colshortname,
                this.colidcolorgroup,
                this.colnumpos
            });
            this.gridView6.GridControl    = this.gridControl6;
            this.gridView6.GroupPanelText = "Панель группировки";
            this.gridView6.Name           = "gridView6";
            this.gridView6.OptionsCustomization.AllowFilter = false;
            this.gridView6.OptionsDetail.ShowDetailTabs     = false;
            this.gridView6.OptionsSelection.MultiSelect     = true;
            this.gridView6.OptionsView.ShowAutoFilterRow    = true;
            this.gridView6.OptionsView.ShowFilterPanelMode  = ShowFilterPanelMode.Never;
            this.gridView6.OptionsView.ShowIndicator        = false;
            this.colname.Caption                     = "Наименование";
            this.colname.FieldName                   = "name";
            this.colname.Name                        = "colname";
            this.colname.Visible                     = true;
            this.colname.VisibleIndex                = 1;
            this.colname.Width                       = 90;
            this.colcomment.Caption                  = "Комментарий";
            this.colcomment.FieldName                = "comment";
            this.colcomment.Name                     = "colcomment";
            this.colcomment.Visible                  = true;
            this.colcomment.VisibleIndex             = 3;
            this.colcomment.Width                    = 153;
            this.colcolor1.Caption                   = "Цвет";
            this.colcolor1.ColumnEdit                = (RepositoryItem)this.repositoryItemColorEdit1;
            this.colcolor1.FieldName                 = "color";
            this.colcolor1.Name                      = "colcolor1";
            this.colcolor1.Visible                   = true;
            this.colcolor1.VisibleIndex              = 4;
            this.colcolor1.Width                     = 49;
            this.repositoryItemColorEdit1.AutoHeight = false;
            this.repositoryItemColorEdit1.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton(ButtonPredefines.Combo)
            });
            this.repositoryItemColorEdit1.Name = "repositoryItemColorEdit1";
            this.repositoryItemColorEdit1.StoreColorAsInteger = true;
            this.colcolorgroup.Caption      = "Группа";
            this.colcolorgroup.FieldName    = "colorgroup";
            this.colcolorgroup.Name         = "colcolorgroup";
            this.colcolorgroup.Visible      = true;
            this.colcolorgroup.VisibleIndex = 0;
            this.colcolorgroup.Width        = 46;
            this.colwindraw.Caption         = "Конструкции";
            this.colwindraw.FieldName       = "windraw";
            this.colwindraw.Name            = "colwindraw";
            this.colwindraw.Visible         = true;
            this.colwindraw.VisibleIndex    = 5;
            this.colwindraw.Width           = 49;
            this.colshortname.Caption       = "Сокращенное наименование";
            this.colshortname.FieldName     = "shortname";
            this.colshortname.Name          = "colshortname";
            this.colshortname.Visible       = true;
            this.colshortname.VisibleIndex  = 2;
            this.colshortname.Width         = 103;
            this.colidcolorgroup.Caption    = "idcolorgroup";
            this.colidcolorgroup.FieldName  = "idcolorgroup";
            this.colidcolorgroup.Name       = "colidcolorgroup";
            this.colnumpos.Caption          = "№пп";
            this.colnumpos.FieldName        = "numpos";
            this.colnumpos.Name             = "colnumpos";
            this.colnumpos.Visible          = true;
            this.colnumpos.VisibleIndex     = 6;
            this.treeList1.Appearance.FocusedCell.BackColor                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.treeList1.Appearance.FocusedCell.ForeColor                 = Color.Black;
            this.treeList1.Appearance.FocusedCell.Options.UseBackColor      = true;
            this.treeList1.Appearance.FocusedCell.Options.UseForeColor      = true;
            this.treeList1.Appearance.FocusedRow.BackColor                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.treeList1.Appearance.FocusedRow.ForeColor                  = Color.Black;
            this.treeList1.Appearance.FocusedRow.Options.UseBackColor       = true;
            this.treeList1.Appearance.FocusedRow.Options.UseForeColor       = true;
            this.treeList1.Appearance.HideSelectionRow.BackColor            = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.treeList1.Appearance.HideSelectionRow.BackColor2           = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.treeList1.Appearance.HideSelectionRow.ForeColor            = Color.Black;
            this.treeList1.Appearance.HideSelectionRow.Options.UseBackColor = true;
            this.treeList1.Appearance.HideSelectionRow.Options.UseForeColor = true;
            this.treeList1.Appearance.SelectedRow.BackColor                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.treeList1.Appearance.SelectedRow.ForeColor                 = Color.Black;
            this.treeList1.Appearance.SelectedRow.Options.UseBackColor      = true;
            this.treeList1.Appearance.SelectedRow.Options.UseForeColor      = true;
            this.treeList1.BorderStyle = BorderStyles.Simple;
            this.treeList1.Columns.AddRange(new TreeListColumn[3]
            {
                this.treeListColumn1,
                this.treeListColumn2,
                this.treeListColumn3
            });
            this.treeList1.ContextMenuStrip     = this.contextMenuStrip2;
            this.treeList1.DataMember           = "colorgroup";
            this.treeList1.DataSource           = (object)this.ds;
            this.treeList1.Dock                 = DockStyle.Left;
            this.treeList1.HorzScrollVisibility = DevExpress.XtraTreeList.ScrollVisibility.Never;
            this.treeList1.ImageIndexFieldName  = "_image";
            this.treeList1.KeyFieldName         = "idcolorgroup";
            this.treeList1.Location             = new Point(0, 0);
            this.treeList1.LookAndFeel.Style    = LookAndFeelStyle.Flat;
            this.treeList1.LookAndFeel.UseDefaultLookAndFeel = false;
            this.treeList1.Name = "treeList1";
            this.treeList1.OptionsView.ShowHorzLines = false;
            this.treeList1.OptionsView.ShowIndicator = false;
            this.treeList1.OptionsView.ShowVertLines = false;
            this.treeList1.ParentFieldName           = "parentid";
            this.treeList1.RepositoryItems.AddRange(new RepositoryItem[1]
            {
                (RepositoryItem)this.repositoryItemCheckEdit1
            });
            this.treeList1.SelectImageList = (object)this.imageList1;
            this.treeList1.Size            = new Size(300, 443);
            this.treeList1.TabIndex        = 11;
            this.treeListColumn1.Caption   = "Группы цветов";
            this.treeListColumn1.FieldName = "name";
            this.treeListColumn1.MinWidth  = 28;
            this.treeListColumn1.Name      = "treeListColumn1";
            this.treeListColumn1.OptionsColumn.AllowEdit = false;
            this.treeListColumn1.Visible           = true;
            this.treeListColumn1.VisibleIndex      = 0;
            this.treeListColumn1.Width             = 196;
            this.treeListColumn2.Caption           = "Активность";
            this.treeListColumn2.ColumnEdit        = (RepositoryItem)this.repositoryItemCheckEdit1;
            this.treeListColumn2.FieldName         = "isactive";
            this.treeListColumn2.Format.FormatType = FormatType.Numeric;
            this.treeListColumn2.Name                = "treeListColumn2";
            this.treeListColumn2.Visible             = true;
            this.treeListColumn2.VisibleIndex        = 1;
            this.repositoryItemCheckEdit1.AutoHeight = false;
            this.repositoryItemCheckEdit1.Name       = "repositoryItemCheckEdit1";
            this.treeListColumn3.Caption             = "№пп";
            this.treeListColumn3.FieldName           = "numpos";
            this.treeListColumn3.Name                = "treeListColumn3";
            this.treeListColumn3.Visible             = true;
            this.treeListColumn3.VisibleIndex        = 2;
            this.contextMenuStrip2.Items.AddRange(new ToolStripItem[5]
            {
                (ToolStripItem)this.toolStripMenuItem3,
                (ToolStripItem)this.toolStripMenuItem4,
                (ToolStripItem)this.toolStripMenuItem5,
                (ToolStripItem)this.toolStripSeparator1,
                (ToolStripItem)this.toolStripMenuItem6
            });
            this.contextMenuStrip2.Name      = "contextMenuStrip2";
            this.contextMenuStrip2.Size      = new Size(221, 98);
            this.toolStripMenuItem3.Name     = "toolStripMenuItem3";
            this.toolStripMenuItem3.Size     = new Size(220, 22);
            this.toolStripMenuItem3.Text     = "Добавить основную группу";
            this.toolStripMenuItem3.Click   += new EventHandler(this.toolStripMenuItem3_Click);
            this.toolStripMenuItem4.Name     = "toolStripMenuItem4";
            this.toolStripMenuItem4.Size     = new Size(220, 22);
            this.toolStripMenuItem4.Text     = "Добавить дочернюю группу";
            this.toolStripMenuItem4.Click   += new EventHandler(this.toolStripMenuItem4_Click);
            this.toolStripMenuItem5.Name     = "toolStripMenuItem5";
            this.toolStripMenuItem5.Size     = new Size(220, 22);
            this.toolStripMenuItem5.Text     = "Переименовать";
            this.toolStripMenuItem5.Click   += new EventHandler(this.toolStripMenuItem5_Click);
            this.toolStripSeparator1.Name    = "toolStripSeparator1";
            this.toolStripSeparator1.Size    = new Size(217, 6);
            this.toolStripMenuItem6.Name     = "toolStripMenuItem6";
            this.toolStripMenuItem6.Size     = new Size(220, 22);
            this.toolStripMenuItem6.Text     = "Удалить";
            this.toolStripMenuItem6.Click   += new EventHandler(this.toolStripMenuItem6_Click);
            this.imageList1.ImageStream      = (ImageListStreamer)componentResourceManager.GetObject("imageList1.ImageStream");
            this.imageList1.TransparentColor = Color.Magenta;
            this.imageList1.Images.SetKeyName(0, "Folder.ico");
            this.splitterControl1.Location = new Point(300, 0);
            this.splitterControl1.Name     = "splitterControl1";
            this.splitterControl1.Size     = new Size(6, 443);
            this.splitterControl1.TabIndex = 12;
            this.splitterControl1.TabStop  = false;
            this.AutoScaleDimensions       = new SizeF(6f, 13f);
            this.AutoScaleMode             = AutoScaleMode.Font;
            this.Controls.Add((Control)this.gridControl6);
            this.Controls.Add((Control)this.splitterControl1);
            this.Controls.Add((Control)this.treeList1);
            this.Controls.Add((Control)this.panel1);
            this.Name  = "ColorForm";
            this.Size  = new Size(796, 476);
            this.Text  = "Цвета";
            this.Load += new EventHandler(this.ColorForm_Load);
            this.panel1.ResumeLayout(false);
            this.gridControl6.EndInit();
            this.contextMenuStrip1.ResumeLayout(false);
            this.ds.EndInit();
            this.gridView6.EndInit();
            this.repositoryItemColorEdit1.EndInit();
            this.treeList1.EndInit();
            this.repositoryItemCheckEdit1.EndInit();
            this.contextMenuStrip2.ResumeLayout(false);
            this.ResumeLayout(false);
        }
Пример #16
0
        public void ItemListRefreshDefaultValues()
        {
            foreach (DynamicParameterItem pi in _aitems)
            {
                EditorRow erow = pi.Row;

                #region Setting property values and types

                object value = null;
                switch (pi.ValueType)
                {
                case DynamicParameterType.Text:
                    value = Static.ToStr(pi.ValueDefault);
                    break;

                case DynamicParameterType.Decimal:
                    value = Static.ToDecimal(pi.ValueDefault);
                    break;

                case DynamicParameterType.Date:
                    value = Static.ToDate(pi.ValueDefault);
                    if ((DateTime)value == DateTime.MinValue)
                    {
                        value = DBNull.Value;
                    }
                    break;

                case DynamicParameterType.DateTime:
                    value = Static.ToDateTime(pi.ValueDefault);
                    if ((DateTime)value == DateTime.MinValue)
                    {
                        value = DBNull.Value;
                    }
                    break;

                case DynamicParameterType.Folder:
                    value = Static.ToStr(pi.ValueDefault);
                    break;

                case DynamicParameterType.File:
                    value = Static.ToStr(pi.ValueDefault);
                    break;

                case DynamicParameterType.Picture:
                    value = Static.ToStr(pi.ValueDefault);
                    break;

                case DynamicParameterType.Font:
                    value = Static.ToStr(pi.ValueDefault);
                    break;

                case DynamicParameterType.Color:
                    RepositoryItemColorEdit ce = (RepositoryItemColorEdit)erow.Properties.RowEdit;
                    break;

                case DynamicParameterType.List:
                    RepositoryItemLookUpEdit lue = (RepositoryItemLookUpEdit)erow.Properties.RowEdit;

                    object    setvalue = DBNull.Value;
                    DataTable dt       = null;
                    #region Casting DataTable/DataView into DataTable
                    if (lue.DataSource is DataView)
                    {
                        DataView dv = (DataView)lue.DataSource;
                        dt = dv.Table;
                    }
                    else
                    {
                        dt = (DataTable)lue.DataSource;
                    }
                    #endregion
                    if (dt != null && dt.Columns.Count > 0)
                    {
                        #region Get data type of ValueMember column
                        Type totype = typeof(string);
                        if (string.IsNullOrEmpty(lue.ValueMember))
                        {
                            totype = dt.Columns[0].DataType;
                        }
                        else
                        {
                            if (dt.Columns.Contains(lue.ValueMember))
                            {
                                totype = dt.Columns[lue.ValueMember].DataType;
                            }
                        }
                        #endregion
                        #region Converting value into data type
                        setvalue = EServ.Shared.Static.ConvToType(totype, pi.ValueDefault);
                        #endregion
                    }
                    value = setvalue;
                    break;

                default:     // 1 and others is string type
                    value = Static.ToStr(pi.ValueDefault);
                    break;
                }
                #endregion
                if (pi.ValueDefault == null || pi.ValueDefault == DBNull.Value || pi.ValueDefault == "")
                {
                    erow.Properties.Value = null;
                }
                else
                {
                    erow.Properties.Value = value;
                }
            }
        }
Пример #17
0
        public void ItemListRefreshValues()
        {
            foreach (DynamicParameterItem pi in _aitems)
            {
                EditorRow erow = pi.Row;

                #region Setting property values and types

                object value = null;
                switch (pi.ValueType)
                {
                case DynamicParameterType.Text:
                    value = Static.ToStr(pi.Value);
                    break;

                case DynamicParameterType.Decimal:
                    value = Static.ToDecimal(pi.Value);
                    break;

                case DynamicParameterType.Date:
                    value = Static.ToDate(pi.Value);
                    if ((DateTime)value == DateTime.MinValue)
                    {
                        value = DBNull.Value;
                    }
                    break;

                case DynamicParameterType.DateTime:
                    value = Static.ToDateTime(pi.Value);
                    if ((DateTime)value == DateTime.MinValue)
                    {
                        value = DBNull.Value;
                    }
                    break;

                case DynamicParameterType.Folder:
                    value = Static.ToStr(pi.Value);
                    break;

                case DynamicParameterType.File:
                    value = Static.ToStr(pi.Value);
                    break;

                case DynamicParameterType.Picture:
                    value = Static.ToStr(pi.Value);
                    break;

                case DynamicParameterType.Font:
                    value = Static.ToStr(pi.Value);
                    break;

                case DynamicParameterType.Color:
                    RepositoryItemColorEdit ce = (RepositoryItemColorEdit)erow.Properties.RowEdit;

                    //2011.06.21 //2011.06.21 ri.StoreColorAsInteger = true; болгосон тул шаардлагагүй

                    //if (pi.Value is Color) erow.Properties.Value = (Color)pi.Value;
                    //else
                    //{
                    //    string colorstr = Static.ToStr(pi.Value);
                    //    string[] rgb = (colorstr + ",,").Split(',');
                    //    erow.Properties.Value = Color.FromArgb(
                    //        Static.ToInt(rgb[0])
                    //        , Static.ToInt(rgb[1])
                    //        , Static.ToInt(rgb[2])
                    //        );
                    //}
                    break;

                case DynamicParameterType.List:
                    RepositoryItemLookUpEdit lue = (RepositoryItemLookUpEdit)erow.Properties.RowEdit;

                    object    setvalue = DBNull.Value;
                    DataTable dt       = null;
                    #region Casting DataTable/DataView into DataTable
                    if (lue.DataSource is DataView)
                    {
                        DataView dv = (DataView)lue.DataSource;
                        dt = dv.Table;
                    }
                    else
                    {
                        dt = (DataTable)lue.DataSource;
                    }
                    #endregion
                    if (dt != null && dt.Columns.Count > 0)
                    {
                        #region Get data type of ValueMember column
                        Type totype = typeof(string);
                        if (string.IsNullOrEmpty(lue.ValueMember))
                        {
                            totype = dt.Columns[0].DataType;
                        }
                        else
                        {
                            if (dt.Columns.Contains(lue.ValueMember))
                            {
                                totype = dt.Columns[lue.ValueMember].DataType;
                            }
                        }
                        #endregion
                        #region Converting value into data type
                        setvalue = EServ.Shared.Static.ConvToType(totype, pi.Value);
                        #endregion
                    }
                    value = setvalue;
                    break;

                default:     // 1 and others is string type
                    value = Static.ToStr(pi.Value);
                    break;
                }
                #endregion
                if (pi.Value == null || pi.Value == DBNull.Value || pi.Value == "")
                {
                    erow.Properties.Value = null;
                }
                else
                {
                    erow.Properties.Value = value;
                }
            }
        }
Пример #18
0
        private void SetTabPageProperties(int pageIndex)
        {
            XtraTabPage page = this.tabControl.TabPages[pageIndex];
            ColorListBox box = null;
            BaseControl control = null;
            switch (pageIndex)
            {
                case 0:
                {
                    page.Text = Localizer.Active.GetLocalizedString(0);
                    control = new ColorCellsControl(null);
                    RepositoryItemColorEdit edit = new RepositoryItemColorEdit();
                    edit.ShowColorDialog  = false;
                    (control as ColorCellsControl).Properties = edit;
                    (control as ColorCellsControl).EnterColor += new EnterColorEventHandler(this.OnEnterColor);
                    control.Size = ColorCellsControlViewInfo.BestSize;
                    break;
                }
                case 1:
                    //page.Text = Localizer.Active.GetLocalizedString(0);
                    page.Text = "Màu web";
                    box = this.CreateColorListBox();
                    box.Items.AddRange(ColorListBoxViewInfo.WebColors);
                    box.EnterColor +=(new EnterColorEventHandler(this.OnEnterColor));
                    control = box;
                    break;

                case 2:
                    //page.Text = Localizer.Active.GetLocalizedString(0);
                    page.Text = "Màu hệ thống";
                    box = this.CreateColorListBox();
                    box.Items.AddRange(ColorListBoxViewInfo.SystemColors);
                    box.EnterColor +=new EnterColorEventHandler(this.OnEnterColor);
                    control = box;
                    break;
            }
            control.Dock = DockStyle.Fill;
            control.BorderStyle = BorderStyles.NoBorder;
            control.LookAndFeel.ParentLookAndFeel = (itemFontColor.Manager.GetController().LookAndFeel);
            page.Controls.Add(control);
        }
Пример #19
0
        /// <summary>
        /// Column의 DataType을 정의합니다.
        /// </summary>
        /// <param name="treeColumn">TreeList Column</param>
        /// <param name="dataType">Column Data Type</param>
        /// <param name="maxLength">Data의 최대 길이, 0이면 설정 안 함</param>
        /// <param name="decimalPlace">소숫점 길이 수, 기본값 0</param>
        /// <remarks>
        /// 2008-12-17 최초생성 : 황준혁
        /// 변경내역
        ///
        /// </remarks>
        private void SetColumnDataType(TreeListColumn treeColumn, ColumnDataType dataType, int maxLength, int decimalPlace)
        {
            if (dataType == ColumnDataType.Default)
            {
                RepositoryItemTextEdit edit = new RepositoryItemTextEdit();
                edit.Appearance.Font  = ControlConfig.DEFAULTFONT;
                edit.MaxLength        = maxLength;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.Text)
            {
                RepositoryItemMemoEdit edit = new RepositoryItemMemoEdit();

                edit.Appearance.Font  = ControlConfig.DEFAULTFONT;
                edit.MaxLength        = maxLength;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.CheckEdit)
            {
                RepositoryItemCheckEdit edit = new RepositoryItemCheckEdit();

                edit.Appearance.Font  = ControlConfig.DEFAULTFONT;
                edit.NullStyle        = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
                edit.ValueChecked     = true;
                edit.ValueUnchecked   = false;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.Date)
            {
                RepositoryItemDateEdit edit = new RepositoryItemDateEdit {
                    HighlightHolidays = true
                };

                edit.Appearance.Font             = ControlConfig.DEFAULTFONT;
                edit.NullDate                    = "";
                edit.Mask.EditMask               = "d";
                edit.Mask.MaskType               = DevExpress.XtraEditors.Mask.MaskType.DateTime;
                edit.Mask.UseMaskAsDisplayFormat = true;
                treeColumn.ColumnEdit            = edit;
            }
            else if (dataType == ColumnDataType.DateTime)
            {
                RepositoryItemDateEdit edit = new RepositoryItemDateEdit {
                    HighlightHolidays = true
                };

                edit.Appearance.Font             = ControlConfig.DEFAULTFONT;
                edit.NullDate                    = "";
                edit.NullText                    = "";
                edit.Mask.MaskType               = DevExpress.XtraEditors.Mask.MaskType.DateTime;
                edit.Mask.EditMask               = AppConfig.DEFAULTDATEFORMAT;
                edit.Mask.AutoComplete           = DevExpress.XtraEditors.Mask.AutoCompleteType.Optimistic;
                edit.Mask.UseMaskAsDisplayFormat = true;
                treeColumn.ColumnEdit            = edit;
            }
            else if (dataType == ColumnDataType.Time)
            {
                RepositoryItemTimeEdit edit = new RepositoryItemTimeEdit();

                edit.Appearance.Font             = ControlConfig.DEFAULTFONT;
                edit.Mask.MaskType               = DevExpress.XtraEditors.Mask.MaskType.DateTime;
                edit.Mask.EditMask               = "t";
                edit.Mask.UseMaskAsDisplayFormat = true;
                edit.Mask.AutoComplete           = DevExpress.XtraEditors.Mask.AutoCompleteType.Optimistic;
                treeColumn.ColumnEdit            = edit;
            }
            else if (dataType == ColumnDataType.Numeric)
            {
                RepositoryItemSpinEdit edit = new RepositoryItemSpinEdit();

                edit.Appearance.Font             = ControlConfig.DEFAULTFONT;
                edit.Mask.MaskType               = DevExpress.XtraEditors.Mask.MaskType.Numeric;
                edit.Mask.EditMask               = "n" + decimalPlace;
                edit.MaxLength                   = maxLength;
                edit.Mask.UseMaskAsDisplayFormat = !treeColumn.OptionsColumn.AllowEdit;
                treeColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Far;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.Decimal)
            {
                RepositoryItemSpinEdit edit = new RepositoryItemSpinEdit();

                edit.Appearance.Font             = ControlConfig.DEFAULTFONT;
                edit.Mask.EditMask               = "n" + decimalPlace;
                edit.Mask.MaskType               = DevExpress.XtraEditors.Mask.MaskType.Numeric;
                edit.MaxLength                   = maxLength;
                edit.Mask.UseMaskAsDisplayFormat = !treeColumn.OptionsColumn.AllowEdit;
                treeColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Far;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.Currency)
            {
                RepositoryItemTextEdit edit = new RepositoryItemTextEdit();

                edit.Appearance.Font             = ControlConfig.DEFAULTFONT;
                edit.Mask.EditMask               = "c" + decimalPlace;
                edit.Mask.MaskType               = DevExpress.XtraEditors.Mask.MaskType.Numeric;
                edit.MaxLength                   = maxLength;
                edit.Mask.UseMaskAsDisplayFormat = !treeColumn.OptionsColumn.AllowEdit;
                treeColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Far;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.Percentage)
            {
            }
            else if (dataType == ColumnDataType.Popup)
            {
            }
            else if (dataType == ColumnDataType.Button)
            {
            }
            else if (dataType == ColumnDataType.LinkButton)
            {
                RepositoryItemHyperLinkEdit edit = new RepositoryItemHyperLinkEdit();

                edit.Appearance.Font = ControlConfig.DEFAULTFONT;
                treeColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Near;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.ColorSelect)
            {
                RepositoryItemColorEdit edit = new RepositoryItemColorEdit();

                edit.Appearance.Font = ControlConfig.DEFAULTFONT;
                treeColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.Image)
            {
                RepositoryItemImageEdit edit = new RepositoryItemImageEdit();

                edit.Appearance.Font  = ControlConfig.DEFAULTFONT;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.Picture)
            {
                RepositoryItemPictureEdit edit = new RepositoryItemPictureEdit();

                edit.SizeMode         = PictureSizeMode.Stretch;
                edit.Appearance.Font  = ControlConfig.DEFAULTFONT;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.Password)
            {
                RepositoryItemTextEdit edit = new RepositoryItemTextEdit();

                edit.Appearance.Font  = ControlConfig.DEFAULTFONT;
                edit.PasswordChar     = '*';
                edit.MaxLength        = maxLength;
                treeColumn.ColumnEdit = edit;
            }
            else if (dataType == ColumnDataType.ImageCombo)
            {
            }
            else if (dataType == ColumnDataType.File)
            {
            }
        }