Exemplo n.º 1
0
        protected override RepositoryItem OnCreateRepositoryItem(Type objectType)
        {
            var edit = new RepositoryItemImageEdit();

            WinFormPublic.AddClearButton(edit);
            return(edit);
        }
Exemplo n.º 2
0
 public void AddImageEdit(string string_2, object object_0, bool bool_0)
 {
     this.repositoryItemImageEdit_0 = new RepositoryItemImageEdit();
     this.gridEditorCollection_0.Add(this.repositoryItemImageEdit_0, string_2, object_0);
     this.repositoryItemImageEdit_0.AutoHeight     = false;
     this.repositoryItemImageEdit_0.BorderStyle    = BorderStyles.NoBorder;
     this.repositoryItemImageEdit_0.Name           = "repositoryItemImageEdit";
     this.repositoryItemImageEdit_0.PopupStartSize = new Size(250, 300);
 }
Exemplo n.º 3
0
        public static RepositoryItemImageEdit CreateTreeImageEdit(this TreeListColumn treeColumn)
        {
            RepositoryItemImageEdit repositoryItem = new RepositoryItemImageEdit
            {
                AutoHeight = false,
                SizeMode   = PictureSizeMode.Zoom
            };

            treeColumn.TreeList.RepositoryItems.Add(repositoryItem);
            treeColumn.ColumnEdit = repositoryItem;
            return(repositoryItem);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 创建GridView的列编辑为ImageEdit
        /// </summary>
        /// <param name="gridColumn">GridColumn列对象</param>
        /// <returns></returns>
        public static RepositoryItemImageEdit CreateImageEdit(this GridColumn gridColumn)
        {
            RepositoryItemImageEdit repositoryItem = new RepositoryItemImageEdit
            {
                AutoHeight = false,
                SizeMode   = PictureSizeMode.Zoom
            };

            gridColumn.View.GridControl.RepositoryItems.Add(repositoryItem);
            gridColumn.ColumnEdit = repositoryItem;
            return(repositoryItem);
        }
Exemplo n.º 5
0
        public RepositoryItemImageEdit CreateRepositoryImageEdit()
        {
            RepositoryItemImageEdit ri = new RepositoryItemImageEdit();

            ri.AutoHeight = false;
            ri.SizeMode   = DevExpress.XtraEditors.Controls.PictureSizeMode.Stretch;
            ri.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
                new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "Browse", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, null, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), null /*serializableAppearanceObject2*/, "", null, null, true)
            });
            ri.Buttons[0].Visible = false;

            return(ri);
        }
        private void InitContr()
        {
            if (dsLoad != null)
                return;

            dsLoad = this.GetFrmLoadDs(drBtn["SplitClassName"].ToString());
            dsLoad.AcceptChanges();
            dtShow = dsLoad.Tables[0];
            dtConst = dsLoad.Tables[1];

            if (drBtn["SplitClassShowIcon"].ToString() == "True")
            {
                GridColumn gridCol = new GridColumn();
                RepositoryItemImageEdit repImg = new RepositoryItemImageEdit();
                repImg.AutoHeight = false;
                repImg.Buttons.Clear();
                repImg.Name = "gridVInfo_repImg";
                repImg.PopupFormMinSize = new System.Drawing.Size(450, 350);
                repImg.ReadOnly = true;
                repImg.Popup += new System.EventHandler(this.repImg_Popup);

                gridCol.Caption = "图片";
                gridCol.ColumnEdit = repImg;
                gridCol.FieldName = "Icon";
                gridCol.Name = "gridVInfo_GCol";
                gridCol.OptionsColumn.AllowMove = false;
                gridCol.OptionsColumn.ReadOnly = true;
                gridCol.Visible = true;
                gridCol.VisibleIndex = 0;
                gridCol.Width = 50;

                this.gridCInfo.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                    repImg});
                gridVInfo.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridCol });
            }
            StaticFunctions.ShowGridControl(gridVInfo, dtShow, dtConst);
            StaticFunctions.ShowGridControl(gridVSplit, dtShow, dtConst, out strFileds);
        }
Exemplo n.º 7
0
        private void SetFormatPivot(DataTable objectitem)
        {
            int rowindex = 1;

            gridControl1.RepositoryItems.Clear();
            ParentHash.Clear();
            InverseParentHash.Clear();
            gridView1.Columns[0].Visible = false;

            #region Formatting Fixed Value Columns

            if (_showfixedvalues)
            {
                gridView1.Columns[1].ColumnEdit  = CreateRepositoryCalcEdit(1, "0");                   //status
                gridView1.Columns[2].ColumnEdit  = CreateRepositoryDateEdit();                         //startdate
                gridView1.Columns[3].ColumnEdit  = CreateRepositoryDateEdit();                         //enddate
                gridView1.Columns[4].ColumnEdit  = CreateRepositoryCalcEdit(12, "###,###,###,##0.00"); //estimateamount
                gridView1.Columns[5].ColumnEdit  = CreateRepositoryLookUpEdit();                       //estimatecurcode
                gridView1.Columns[6].ColumnEdit  = CreateRepositoryLookUpEdit();                       //feetype
                gridView1.Columns[7].ColumnEdit  = CreateRepositoryCalcEdit(3, "###,###,###,##0.00");  //feerate
                gridView1.Columns[8].ColumnEdit  = CreateRepositoryCalcEdit(12, "###,###,###,##0.00"); //feeamount
                gridView1.Columns[9].ColumnEdit  = CreateRepositoryLookUpEdit();                       //feecurcode
                gridView1.Columns[10].ColumnEdit = CreateRepositoryCalcEdit(12, "###,###,###,##0.00"); //currate
                gridView1.Columns[11].ColumnEdit = CreateRepositoryCalcEdit(3, "###,###,###,##0.00");  //discountrate
                gridView1.Columns[12].ColumnEdit = CreateRepositoryCalcEdit(12, "###,###,###,##0.00"); //discountamount
                gridView1.Columns[13].ColumnEdit = CreateRepositoryLookUpEdit();                       //discountcurcode
                gridView1.Columns[14].ColumnEdit = CreateRepositoryCalcEdit(10, null);                 //OptionID
                gridView1.Columns[15].ColumnEdit = CreateRepositoryCalcEdit(1, "0");                   //feestatus
                gridView1.Columns[16].ColumnEdit = CreateRepositoryCalcEdit(1, "0");                   //feediscounttype
                gridView1.Columns[17].ColumnEdit = CreateRepositoryCalcEdit(12, "###,###,###,##0.00"); //feediscountamount
                gridView1.Columns[18].ColumnEdit = CreateRepositoryCalcEdit(3, "###,###,###,##0.00");  //feediscountrate
                gridView1.Columns[19].ColumnEdit = CreateRepositoryCalcEdit(12, "###,###,###,##0.00"); //calcamount
                gridView1.Columns[20].ColumnEdit = CreateRepositoryCalcEdit(3, "###,###,###,##0.00");  //calcrate
                gridView1.Columns[21].ColumnEdit = CreateRepositoryCalcEdit(10, null);                 //UnOptionID
                gridView1.Columns[22].ColumnEdit = CreateRepositoryCalcEdit(12, "###,###,###,##0.00"); //ClaimAmount
                gridView1.Columns[23].ColumnEdit = CreateRepositoryCalcEdit(12, "###,###,###,##0.00"); //MarketValue
                gridView1.Columns[24].ColumnEdit = CreateRepositoryCalcEdit(16, null);                 //MarketValue
                for (int i = 0; i < START_INDEX_DYNAMIC_COL; i++)
                {
                    gridControl1.RepositoryItems.Add(gridView1.Columns[i].ColumnEdit);
                }
                rowindex = START_INDEX_DYNAMIC_COL;
            }

            #endregion

            #region Formatting Dynamic Value Columns

            if (objectitem != null)
            {
                foreach (DataRow row in objectitem.Rows)
                {
                    #region Get row values
                    DynamicParameterType ValueType = (DynamicParameterType)Static.ToInt(row["valuetype"]);
                    int    ValueLength             = Static.ToInt(row["valuelength"]);
                    string EditMask    = Static.ToStr(row["editmask"]);
                    bool   IsMandatory = Static.ToInt(row["ismandatory"]) == 1;
                    bool   IsCalculate = Static.ToInt(row["calculate"]) == 1;
                    if (Static.ToInt(row["dictparentobject"]) != 0 && row["dictparentobject"] != null && Static.ToStr(row["dictfilterdesc"]) != "")
                    {
                        ParentHash.Add(gridView1.Columns[rowindex].AbsoluteIndex, Static.ToInt(row["dictparentobject"]));
                        InverseParentHash.Add(Static.ToInt(row["dictparentobject"]), gridView1.Columns[rowindex].AbsoluteIndex);
                        gridView1.Columns[rowindex].AppearanceCell.Name = Static.ToStr(row["dictfilterdesc"]);
                    }
                    #endregion
                    #region Setting property values and types
                    switch (ValueType)
                    {
                    case DynamicParameterType.Text:
                        gridView1.Columns[rowindex].ColumnEdit = CreateRepositoryTextEdit(ValueLength, EditMask);
                        if (Static.ToStr(row["valuedefault"]) != "")
                        {
                            gridView1.Columns[rowindex].Tag = Static.ToStr(row["valuedefault"]);
                        }
                        break;

                    case DynamicParameterType.Decimal:
                        gridView1.Columns[rowindex].ColumnEdit = CreateRepositoryCalcEdit(ValueLength, EditMask);
                        if (Static.ToStr(row["valuedefault"]) != "")
                        {
                            gridView1.Columns[rowindex].Tag = Static.ToDecimal(row["valuedefault"]);
                        }
                        break;

                    case DynamicParameterType.Date:
                        gridView1.Columns[rowindex].ColumnEdit = CreateRepositoryDateEdit();
                        if (Static.ToStr(row["valuedefault"]) != "")
                        {
                            gridView1.Columns[rowindex].Tag = Static.ToDate(row["valuedefault"]);
                        }
                        break;

                    case DynamicParameterType.DateTime:
                        gridView1.Columns[rowindex].ColumnEdit = CreateRepositoryDateTimeEdit();
                        if (Static.ToStr(row["valuedefault"]) != "")
                        {
                            gridView1.Columns[rowindex].Tag = Static.ToDateTime(row["valuedefault"]);
                        }
                        break;

                    case DynamicParameterType.File:
                        RepositoryItemButtonEdit riFileEdit = CreateRepositoryFileEdit();
                        riFileEdit.ButtonPressed += new ButtonPressedEventHandler(riFileEdit_ButtonClick);
                        gridView1.Columns[rowindex].ColumnEdit = riFileEdit;
                        break;

                    case DynamicParameterType.Folder:
                        RepositoryItemButtonEdit riFolderEdit = CreateRepositoryFolderEdit();
                        riFolderEdit.ButtonPressed            += new ButtonPressedEventHandler(riFolderEdit_ButtonClick);
                        gridView1.Columns[rowindex].ColumnEdit = riFolderEdit;
                        break;

                    case DynamicParameterType.Picture:
                        RepositoryItemImageEdit riImageEdit = CreateRepositoryImageEdit();
                        riImageEdit.ButtonPressed += new ButtonPressedEventHandler(riImageEdit_ButtonClick);
                        gridView1.Columns[rowindex].ColumnEdit = riImageEdit;
                        break;

                    case DynamicParameterType.Font:
                        gridView1.Columns[rowindex].ColumnEdit = CreateRepositoryFontEdit();
                        break;

                    case DynamicParameterType.Color:
                        gridView1.Columns[rowindex].ColumnEdit = CreateRepositoryColorEdit();
                        break;

                    case DynamicParameterType.List:
                        gridView1.Columns[rowindex].ColumnEdit = CreateRepositoryLookUpEdit();
                        if (Static.ToStr(row["valuedefault"]) != "")
                        {
                            gridView1.Columns[rowindex].Tag = Static.ToStr(row["valuedefault"]);
                        }
                        //gridView1.Columns[rowindex].Tag = "List";
                        break;

                    case DynamicParameterType.Register:
                        RepositoryItemButtonEdit riRegisterEdit = CreateRepositoryRegisterEdit();
                        riRegisterEdit.ButtonPressed          += new ButtonPressedEventHandler(riRegisterEdit_ButtonPressed);
                        gridView1.Columns[rowindex].ColumnEdit = riRegisterEdit;
                        break;

                    default:     // 1 and others is string type
                        gridView1.Columns[rowindex].ColumnEdit = CreateRepositoryTextEdit(4000, "");
                        if (Static.ToStr(row["valuedefault"]) != "")
                        {
                            gridView1.Columns[rowindex].Tag = Static.ToDecimal(row["valuedefault"]);
                        }
                        break;
                    }
                    #endregion

                    gridControl1.RepositoryItems.Add(gridView1.Columns[rowindex].ColumnEdit);
                    if (IsMandatory)
                    {
                        gridView1.Columns[rowindex].AppearanceCell.BackColor = Color.FromKnownColor(KnownColor.Info);
                        gridView1.Columns[rowindex].ToolTip = "mandatory";
                    }
                    if (IsCalculate)
                    {
                        calccolumn.Add(gridView1.Columns[rowindex].ColumnHandle);
                    }
                    rowindex++;
                }
            }
            #endregion

            ISM.Template.FormUtility.SetFormatGrid(ref gridView1, true);
        }
Exemplo n.º 8
0
        private void InitializeComponent()
        {
            this.components = (IContainer) new Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(SelectVarsForm));

            this.panel1             = new Panel();
            this.cmdCancel          = new Button();
            this.cmdRefresh         = new Button();
            this.cmdSelect          = new Button();
            this.gridControlSetting = new GridControl();
            this.ds = new DataSet();
            this.table_settinggroup        = new DataTable();
            this.dataColumn10              = new DataColumn();
            this.dataColumn11              = new DataColumn();
            this.dataColumn12              = new DataColumn();
            this.dataColumn13              = new DataColumn();
            this.dataColumn14              = new DataColumn();
            this.dataColumn15              = new DataColumn();
            this.table_setting             = new DataTable();
            this.dataColumn1               = new DataColumn();
            this.dataColumn2               = new DataColumn();
            this.dataColumn3               = new DataColumn();
            this.dataColumn4               = new DataColumn();
            this.dataColumn5               = new DataColumn();
            this.dataColumn6               = new DataColumn();
            this.dataColumn7               = new DataColumn();
            this.dataColumn8               = new DataColumn();
            this.dataColumn16              = new DataColumn();
            this.dataColumn9               = new DataColumn();
            this.dataColumn17              = new DataColumn();
            this.dataColumn18              = new DataColumn();
            this.dataColumn19              = new DataColumn();
            this.gridViewSetting           = new GridView();
            this.colidsetting              = new GridColumn();
            this.colname                   = new GridColumn();
            this.colintvalue               = new GridColumn();
            this.repositoryItemTextEdit1   = new AtRepositoryItemTextEdit();
            this.colintvalue2              = new GridColumn();
            this.colstrvalue               = new GridColumn();
            this.coltxtvalue               = new GridColumn();
            this.colcomment                = new GridColumn();
            this.colgroupname              = new GridColumn();
            this.coldtvalue                = new GridColumn();
            this.repositoryItemDateEdit1   = new RepositoryItemDateEdit();
            this.repositoryItemMemoExEdit1 = new RepositoryItemMemoExEdit();
            this.repositoryItemImageEdit1  = new RepositoryItemImageEdit();
            this.treeList1                 = new TreeList();
            this.treeListColumn1           = new TreeListColumn();
            this.imageList1                = new ImageList(this.components);
            this.splitterControl1          = new SplitterControl();
            this.panel1.SuspendLayout();
            this.gridControlSetting.BeginInit();
            this.ds.BeginInit();
            this.table_settinggroup.BeginInit();
            this.table_setting.BeginInit();
            this.gridViewSetting.BeginInit();
            this.repositoryItemTextEdit1.BeginInit();
            this.repositoryItemDateEdit1.BeginInit();
            this.repositoryItemDateEdit1.VistaTimeProperties.BeginInit();
            this.repositoryItemMemoExEdit1.BeginInit();
            this.repositoryItemImageEdit1.BeginInit();
            this.treeList1.BeginInit();
            this.SuspendLayout();
            this.panel1.Controls.Add((Control)this.cmdCancel);
            this.panel1.Controls.Add((Control)this.cmdRefresh);
            this.panel1.Controls.Add((Control)this.cmdSelect);
            this.panel1.Dock                                          = DockStyle.Bottom;
            this.panel1.Location                                      = new Point(0, 333);
            this.panel1.Name                                          = "panel1";
            this.panel1.Size                                          = new Size(705, 33);
            this.panel1.TabIndex                                      = 2;
            this.cmdCancel.Anchor                                     = AnchorStyles.Top | AnchorStyles.Right;
            this.cmdCancel.FlatStyle                                  = FlatStyle.Flat;
            this.cmdCancel.Location                                   = new Point(618, 5);
            this.cmdCancel.Name                                       = "cmdCancel";
            this.cmdCancel.Size                                       = new Size(75, 23);
            this.cmdCancel.TabIndex                                   = 2;
            this.cmdCancel.Text                                       = "Закрыть";
            this.cmdCancel.Click                                     += new EventHandler(this.cmdCancel_Click);
            this.cmdRefresh.Anchor                                    = AnchorStyles.Top | AnchorStyles.Right;
            this.cmdRefresh.FlatStyle                                 = FlatStyle.Flat;
            this.cmdRefresh.Location                                  = new Point(537, 5);
            this.cmdRefresh.Name                                      = "cmdRefresh";
            this.cmdRefresh.Size                                      = new Size(75, 23);
            this.cmdRefresh.TabIndex                                  = 1;
            this.cmdRefresh.Text                                      = "Обновить";
            this.cmdRefresh.Click                                    += new EventHandler(this.cmdRefresh_Click);
            this.cmdSelect.Anchor                                     = AnchorStyles.Top | AnchorStyles.Right;
            this.cmdSelect.FlatStyle                                  = FlatStyle.Flat;
            this.cmdSelect.Location                                   = new Point(456, 5);
            this.cmdSelect.Name                                       = "cmdSelect";
            this.cmdSelect.Size                                       = new Size(75, 23);
            this.cmdSelect.TabIndex                                   = 0;
            this.cmdSelect.Text                                       = "Выбрать";
            this.cmdSelect.Click                                     += new EventHandler(this.cmdSelect_Click);
            this.gridControlSetting.DataMember                        = "settinggroup.FK_setting_settinggroup";
            this.gridControlSetting.DataSource                        = (object)this.ds;
            this.gridControlSetting.Dock                              = DockStyle.Fill;
            this.gridControlSetting.EmbeddedNavigator.Name            = "";
            this.gridControlSetting.Location                          = new Point(246, 0);
            this.gridControlSetting.LookAndFeel.Style                 = LookAndFeelStyle.Flat;
            this.gridControlSetting.LookAndFeel.UseDefaultLookAndFeel = false;
            this.gridControlSetting.MainView                          = (BaseView)this.gridViewSetting;
            this.gridControlSetting.Name                              = "gridControlSetting";
            this.gridControlSetting.RepositoryItems.AddRange(new RepositoryItem[4]
            {
                (RepositoryItem)this.repositoryItemTextEdit1,
                (RepositoryItem)this.repositoryItemMemoExEdit1,
                (RepositoryItem)this.repositoryItemImageEdit1,
                (RepositoryItem)this.repositoryItemDateEdit1
            });
            this.gridControlSetting.Size     = new Size(459, 333);
            this.gridControlSetting.TabIndex = 4;
            this.gridControlSetting.ViewCollection.AddRange(new BaseView[1]
            {
                (BaseView)this.gridViewSetting
            });
            this.ds.DataSetName        = "ds_setting";
            this.ds.EnforceConstraints = false;
            this.ds.Relations.AddRange(new DataRelation[1]
            {
                new DataRelation("FK_setting_settinggroup", "settinggroup", "setting", new string[1]
                {
                    "idsettinggroup"
                }, new string[1]
                {
                    "idsettinggroup"
                }, 0 != 0)
            });
            this.ds.Tables.AddRange(new DataTable[2]
            {
                this.table_settinggroup,
                this.table_setting
            });
            this.table_settinggroup.Columns.AddRange(new DataColumn[6]
            {
                this.dataColumn10,
                this.dataColumn11,
                this.dataColumn12,
                this.dataColumn13,
                this.dataColumn14,
                this.dataColumn15
            });
            this.table_settinggroup.Constraints.AddRange(new Constraint[1]
            {
                (Constraint) new UniqueConstraint("Constraint1", new string[1]
                {
                    "idsettinggroup"
                }, 1 != 0)
            });
            this.table_settinggroup.PrimaryKey = new DataColumn[1]
            {
                this.dataColumn10
            };
            this.table_settinggroup.TableName = "settinggroup";
            this.dataColumn10.AllowDBNull     = false;
            this.dataColumn10.ColumnName      = "idsettinggroup";
            this.dataColumn10.DataType        = typeof(int);
            this.dataColumn11.ColumnName      = "name";
            this.dataColumn12.ColumnName      = "comment";
            this.dataColumn13.ColumnName      = "isactive";
            this.dataColumn13.DataType        = typeof(bool);
            this.dataColumn14.ColumnName      = "parentid";
            this.dataColumn14.DataType        = typeof(int);
            this.dataColumn15.ColumnName      = "_image";
            this.dataColumn15.DataType        = typeof(int);
            this.dataColumn15.DefaultValue    = (object)0;
            this.table_setting.Columns.AddRange(new DataColumn[13]
            {
                this.dataColumn1,
                this.dataColumn2,
                this.dataColumn3,
                this.dataColumn4,
                this.dataColumn5,
                this.dataColumn6,
                this.dataColumn7,
                this.dataColumn8,
                this.dataColumn16,
                this.dataColumn9,
                this.dataColumn17,
                this.dataColumn18,
                this.dataColumn19
            });
            this.table_setting.Constraints.AddRange(new Constraint[2]
            {
                (Constraint) new UniqueConstraint("Constraint1", new string[1]
                {
                    "idsetting"
                }, 1 != 0),
                (Constraint) new ForeignKeyConstraint("Relation1", "settinggroup", new string[1]
                {
                    "idsettinggroup"
                }, new string[1]
                {
                    "idsettinggroup"
                }, AcceptRejectRule.None, Rule.Cascade, Rule.Cascade)
            });
            this.table_setting.PrimaryKey = new DataColumn[1]
            {
                this.dataColumn1
            };
            this.table_setting.TableName = "setting";
            this.dataColumn1.AllowDBNull = false;
            this.dataColumn1.ColumnName  = "idsetting";
            this.dataColumn1.DataType    = typeof(int);
            this.dataColumn2.ColumnName  = "name";
            this.dataColumn3.ColumnName  = "intvalue";
            this.dataColumn3.DataType    = typeof(double);
            this.dataColumn4.ColumnName  = "strvalue";
            this.dataColumn5.ColumnName  = "comment";
            this.dataColumn6.ColumnName  = "txtvalue";
            this.dataColumn7.ColumnName  = "blbvalue";
            this.dataColumn7.DataType    = typeof(byte[]);
            this.dataColumn8.ColumnName  = "groupname";
            this.dataColumn16.ColumnName = "idsettinggroup";
            this.dataColumn16.DataType   = typeof(int);
            this.dataColumn9.ColumnName  = "dtvalue";
            this.dataColumn9.DataType    = typeof(DateTime);
            this.dataColumn17.ColumnName = "addorder";
            this.dataColumn17.DataType   = typeof(bool);
            this.dataColumn18.ColumnName = "addmodel";
            this.dataColumn18.DataType   = typeof(bool);
            this.dataColumn19.ColumnName = "intvalue2";
            this.dataColumn19.DataType   = typeof(double);
            this.gridViewSetting.Appearance.FocusedRow.BackColor                    = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.FocusedRow.BackColor2                   = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.FocusedRow.BorderColor                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.FocusedRow.ForeColor                    = Color.Black;
            this.gridViewSetting.Appearance.FocusedRow.Options.UseBackColor         = true;
            this.gridViewSetting.Appearance.FocusedRow.Options.UseBorderColor       = true;
            this.gridViewSetting.Appearance.FocusedRow.Options.UseForeColor         = true;
            this.gridViewSetting.Appearance.GroupPanel.BackColor                    = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.GroupPanel.BackColor2                   = Color.FromArgb(192, 192, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.GroupPanel.Options.UseBackColor         = true;
            this.gridViewSetting.Appearance.HideSelectionRow.BackColor              = Color.FromArgb(192, 192, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.HideSelectionRow.BackColor2             = Color.FromArgb(192, 192, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.HideSelectionRow.BorderColor            = Color.FromArgb(192, 192, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.HideSelectionRow.ForeColor              = Color.Black;
            this.gridViewSetting.Appearance.HideSelectionRow.Options.UseBackColor   = true;
            this.gridViewSetting.Appearance.HideSelectionRow.Options.UseBorderColor = true;
            this.gridViewSetting.Appearance.HideSelectionRow.Options.UseForeColor   = true;
            this.gridViewSetting.Appearance.SelectedRow.BackColor                   = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.SelectedRow.BackColor2                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.SelectedRow.BorderColor                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
            this.gridViewSetting.Appearance.SelectedRow.ForeColor                   = Color.Black;
            this.gridViewSetting.Appearance.SelectedRow.Options.UseBackColor        = true;
            this.gridViewSetting.Appearance.SelectedRow.Options.UseBorderColor      = true;
            this.gridViewSetting.Appearance.SelectedRow.Options.UseForeColor        = true;
            this.gridViewSetting.BorderStyle = BorderStyles.Simple;
            this.gridViewSetting.Columns.AddRange(new GridColumn[9]
            {
                this.colidsetting,
                this.colname,
                this.colintvalue,
                this.colintvalue2,
                this.colstrvalue,
                this.coltxtvalue,
                this.colcomment,
                this.colgroupname,
                this.coldtvalue
            });
            this.gridViewSetting.GridControl    = this.gridControlSetting;
            this.gridViewSetting.GroupPanelText = "Панель группировки";
            this.gridViewSetting.Name           = "gridViewSetting";
            this.gridViewSetting.OptionsBehavior.AllowIncrementalSearch = true;
            this.gridViewSetting.OptionsBehavior.Editable         = false;
            this.gridViewSetting.OptionsCustomization.AllowFilter = false;
            this.gridViewSetting.OptionsDetail.ShowDetailTabs     = false;
            this.gridViewSetting.OptionsSelection.MultiSelect     = true;
            this.gridViewSetting.OptionsView.ShowFilterPanelMode  = ShowFilterPanelMode.Never;
            this.gridViewSetting.OptionsView.ShowIndicator        = false;
            this.colidsetting.Caption   = "#";
            this.colidsetting.FieldName = "idsetting";
            this.colidsetting.Name      = "colidsetting";
            this.colidsetting.OptionsColumn.AllowEdit = false;
            this.colidsetting.Visible      = true;
            this.colidsetting.VisibleIndex = 0;
            this.colidsetting.Width        = 31;
            this.colname.Caption           = "Имя";
            this.colname.FieldName         = "name";
            this.colname.Name                       = "colname";
            this.colname.Visible                    = true;
            this.colname.VisibleIndex               = 1;
            this.colname.Width                      = 36;
            this.colintvalue.Caption                = "Число 1";
            this.colintvalue.ColumnEdit             = (RepositoryItem)this.repositoryItemTextEdit1;
            this.colintvalue.FieldName              = "intvalue";
            this.colintvalue.Name                   = "colintvalue";
            this.colintvalue.Visible                = true;
            this.colintvalue.VisibleIndex           = 2;
            this.colintvalue.Width                  = 54;
            this.repositoryItemTextEdit1.AutoHeight = false;
            this.repositoryItemTextEdit1.DisplayFormat.FormatString = "n6";
            this.repositoryItemTextEdit1.DisplayFormat.FormatType   = FormatType.Numeric;
            this.repositoryItemTextEdit1.EditFormat.FormatString    = "n6";
            this.repositoryItemTextEdit1.EditFormat.FormatType      = FormatType.Numeric;
            this.repositoryItemTextEdit1.Mask.EditMask = "n6";
            this.repositoryItemTextEdit1.Mask.MaskType = MaskType.Numeric;
            this.repositoryItemTextEdit1.Name          = "repositoryItemTextEdit1";
            this.colintvalue2.Caption               = "Число 2";
            this.colintvalue2.FieldName             = "intvalue2";
            this.colintvalue2.Name                  = "colintvalue2";
            this.colintvalue2.Visible               = true;
            this.colintvalue2.VisibleIndex          = 3;
            this.colintvalue2.Width                 = 44;
            this.colstrvalue.Caption                = "Строка";
            this.colstrvalue.FieldName              = "strvalue";
            this.colstrvalue.Name                   = "colstrvalue";
            this.colstrvalue.Visible                = true;
            this.colstrvalue.VisibleIndex           = 4;
            this.colstrvalue.Width                  = 31;
            this.coltxtvalue.Caption                = "Текст";
            this.coltxtvalue.FieldName              = "txtvalue";
            this.coltxtvalue.Name                   = "coltxtvalue";
            this.coltxtvalue.Visible                = true;
            this.coltxtvalue.VisibleIndex           = 5;
            this.coltxtvalue.Width                  = 31;
            this.colcomment.Caption                 = "Описание";
            this.colcomment.FieldName               = "comment";
            this.colcomment.Name                    = "colcomment";
            this.colcomment.Visible                 = true;
            this.colcomment.VisibleIndex            = 6;
            this.colcomment.Width                   = 31;
            this.colgroupname.Caption               = "Группа";
            this.colgroupname.FieldName             = "groupname";
            this.colgroupname.Name                  = "colgroupname";
            this.colgroupname.Visible               = true;
            this.colgroupname.VisibleIndex          = 7;
            this.colgroupname.Width                 = 31;
            this.coldtvalue.Caption                 = "Дата";
            this.coldtvalue.ColumnEdit              = (RepositoryItem)this.repositoryItemDateEdit1;
            this.coldtvalue.FieldName               = "dtvalue";
            this.coldtvalue.Name                    = "coldtvalue";
            this.coldtvalue.Visible                 = true;
            this.coldtvalue.VisibleIndex            = 8;
            this.coldtvalue.Width                   = 31;
            this.repositoryItemDateEdit1.AutoHeight = false;
            this.repositoryItemDateEdit1.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton(ButtonPredefines.Combo)
            });
            this.repositoryItemDateEdit1.Name = "repositoryItemDateEdit1";
            this.repositoryItemDateEdit1.VistaTimeProperties.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton()
            });
            this.repositoryItemMemoExEdit1.AutoHeight = false;
            this.repositoryItemMemoExEdit1.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton(ButtonPredefines.Combo)
            });
            this.repositoryItemMemoExEdit1.Name      = "repositoryItemMemoExEdit1";
            this.repositoryItemImageEdit1.AutoHeight = false;
            this.repositoryItemImageEdit1.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton(ButtonPredefines.Combo)
            });
            this.repositoryItemImageEdit1.Name = "repositoryItemImageEdit1";
            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[1]
            {
                this.treeListColumn1
            });
            this.treeList1.DataMember           = "settinggroup";
            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         = "idsettinggroup";
            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.SelectImageList           = (object)this.imageList1;
            this.treeList1.Size            = new Size(240, 333);
            this.treeList1.TabIndex        = 5;
            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        = 167;
            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(240, 0);
            this.splitterControl1.Name     = "splitterControl1";
            this.splitterControl1.Size     = new Size(6, 333);
            this.splitterControl1.TabIndex = 6;
            this.splitterControl1.TabStop  = false;
            this.AutoScaleDimensions       = new SizeF(6f, 13f);
            this.AutoScaleMode             = AutoScaleMode.Font;
            this.Controls.Add((Control)this.gridControlSetting);
            this.Controls.Add((Control)this.splitterControl1);
            this.Controls.Add((Control)this.treeList1);
            this.Controls.Add((Control)this.panel1);
            this.Name = "SelectVarsForm";
            this.Size = new Size(705, 366);
            this.Text = "Переменные";
            this.panel1.ResumeLayout(false);
            this.gridControlSetting.EndInit();
            this.ds.EndInit();
            this.table_settinggroup.EndInit();
            this.table_setting.EndInit();
            this.gridViewSetting.EndInit();
            this.repositoryItemTextEdit1.EndInit();
            this.repositoryItemDateEdit1.VistaTimeProperties.EndInit();
            this.repositoryItemDateEdit1.EndInit();
            this.repositoryItemMemoExEdit1.EndInit();
            this.repositoryItemImageEdit1.EndInit();
            this.treeList1.EndInit();
            this.ResumeLayout(false);
        }
Exemplo n.º 9
0
        private void InitContr()
        {
            if (dsLoad != null)
            {
                return;
            }

            dsLoad = this.GetFrmLoadDs(drBtn["FrmClassName"].ToString());
            dsLoad.AcceptChanges();
            dtShow  = dsLoad.Tables[0];
            dtConst = dsLoad.Tables[1];
            if (drBtn["FrmShowIcon"].ToString() == "True")
            {
                GridColumn gridCol             = new GridColumn();
                RepositoryItemImageEdit repImg = new RepositoryItemImageEdit();
                repImg.AutoHeight = false;
                repImg.Buttons.Clear();
                repImg.Name             = "gridVInfo_repImg";
                repImg.PopupFormMinSize = new System.Drawing.Size(450, 350);
                repImg.ReadOnly         = true;
                repImg.Popup           += new System.EventHandler(this.repImg_Popup);

                gridCol.Caption    = "图片";
                gridCol.ColumnEdit = repImg;
                gridCol.FieldName  = "Icon";
                gridCol.Name       = "gridVInfo_GCol";
                gridCol.OptionsColumn.AllowMove  = false;
                gridCol.OptionsColumn.ReadOnly   = true;
                gridCol.OptionsColumn.FixedWidth = true;
                gridCol.Visible      = true;
                gridCol.VisibleIndex = 0;
                gridCol.Width        = 50;

                this.gridCInfo.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                    repImg
                });
                gridVInfo.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridCol });
            }
            else if (drBtn["FrmShowPicEdit"].ToString() == "True")
            {
                GridColumn gridCol = new GridColumn();
                RepositoryItemPictureEdit repPic = new RepositoryItemPictureEdit();
                repPic.Name        = "gridVInfo_repPic";
                repPic.ReadOnly    = true;
                repPic.ShowMenu    = false;
                repPic.SizeMode    = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom;
                repPic.MouseLeave += new System.EventHandler(this.repPic_MouseLeave);
                repPic.MouseHover += new EventHandler(repPic_MouseHover);

                gridCol.Caption    = "图片";
                gridCol.ColumnEdit = repPic;
                gridCol.FieldName  = "Icon";
                gridCol.Name       = "gridVInfo_GCol";
                gridCol.OptionsColumn.AllowMove  = false;
                gridCol.OptionsColumn.ReadOnly   = true;
                gridCol.OptionsColumn.FixedWidth = true;
                gridCol.Visible      = true;
                gridCol.VisibleIndex = 0;
                gridCol.Width        = int.Parse(drBtn["FrmPicGvWidth"].ToString());

                this.gridCInfo.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                    repPic
                });
                gridVInfo.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridCol });

                this.gridVInfo.RowHeight = int.Parse(drBtn["FrmPicGvRowHeight"].ToString());
                this.gridVInfo.OptionsView.ShowAutoFilterRow = false;
                this.picEdit.Location = new System.Drawing.Point(int.Parse(drBtn["FrmPicX"].ToString()), int.Parse(drBtn["FrmPicY"].ToString()));
            }
            Rectangle rect = SystemInformation.VirtualScreen;

            StaticFunctions.ShowGridControl(gridVInfo, dtShow, dtConst, out strFileds);
            IsAddChildGv = this.drBtn["IsAddChildGv"].ToString() == "True";
            if (IsAddChildGv)
            {
                gvChild = StaticFunctions.ShowGridVChildGv("gridVCom", gridCInfo, dtShow, dtConst, out strFiledsInfo);
            }
        }
Exemplo n.º 10
0
        /// <summary>
        /// 初始化列,
        /// </summary>
        public void InitColumns()
        {

            //需要隐藏列时在这写代码
            for (int i = 0; i < gridView1.Columns.Count; i++)
            {
                gridView1.Columns[i].Caption = AttributeHelper.GetDisplayName(typeof(PJ_03yxfx), gridView1.Columns[i].FieldName);
               
            }
            hideColumn("qzrq");
            hideColumn("OrgCode");
            hideColumn("gznrID");
            ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
            if (picview == null)
            {
                imageEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemImageEdit();
                ((System.ComponentModel.ISupportInitialize)(this.imageEdit1)).BeginInit();
                // 
                // imageEdit1
                // 
                this.imageEdit1.AutoHeight = false;
                this.imageEdit1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
                this.imageEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
                    new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
                this.imageEdit1.Name = "imageEdit1";
                this.imageEdit1.PopupFormSize = new System.Drawing.Size(1200, 600); ;
                ((System.ComponentModel.ISupportInitialize)(this.imageEdit1)).EndInit();

                picview = new DevExpress.XtraGrid.Columns.GridColumn();
                picview.Caption = "流程图";
                picview.Visible = true;
                //picview.MaxWidth = 300;
                //picview.MinWidth = 300;
                gridControl1.RepositoryItems.Add(imageEdit1);

                picview.ColumnEdit = imageEdit1;
                //DevExpress.XtraEditors.Repository.RepositoryItem

                this.picview.VisibleIndex = 2;
                picview.FieldName = "Image";
                gridView1.Columns.Add(picview);
                ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
                ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).EndInit();
            }
           
        }
Exemplo n.º 11
0
        private void InitContr()
        {
            if (dsLoad != null)
            {
                return;
            }

            dsLoad = this.GetFrmLoadDs(drBtn["AddFromOrdClassName"].ToString());
            dsLoad.AcceptChanges();
            dtShow  = dsLoad.Tables[0];
            dtConst = dsLoad.Tables[1];

            if (drBtn["AddFromOrdShowIcon"].ToString() == "True")
            {
                GridColumn gridCol             = new GridColumn();
                RepositoryItemImageEdit repImg = new RepositoryItemImageEdit();
                repImg.AutoHeight = false;
                repImg.Buttons.Clear();
                repImg.Name             = "gridVInfo_repImg";
                repImg.PopupFormMinSize = new System.Drawing.Size(450, 350);
                repImg.ReadOnly         = true;
                repImg.Popup           += new System.EventHandler(this.repImg_Popup);

                gridCol.Caption    = "图片";
                gridCol.ColumnEdit = repImg;
                gridCol.FieldName  = "Icon";
                gridCol.Name       = "gridVInfo_GCol";
                gridCol.OptionsColumn.AllowMove  = false;
                gridCol.OptionsColumn.ReadOnly   = true;
                gridCol.OptionsColumn.FixedWidth = true;
                gridCol.Visible      = true;
                gridCol.VisibleIndex = 0;
                gridCol.Width        = 50;

                this.gridCInfo.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                    repImg
                });
                gridVInfo.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridCol });
            }
            else if (drBtn["AddFromOrdShowPic"].ToString() == "True")
            {
                GridColumn gridCol = new GridColumn();
                RepositoryItemPictureEdit repPic = new RepositoryItemPictureEdit();
                repPic.Name        = "gridVInfo_repPic";
                repPic.ReadOnly    = true;
                repPic.ShowMenu    = false;
                repPic.SizeMode    = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom;
                repPic.MouseEnter += new System.EventHandler(this.repPic_MouseEnter);
                repPic.MouseLeave += new System.EventHandler(this.repPic_MouseLeave);
                repPic.MouseHover += new EventHandler(repPic_MouseHover);

                gridCol.Caption    = "图片";
                gridCol.ColumnEdit = repPic;
                gridCol.FieldName  = "Icon";
                gridCol.Name       = "gridVInfo_GCol";
                gridCol.OptionsColumn.AllowMove  = false;
                gridCol.OptionsColumn.ReadOnly   = true;
                gridCol.OptionsColumn.FixedWidth = true;
                gridCol.Visible      = true;
                gridCol.VisibleIndex = 0;
                gridCol.Width        = int.Parse(drBtn["AddFromOrdClassPicColWidth"].ToString());

                this.gridCInfo.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                    repPic
                });
                gridVInfo.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridCol });

                this.gridVInfo.RowHeight = int.Parse(drBtn["AddFromOrdClassGvRowHeight"].ToString());
            }
            this.gridVInfo.OptionsView.ShowFooter        = drBtn["AddFromOrdClassGvShowFoot"].ToString() == "True";
            this.gridVInfo.OptionsView.ShowAutoFilterRow = drBtn["AddFromOrdClassGvShowFilter"].ToString() == "True";
            this.gridVInfo.OptionsView.ShowViewCaption   = drBtn["AddFromOrdClassGvShowCaption"].ToString() == "True";
            this.gridVInfo.ViewCaption = drBtn["AddFromOrdViewCaption"].ToString() + " ";

            this.picEdit.Location = new System.Drawing.Point(int.Parse(drBtn["AddFromOrdClassPicX"].ToString()), int.Parse(drBtn["AddFromOrdClassPicY"].ToString()));
            this.picEdit.Visible  = drBtn["ShowPicEditAllow"].ToString() == "True";
            StaticFunctions.ShowGridControl(gridVInfo, dtShow, dtConst, out strFileds);

            if (drBtn["AddFromOrdShowSetBtn"].ToString() == "True")
            {
                btnSetAll.Visible  = true;
                btnSetAll.Text     = drBtn["AddFromOrdClassSBtnText"].ToString();
                btnSetAll.Location = new System.Drawing.Point(int.Parse(drBtn["AddFromOrdClassSBtnPX"].ToString()), int.Parse(drBtn["AddFromOrdClassSBtnPY"].ToString()));
                btnSetAll.Size     = new System.Drawing.Size(int.Parse(drBtn["AddFromOrdClassSBtnSW"].ToString()), int.Parse(drBtn["AddFromOrdClassSBtnSH"].ToString()));

                btnClearAll.Visible  = true;
                btnClearAll.Text     = drBtn["AddFromOrdClassCBtnText"].ToString();
                btnClearAll.Location = new System.Drawing.Point(int.Parse(drBtn["AddFromOrdClassCBtnPX"].ToString()), int.Parse(drBtn["AddFromOrdClassCBtnPY"].ToString()));
                btnClearAll.Size     = new System.Drawing.Size(int.Parse(drBtn["AddFromOrdClassCBtnSW"].ToString()), int.Parse(drBtn["AddFromOrdClassCBtnSH"].ToString()));
            }

            int            igcHeight;
            Rectangle      rect        = SystemInformation.VirtualScreen;
            List <Control> lisGcContrs = StaticFunctions.ShowGroupControl(gcQuery, rect.Width - 50, dtShow, dtConst, true, 30, false, null, true, out igcHeight);

            if (lisGcContrs.Count == 0)
            {
                gcQuery.Visible = false;
            }
            else
            {
                gcQuery.Visible = true;
            }
        }
Exemplo n.º 12
0
        private void InitializeComponent()
        {
            components = new Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(MainForm));

            barManager1               = new BarManager(components);
            _mainFunctionsBar         = new Bar();
            btFaces                   = new BarLargeButtonItem();
            btObjects                 = new BarLargeButtonItem();
            btCategories              = new BarLargeButtonItem();
            btWorkStations            = new BarLargeButtonItem();
            btSearch                  = new BarLargeButtonItem();
            btLogSearch               = new BarLargeButtonItem();
            btResults                 = new BarLargeButtonItem();
            btStatistic               = new BarLargeButtonItem();
            btSettings                = new BarLargeButtonItem();
            btUsers                   = new BarLargeButtonItem();
            btQueryTemplates          = new BarLargeButtonItem();
            barDockControlTop         = new BarDockControl();
            barDockControlBottom      = new BarDockControl();
            barDockControlLeft        = new BarDockControl();
            barDockControlRight       = new BarDockControl();
            repositoryItemImageEdit1  = new RepositoryItemImageEdit();
            repositoryItemButtonEdit1 = new RepositoryItemButtonEdit();
            repositoryItemTextEdit1   = new RepositoryItemTextEdit();
            repositoryItemDateEdit1   = new RepositoryItemDateEdit();
            bar1            = new Bar();
            bar3            = new Bar();
            barManager2     = new BarManager(components);
            barDockControl4 = new BarDockControl();
            barManager1.BeginInit();
            repositoryItemImageEdit1.BeginInit();
            repositoryItemButtonEdit1.BeginInit();
            repositoryItemTextEdit1.BeginInit();
            repositoryItemDateEdit1.BeginInit();
            repositoryItemDateEdit1.CalendarTimeProperties.BeginInit();
            barManager2.BeginInit();
            SuspendLayout();
            barManager1.AllowCustomization    = false;
            barManager1.AllowMoveBarOnToolbar = false;
            barManager1.Bars.AddRange(new Bar[1]
            {
                _mainFunctionsBar
            });
            barManager1.CloseButtonAffectAllTabs = false;
            barManager1.DockControls.Add(barDockControlTop);
            barManager1.DockControls.Add(barDockControlBottom);
            barManager1.DockControls.Add(barDockControlLeft);
            barManager1.DockControls.Add(barDockControlRight);
            barManager1.Form = this;
            barManager1.Items.AddRange(new BarItem[11]
            {
                btFaces,
                btObjects,
                btCategories,
                btWorkStations,
                btSearch,
                btStatistic,
                btSettings,
                btResults,
                btUsers,
                btLogSearch,
                btQueryTemplates
            });
            barManager1.MainMenu  = _mainFunctionsBar;
            barManager1.MaxItemId = 42;
            barManager1.RepositoryItems.AddRange(new RepositoryItem[4]
            {
                repositoryItemImageEdit1,
                repositoryItemButtonEdit1,
                repositoryItemTextEdit1,
                repositoryItemDateEdit1
            });
            barManager1.ShowFullMenus            = true;
            barManager1.ShowScreenTipsInToolbars = false;
            barManager1.ShowShortcutInScreenTips = false;
            _mainFunctionsBar.BarItemHorzIndent  = 5;
            _mainFunctionsBar.BarItemVertIndent  = 5;
            _mainFunctionsBar.BarName            = "Main menu";
            _mainFunctionsBar.CanDockStyle       = BarCanDockStyle.Top;
            _mainFunctionsBar.DockCol            = 0;
            _mainFunctionsBar.DockRow            = 0;
            _mainFunctionsBar.DockStyle          = BarDockStyle.Top;
            _mainFunctionsBar.LinksPersistInfo.AddRange(new LinkPersistInfo[11]
            {
                new LinkPersistInfo(btFaces),
                new LinkPersistInfo(btObjects),
                new LinkPersistInfo(BarLinkUserDefines.PaintStyle, btCategories, BarItemPaintStyle.CaptionGlyph),
                new LinkPersistInfo(BarLinkUserDefines.PaintStyle, btWorkStations, BarItemPaintStyle.CaptionGlyph),
                new LinkPersistInfo(BarLinkUserDefines.PaintStyle, btSearch, BarItemPaintStyle.CaptionGlyph),
                new LinkPersistInfo(btLogSearch),
                new LinkPersistInfo(btResults),
                new LinkPersistInfo(btStatistic),
                new LinkPersistInfo(btSettings),
                new LinkPersistInfo(btUsers),
                new LinkPersistInfo(btQueryTemplates)
            });
            _mainFunctionsBar.OptionsBar.AllowQuickCustomization = false;
            _mainFunctionsBar.OptionsBar.DisableCustomization    = true;
            _mainFunctionsBar.OptionsBar.DrawDragBorder          = false;
            _mainFunctionsBar.OptionsBar.RotateWhenVertical      = false;
            _mainFunctionsBar.OptionsBar.UseWholeRow             = true;
            componentResourceManager.ApplyResources(_mainFunctionsBar, "_mainFunctionsBar");
            btFaces.ActAsDropDown = true;
            btFaces.AllowAllUp    = true;
            btFaces.Border        = BorderStyles.Default;
            componentResourceManager.ApplyResources(btFaces, "btFaces");
            btFaces.DropDownEnabled = false;
            btFaces.Enabled         = false;
            btFaces.Glyph           = Resources.Apps_system_users_icon48;
            btFaces.Id              = 26;
            btFaces.MinSize         = new Size(115, 80);
            btFaces.Name            = "btFaces";
            btFaces.PaintStyle      = BarItemPaintStyle.CaptionGlyph;
            btFaces.ItemClick      += btFaces_ItemClick;
            btObjects.ActAsDropDown = true;
            btObjects.AllowAllUp    = true;
            btObjects.Border        = BorderStyles.Default;
            componentResourceManager.ApplyResources(btObjects, "btObjects");
            btObjects.DropDownEnabled = false;
            btObjects.Enabled         = false;
            btObjects.Glyph           = Resources.Company_icon;
            btObjects.Id               = 23;
            btObjects.MinSize          = new Size(115, 80);
            btObjects.Name             = "btObjects";
            btObjects.PaintStyle       = BarItemPaintStyle.CaptionGlyph;
            btObjects.ItemClick       += btObjects_ItemClick;
            btCategories.ActAsDropDown = true;
            btCategories.AllowAllUp    = true;
            btCategories.Border        = BorderStyles.Default;
            componentResourceManager.ApplyResources(btCategories, "btCategories");
            btCategories.DropDownEnabled = false;
            btCategories.Enabled         = false;
            btCategories.Glyph           = Resources.Apps_preferences_desktop_user_password_icon64;
            btCategories.Id              = 31;
            btCategories.MinSize         = new Size(115, 80);
            btCategories.Name            = "btCategories";
            btCategories.PaintStyle      = BarItemPaintStyle.CaptionGlyph;
            btCategories.ItemClick      += btCategories_ItemClick;
            btWorkStations.ActAsDropDown = true;
            btWorkStations.AllowAllUp    = true;
            btWorkStations.Border        = BorderStyles.Default;
            componentResourceManager.ApplyResources(btWorkStations, "btWorkStations");
            btWorkStations.DropDownEnabled = false;
            btWorkStations.Enabled         = false;
            btWorkStations.Glyph           = Resources.Computer_2;
            btWorkStations.Id         = 29;
            btWorkStations.MinSize    = new Size(115, 80);
            btWorkStations.Name       = "btWorkStations";
            btWorkStations.PaintStyle = BarItemPaintStyle.CaptionGlyph;
            btWorkStations.ItemClick += btWorkStations_ItemClick;
            btSearch.ActAsDropDown    = true;
            btSearch.AllowAllUp       = true;
            btSearch.Border           = BorderStyles.Default;
            componentResourceManager.ApplyResources(btSearch, "btSearch");
            btSearch.DropDownEnabled = false;
            btSearch.Enabled         = false;
            btSearch.Glyph           = Resources.Search64;
            btSearch.Id = 32;
            btSearch.ItemAppearance.Normal.Options.UseTextOptions = true;
            btSearch.ItemAppearance.Normal.TextOptions.WordWrap   = WordWrap.Wrap;
            btSearch.MinSize        = new Size(115, 80);
            btSearch.Name           = "btSearch";
            btSearch.PaintStyle     = BarItemPaintStyle.CaptionGlyph;
            btSearch.ItemClick     += btSearch_ItemClick;
            btLogSearch.Border      = BorderStyles.Default;
            btLogSearch.ButtonStyle = BarButtonStyle.Check;
            componentResourceManager.ApplyResources(btLogSearch, "btLogSearch");
            btLogSearch.Enabled     = false;
            btLogSearch.Glyph       = Resources.CamImage;
            btLogSearch.Id          = 38;
            btLogSearch.MinSize     = new Size(115, 80);
            btLogSearch.Name        = "btLogSearch";
            btLogSearch.PaintStyle  = BarItemPaintStyle.CaptionGlyph;
            btLogSearch.ItemClick  += barLargeButtonItem1_ItemClick;
            btResults.ActAsDropDown = true;
            btResults.AllowAllUp    = true;
            btResults.Border        = BorderStyles.Default;
            componentResourceManager.ApplyResources(btResults, "btResults");
            btResults.DropDownEnabled = false;
            btResults.Enabled         = false;
            btResults.Glyph           = Resources.Info64;
            btResults.Id              = 28;
            btResults.MinSize         = new Size(115, 80);
            btResults.Name            = "btResults";
            btResults.PaintStyle      = BarItemPaintStyle.CaptionGlyph;
            btResults.ItemClick      += btResults_ItemClick;
            btStatistic.ActAsDropDown = true;
            btStatistic.AllowAllUp    = true;
            btStatistic.Border        = BorderStyles.Default;
            componentResourceManager.ApplyResources(btStatistic, "btStatistic");
            btStatistic.DropDownEnabled = false;
            btStatistic.Enabled         = false;
            btStatistic.Glyph           = Resources.statistics64;
            btStatistic.Id           = 2;
            btStatistic.MinSize      = new Size(115, 80);
            btStatistic.Name         = "btStatistic";
            btStatistic.PaintStyle   = BarItemPaintStyle.CaptionGlyph;
            btStatistic.ItemClick   += biJornal_ItemClick;
            btSettings.ActAsDropDown = true;
            btSettings.AllowAllUp    = true;
            btSettings.Border        = BorderStyles.Default;
            componentResourceManager.ApplyResources(btSettings, "btSettings");
            btSettings.DropDownEnabled = false;
            btSettings.Enabled         = false;
            btSettings.Glyph           = Resources.ProfileFaces48;
            btSettings.Id                 = 0;
            btSettings.ImageIndex         = 0;
            btSettings.ImageIndexDisabled = 0;
            btSettings.ItemAppearance.Normal.Options.UseTextOptions = true;
            btSettings.ItemAppearance.Normal.TextOptions.WordWrap   = WordWrap.Wrap;
            btSettings.LargeImageIndex         = 0;
            btSettings.LargeImageIndexDisabled = 0;
            btSettings.MinSize    = new Size(115, 80);
            btSettings.Name       = "btSettings";
            btSettings.PaintStyle = BarItemPaintStyle.CaptionGlyph;
            btSettings.Visibility = BarItemVisibility.Never;
            btSettings.ItemClick += btSettings_ItemClick;
            btUsers.ActAsDropDown = true;
            btUsers.AllowAllUp    = true;
            btUsers.Border        = BorderStyles.Default;
            componentResourceManager.ApplyResources(btUsers, "btUsers");
            btUsers.DropDownEnabled = false;
            btUsers.Enabled         = false;
            btUsers.Glyph           = Resources.user_info64;
            btUsers.Id                   = 27;
            btUsers.MinSize              = new Size(115, 80);
            btUsers.Name                 = "btUsers";
            btUsers.PaintStyle           = BarItemPaintStyle.CaptionGlyph;
            btUsers.ItemClick           += btUsers_ItemClick;
            btQueryTemplates.Border      = BorderStyles.Default;
            btQueryTemplates.ButtonStyle = BarButtonStyle.Check;
            componentResourceManager.ApplyResources(btQueryTemplates, "btQueryTemplates");
            btQueryTemplates.DropDownEnabled = false;
            btQueryTemplates.Enabled         = false;
            btQueryTemplates.Glyph           = Resources.SQL64;
            btQueryTemplates.Id                = 39;
            btQueryTemplates.MinSize           = new Size(100, 0);
            btQueryTemplates.Name              = "btQueryTemplates";
            btQueryTemplates.PaintStyle        = BarItemPaintStyle.CaptionGlyph;
            btQueryTemplates.Visibility        = BarItemVisibility.Never;
            btQueryTemplates.ItemClick        += btQueryTemplates_ItemClick;
            barDockControlTop.CausesValidation = false;
            componentResourceManager.ApplyResources(barDockControlTop, "barDockControlTop");
            barDockControlBottom.CausesValidation = false;
            componentResourceManager.ApplyResources(barDockControlBottom, "barDockControlBottom");
            barDockControlLeft.CausesValidation = false;
            componentResourceManager.ApplyResources(barDockControlLeft, "barDockControlLeft");
            barDockControlRight.CausesValidation = false;
            componentResourceManager.ApplyResources(barDockControlRight, "barDockControlRight");
            componentResourceManager.ApplyResources(repositoryItemImageEdit1, "repositoryItemImageEdit1");
            repositoryItemImageEdit1.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton((ButtonPredefines)componentResourceManager.GetObject("repositoryItemImageEdit1.Buttons"))
            });
            repositoryItemImageEdit1.Name = "repositoryItemImageEdit1";
            componentResourceManager.ApplyResources(repositoryItemButtonEdit1, "repositoryItemButtonEdit1");
            repositoryItemButtonEdit1.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton()
            });
            repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1";
            componentResourceManager.ApplyResources(repositoryItemTextEdit1, "repositoryItemTextEdit1");
            repositoryItemTextEdit1.Name = "repositoryItemTextEdit1";
            componentResourceManager.ApplyResources(repositoryItemDateEdit1, "repositoryItemDateEdit1");
            repositoryItemDateEdit1.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton((ButtonPredefines)componentResourceManager.GetObject("repositoryItemDateEdit1.Buttons"))
            });
            repositoryItemDateEdit1.CalendarTimeProperties.Buttons.AddRange(new EditorButton[1]
            {
                new EditorButton()
            });
            repositoryItemDateEdit1.Name              = "repositoryItemDateEdit1";
            bar1.BarAppearance.Normal.Font            = (Font)componentResourceManager.GetObject("bar1.BarAppearance.Normal.Font");
            bar1.BarAppearance.Normal.Options.UseFont = true;
            bar1.BarName   = "Main menu";
            bar1.DockCol   = 0;
            bar1.DockRow   = 0;
            bar1.DockStyle = BarDockStyle.Top;
            bar1.LinksPersistInfo.AddRange(new LinkPersistInfo[2]
            {
                new LinkPersistInfo(btSettings),
                new LinkPersistInfo(btStatistic)
            });
            bar1.OptionsBar.UseWholeRow = true;
            componentResourceManager.ApplyResources(bar1, "bar1");
            bar3.BarAppearance.Normal.Font            = (Font)componentResourceManager.GetObject("bar3.BarAppearance.Normal.Font");
            bar3.BarAppearance.Normal.Options.UseFont = true;
            bar3.BarName   = "Main menu";
            bar3.DockCol   = 0;
            bar3.DockRow   = 0;
            bar3.DockStyle = BarDockStyle.Top;
            bar3.OptionsBar.UseWholeRow = true;
            componentResourceManager.ApplyResources(bar3, "bar3");
            barManager2.AllowCustomization       = false;
            barManager2.AllowMoveBarOnToolbar    = false;
            barManager2.AllowShowToolbarsPopup   = false;
            barManager2.CloseButtonAffectAllTabs = false;
            barManager2.DockingEnabled           = false;
            barManager2.Form                    = this;
            barManager2.MaxItemId               = 0;
            barManager2.ShowCloseButton         = true;
            barManager2.ShowFullMenus           = true;
            barManager2.ShowFullMenusAfterDelay = false;
            barDockControl4.CausesValidation    = false;
            componentResourceManager.ApplyResources(barDockControl4, "barDockControl4");
            Appearance.Options.UseFont = true;
            componentResourceManager.ApplyResources(this, "$this");
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(barDockControlLeft);
            Controls.Add(barDockControlRight);
            Controls.Add(barDockControlBottom);
            Controls.Add(barDockControlTop);
            IsMdiContainer = true;
            KeyPreview     = true;
            Name           = "MainForm";
            SizeGripStyle  = SizeGripStyle.Hide;
            WindowState    = FormWindowState.Maximized;
            FormClosing   += EmplooyersForm_FormClosing;
            Load          += EmplooyersForm_Load;
            barManager1.EndInit();
            repositoryItemImageEdit1.EndInit();
            repositoryItemButtonEdit1.EndInit();
            repositoryItemTextEdit1.EndInit();
            repositoryItemDateEdit1.CalendarTimeProperties.EndInit();
            repositoryItemDateEdit1.EndInit();
            barManager2.EndInit();
            ResumeLayout(false);
        }
Exemplo n.º 13
0
        public void ВыставитьТипСтолбца(СтолбецМетаструктуры СтолбецМетастуктуры, ОтчетнаяФормаДанных ОтчетнаяФорма)
        {
            RepositoryItem item = null;
            ОписаниеМножественнойСсылкиНаСправочник справочник;
            ОписаниеСсылкиНаСправочник справочник2;

            this.описаниеЯчейки = СтолбецМетастуктуры.ОписаниеТипаЯчейки;
            if (СтолбецМетастуктуры.Тип.IsSubclassOf(typeof(ОбщийЧисловойТип)))
            {
                Type   type          = СтолбецМетастуктуры.Тип;
                int    num           = 0;
                string str           = "";
                string displayFormat = "";
                if (type == typeof(ФинансовыйТип))
                {
                    num = 2;
                }
                else if (type == typeof(ЦелочисленныйТип))
                {
                    num = 0;
                }
                else if ((type == typeof(ЧисловойТип)) && ((this.описаниеЯчейки != null) && (this.описаниеЯчейки is ОписаниеЧисловогоТипа)))
                {
                    num = (this.описаниеЯчейки as ОписаниеЧисловогоТипа).Точность;
                }
                if (num == 0)
                {
                    str = "N00";
                }
                else
                {
                    str = "N" + num.ToString();
                }
                displayFormat                  = "{" + string.Format("0:{0}", str) + "}";
                this.СтрокаФорматирования      = str;
                base.SummaryItem.SummaryType   = SummaryItemType.Sum;
                base.SummaryItem.DisplayFormat = displayFormat;
                base.UnboundType               = UnboundColumnType.Decimal;
                едакторЧислаДинамическойТаблицы таблицы = new  едакторЧислаДинамическойТаблицы();
                таблицы.DisplayFormat.FormatString = displayFormat;
                if (base.View != null)
                {
                    base.View.GroupSummary.Add(new GridGroupSummaryItem(SummaryItemType.Sum, base.FieldName, this, displayFormat));
                }
                item = таблицы;
                goto Label_0679;
            }
            if (СтолбецМетастуктуры.Тип == typeof(ТипДатаВремя))
            {
                base.UnboundType = UnboundColumnType.DateTime;
                if (СтолбецМетастуктуры.ОписаниеТипаЯчейки is ОписаниеТипаДатаВремя)
                {
                    RepositoryItem        item2 = null;
                    ОписаниеТипаДатаВремя время = СтолбецМетастуктуры.ОписаниеТипаЯчейки as ОписаниеТипаДатаВремя;
                    if (время.едакторВремени)
                    {
                        item2 = new RepositoryItemTimeEdit();
                    }
                    else
                    {
                        item2 = new  едакторДатыДинамическойТаблицы();
                        if (!string.IsNullOrEmpty(время.ФорматОтображения))
                        {
                            (item2 as  едакторДатыДинамическойТаблицы).Mask.MaskType = MaskType.DateTime;
                            (item2 as  едакторДатыДинамическойТаблицы).Mask.EditMask = время.ФорматОтображения;
                            (item2 as  едакторДатыДинамическойТаблицы).Mask.UseMaskAsDisplayFormat = true;
                        }
                    }
                    item = item2;
                }
                else
                {
                    едакторДатыДинамическойТаблицы таблицы2 = new  едакторДатыДинамическойТаблицы();
                    item = таблицы2;
                }
                goto Label_0679;
            }
            if (СтолбецМетастуктуры.Тип == typeof(ТипИзображение))
            {
                base.UnboundType = UnboundColumnType.Object;
                RepositoryItemImageEdit edit = new RepositoryItemImageEdit();
                edit.NullText = string.Empty;
                edit.ShowIcon = true;
                edit.SizeMode = PictureSizeMode.Stretch;
                item          = edit;
                goto Label_0679;
            }
            if (СтолбецМетастуктуры.Тип == typeof(СтроковыйТип))
            {
                if ((this.описаниеЯчейки != null) && (this.описаниеЯчейки is ОписаниеСтроковогоТипаЯчейки))
                {
                    ОписаниеСтроковогоТипаЯчейки ячейки = this.описаниеЯчейки as ОписаниеСтроковогоТипаЯчейки;
                    if (!string.IsNullOrEmpty(ячейки.МаскаВвода))
                    {
                        ПолеВводаТекста текста = new ПолеВводаТекста();
                        текста.Mask.MaskType               = MaskType.RegEx;
                        текста.Mask.EditMask               = ячейки.МаскаВвода;
                        текста.Mask.ShowPlaceHolders       = true;
                        текста.Mask.UseMaskAsDisplayFormat = true;
                        текста.Mask.IgnoreMaskBlank        = false;
                        item = текста;
                    }
                    else if (ячейки.МногострочныйРедактор)
                    {
                        ВыпадающийТекст текст = new ВыпадающийТекст();
                        item = текст;
                    }
                    else
                    {
                        base.UnboundType = UnboundColumnType.String;
                    }
                }
                else
                {
                    base.UnboundType = UnboundColumnType.String;
                }
                goto Label_0679;
            }
            if (СтолбецМетастуктуры.Тип == typeof(ЛогическийТип))
            {
                this.ТипЭлементаДляВыбора = typeof(Учреждение);
                base.UnboundType          = UnboundColumnType.Boolean;
                едакторФлажокДинамическойТаблицы таблицы3 = new  едакторФлажокДинамическойТаблицы();
                item = таблицы3;
                goto Label_0679;
            }
            if ((СтолбецМетастуктуры.Тип != typeof(СсылкаНаСправочник)) && (СтолбецМетастуктуры.Тип != typeof(МножественнаяСсылкаНаСправочник)))
            {
                goto Label_0679;
            }
            ВыборИзСправочника справочника = new ВыборИзСправочника();

            if ((this.описаниеЯчейки != null) && ((this.описаниеЯчейки is ОписаниеСсылкиНаСправочник) || (this.описаниеЯчейки is ОписаниеМножественнойСсылкиНаСправочник)))
            {
                справочник  = null;
                справочник2 = null;
                string str3 = "";
                if (this.описаниеЯчейки is ОписаниеМножественнойСсылкиНаСправочник)
                {
                    справочник = this.описаниеЯчейки as ОписаниеМножественнойСсылкиНаСправочник;
                    str3       = справочник.КодСправочника;
                }
                else if (this.описаниеЯчейки is ОписаниеСсылкиНаСправочник)
                {
                    справочник2 = this.описаниеЯчейки as ОписаниеСсылкиНаСправочник;
                    str3        = справочник2.КодСправочника;
                }
                string str4 = str3.Trim().ToLower();
                if (str4 == null)
                {
                    goto Label_057D;
                }
                if (!(str4 == "учреждение"))
                {
                    if (str4 == "типучреждения")
                    {
                        this.ТипЭлементаДляВыбора = typeof(ТипУчреждения);
                        this.ИсточникДанных       = null;
                        goto Label_0643;
                    }
                    if (str4 == "видучреждения")
                    {
                        this.ТипЭлементаДляВыбора = typeof(ВидУчреждения);
                        this.ИсточникДанных       = null;
                        goto Label_0643;
                    }
                    goto Label_057D;
                }
                this.ТипЭлементаДляВыбора = typeof(Учреждение);
                this.ИсточникДанных       = null;
            }
            goto Label_0643;
Label_057D:
            this.ТипЭлементаДляВыбора = null;
            if (справочник != null)
            {
                ВыборЗаписейСправочника справочника2 = new ВыборЗаписейСправочника(ежимВыбораЭлементовСпискаВыбора.Множественный);
                справочника2.ОписаниеСсылки = справочник;
                if ((ОтчетнаяФорма != null) && (ОтчетнаяФорма.КомпонентОтчетногоПериода != null))
                {
                    справочника2.ДатаАктуальности = ОтчетнаяФорма.КомпонентОтчетногоПериода.ОтчетныйПериод.ДатаНачала;
                }
                this.ИсточникДанных = справочника2;
            }
            else if (справочник2 != null)
            {
                ВыборИзУниверсальногоСправочника справочника3 = new ВыборИзУниверсальногоСправочника();
                справочника3.ОписаниеСсылки = справочник2;
                if ((ОтчетнаяФорма != null) && (ОтчетнаяФорма.КомпонентОтчетногоПериода != null))
                {
                    справочника3.ДатаАктуальности = ОтчетнаяФорма.КомпонентОтчетногоПериода.ОтчетныйПериод.ДатаНачала;
                }
                this.ИсточникДанных = справочника3;
            }
Label_0643:
            base.UnboundType = UnboundColumnType.Object;
            base.SortMode    = ColumnSortMode.DisplayText;
            base.FilterMode  = ColumnFilterMode.DisplayText;
            base.OptionsColumn.AllowGroup = DefaultBoolean.True;
            base.OptionsColumn.AllowSort  = DefaultBoolean.True;
            item = справочника;
Label_0679:
            base.ColumnEdit = item;
        }
Exemplo n.º 14
0
        private void InitContr()
        {
            if (dsLoad != null)
            {
                return;
            }

            dsLoad = this.GetFrmLoadDs(drBtn["FrmClassName"].ToString());
            dsLoad.AcceptChanges();
            dtShow  = dsLoad.Tables[0];
            dtConst = dsLoad.Tables[1];
            if (drBtn["FrmShowIcon"].ToString() == "True")
            {
                GridColumn gridCol             = new GridColumn();
                RepositoryItemImageEdit repImg = new RepositoryItemImageEdit();
                repImg.AutoHeight = false;
                repImg.Buttons.Clear();
                repImg.Name             = "gridVInfo_repImg";
                repImg.PopupFormMinSize = new System.Drawing.Size(450, 350);
                repImg.ReadOnly         = true;
                repImg.Popup           += new System.EventHandler(this.repImg_Popup);

                gridCol.Caption    = "图片";
                gridCol.ColumnEdit = repImg;
                gridCol.FieldName  = "Icon";
                gridCol.Name       = "gridVInfo_GCol";
                gridCol.OptionsColumn.AllowMove  = false;
                gridCol.OptionsColumn.ReadOnly   = true;
                gridCol.OptionsColumn.FixedWidth = true;
                gridCol.Visible      = true;
                gridCol.VisibleIndex = 0;
                gridCol.Width        = 50;

                this.gridCInfo.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                    repImg
                });
                gridVInfo.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridCol });
            }

            int       igcHeight;
            Rectangle rect = SystemInformation.VirtualScreen;

            StaticFunctions.ShowGridControl(gridVInfo, dtShow, dtConst, out strFileds);
            IsAddChildGv = this.drBtn["IsAddChildGv"].ToString() == "True";
            if (IsAddChildGv)
            {
                gvChild = StaticFunctions.ShowGridVChildGv("gridVCom", gridCInfo, dtShow, dtConst, out strFiledsInfo);
            }
            List <Control> lisGcContrs = StaticFunctions.ShowGroupControl(gcQuery, rect.Width - 50, dtShow, dtConst, true, 30, false, null, true, out igcHeight);

            this.picEdit.Visible = drBtn["FrmShowPicEdit"].ToString() == "True";
            if (drBtn["FrmShowPicEdit"].ToString() == "True")
            {
                int iSizeX = int.Parse(drBtn["FrmPicX"].ToString());
                if (iSizeX != 0)
                {
                    this.picEdit.Location = new System.Drawing.Point(iSizeX, int.Parse(drBtn["FrmPicY"].ToString()));
                }
                else
                {
                    iSizeX = int.Parse(drBtn["FrmSizeX"].ToString());
                    if (iSizeX == 0)
                    {
                        this.picEdit.Location = new System.Drawing.Point(rect.Width - picEdit.Width - 30, gridCInfo.Location.Y + 50);
                    }
                    else
                    {
                        this.picEdit.Location = new System.Drawing.Point(iSizeX - picEdit.Width - 30, gridCInfo.Location.Y + 50);
                    }
                }
            }
        }
Exemplo n.º 15
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)
            {
            }
        }
Exemplo n.º 16
0
 private void InitializeComponent()
 {
     this.components          = (IContainer) new Container();
     this.atButtonsPanel1     = new atButtonsPanel();
     this.MenuItem            = new ContextMenuStrip(this.components);
     this.MenuItemAdd         = new ToolStripMenuItem();
     this.MenuItemEdit        = new ToolStripMenuItem();
     this.toolStripSeparator1 = new ToolStripSeparator();
     this.MenuItemDoublicate  = new ToolStripMenuItem();
     this.toolStripSeparator2 = new ToolStripSeparator();
     this.MenuItemRemove      = new ToolStripMenuItem();
     this.toolStripSeparator3 = new ToolStripSeparator();
     this.MenuItemMoveToGroup = new ToolStripMenuItem();
     this.ds = new ds_error();
     this.atButtonsPanelDialog = new atButtonsPanel();
     this.atTreeGroup1         = new AtTreeGroup();
     this.splitterControl1     = new SplitterControl();
     this.gridControlError     = new GridControl();
     this.gridViewError        = new GridView();
     this.coliderror           = new GridColumn();
     this.colcode             = new GridColumn();
     this.colname             = new GridColumn();
     this.colerrortype_name   = new GridColumn();
     this.ButtonEditErrorType = new RepositoryItemButtonEdit();
     this.colmessage1         = new GridColumn();
     this.colmessage2         = new GridColumn();
     this.colmessage3         = new GridColumn();
     this.colunpack_picture   = new GridColumn();
     this.ImageEditPic        = new RepositoryItemImageEdit();
     this.colcomment          = new GridColumn();
     this.colshowtype_name    = new GridColumn();
     this.cboShowType         = new RepositoryItemComboBox();
     this.colissave           = new GridColumn();
     this.atButtonsPanel1.BeginInit();
     this.MenuItem.SuspendLayout();
     this.ds.BeginInit();
     this.atButtonsPanelDialog.BeginInit();
     this.atTreeGroup1.BeginInit();
     this.gridControlError.BeginInit();
     this.gridViewError.BeginInit();
     this.ButtonEditErrorType.BeginInit();
     this.ImageEditPic.BeginInit();
     this.cboShowType.BeginInit();
     this.SuspendLayout();
     this.atButtonsPanel1.AcceptButton                = atButtonsPanel.bpButtons.None;
     this.atButtonsPanel1.CancelButton                = atButtonsPanel.bpButtons.None;
     this.atButtonsPanel1.CancelButtonText            = "";
     this.atButtonsPanel1.CancelButtonUseCancelSelect = true;
     this.atButtonsPanel1.CancelButtonVisible         = true;
     this.atButtonsPanel1.CloseButtonText             = "";
     this.atButtonsPanel1.CloseButtonUseCancelSelect  = false;
     this.atButtonsPanel1.CloseButtonVisible          = false;
     this.atButtonsPanel1.DataMember                 = (string)null;
     this.atButtonsPanel1.DataSource                 = (DataSet)null;
     this.atButtonsPanel1.Dock                       = DockStyle.Bottom;
     this.atButtonsPanel1.EnabledCancelButton        = true;
     this.atButtonsPanel1.EnabledCloseButton         = true;
     this.atButtonsPanel1.EnabledPrintButton         = true;
     this.atButtonsPanel1.EnabledRefreshButton       = true;
     this.atButtonsPanel1.EnabledSaveButton          = true;
     this.atButtonsPanel1.EnabledScriptButton        = true;
     this.atButtonsPanel1.IdDocAppearance            = 0;
     this.atButtonsPanel1.Location                   = new Point(0, 315);
     this.atButtonsPanel1.Name                       = "atButtonsPanel1";
     this.atButtonsPanel1.PrintButtonText            = "";
     this.atButtonsPanel1.PrintButtonVisible         = false;
     this.atButtonsPanel1.ProcessedIsDialog          = false;
     this.atButtonsPanel1.RefreshButtonText          = "Обновить";
     this.atButtonsPanel1.RefreshButtonUseSelectItem = true;
     this.atButtonsPanel1.RefreshButtonVisible       = true;
     this.atButtonsPanel1.SaveButtonText             = "Выбрать";
     this.atButtonsPanel1.SaveButtonUseSelectItem    = true;
     this.atButtonsPanel1.SaveButtonVisible          = true;
     this.atButtonsPanel1.ScriptButtonText           = "";
     this.atButtonsPanel1.ScriptButtonVisible        = false;
     this.atButtonsPanel1.Size                       = new Size(736, 33);
     this.atButtonsPanel1.TabIndex                   = 1;
     this.atButtonsPanel1.TextCancelButton           = "Отменить";
     this.atButtonsPanel1.TextCloseButton            = "Закрыть";
     this.atButtonsPanel1.TextPrintButton            = "Печать...";
     this.atButtonsPanel1.TextRefreshButton          = "Обновить";
     this.atButtonsPanel1.TextSaveButton             = "Применить";
     this.atButtonsPanel1.TextScriptButton           = "Скрипты...";
     this.atButtonsPanel1.VisibleCancelButton        = true;
     this.atButtonsPanel1.VisibleCloseButton         = true;
     this.atButtonsPanel1.VisiblePrintButton         = false;
     this.atButtonsPanel1.VisibleRefreshButton       = false;
     this.atButtonsPanel1.VisibleSaveButton          = true;
     this.atButtonsPanel1.VisibleScriptButton        = false;
     this.atButtonsPanel1.WidthPrintButton           = 75;
     this.MenuItem.Items.AddRange(new ToolStripItem[8]
     {
         (ToolStripItem)this.MenuItemAdd,
         (ToolStripItem)this.MenuItemEdit,
         (ToolStripItem)this.toolStripSeparator1,
         (ToolStripItem)this.MenuItemDoublicate,
         (ToolStripItem)this.toolStripSeparator2,
         (ToolStripItem)this.MenuItemRemove,
         (ToolStripItem)this.toolStripSeparator3,
         (ToolStripItem)this.MenuItemMoveToGroup
     });
     this.MenuItem.Name                                                 = "MenuItem";
     this.MenuItem.Size                                                 = new Size(228, 132);
     this.MenuItemAdd.Name                                              = "MenuItemAdd";
     this.MenuItemAdd.ShortcutKeys                                      = Keys.Insert | Keys.Control;
     this.MenuItemAdd.Size                                              = new Size(227, 22);
     this.MenuItemAdd.Text                                              = "Добавить";
     this.MenuItemAdd.Click                                            += new EventHandler(this.MenuItemAdd_Click);
     this.MenuItemEdit.Name                                             = "MenuItemEdit";
     this.MenuItemEdit.ShortcutKeys                                     = Keys.Return | Keys.Control;
     this.MenuItemEdit.Size                                             = new Size(227, 22);
     this.MenuItemEdit.Text                                             = "Редактировать";
     this.MenuItemEdit.Click                                           += new EventHandler(this.MenuItemEdit_Click);
     this.toolStripSeparator1.Name                                      = "toolStripSeparator1";
     this.toolStripSeparator1.Size                                      = new Size(224, 6);
     this.MenuItemDoublicate.Name                                       = "MenuItemDoublicate";
     this.MenuItemDoublicate.ShortcutKeys                               = Keys.Insert | Keys.Shift | Keys.Control;
     this.MenuItemDoublicate.Size                                       = new Size(227, 22);
     this.MenuItemDoublicate.Text                                       = "Дублировать";
     this.MenuItemDoublicate.Click                                     += new EventHandler(this.MenuItemDoublicate_Click);
     this.toolStripSeparator2.Name                                      = "toolStripSeparator2";
     this.toolStripSeparator2.Size                                      = new Size(224, 6);
     this.MenuItemRemove.Name                                           = "MenuItemRemove";
     this.MenuItemRemove.ShortcutKeys                                   = Keys.Delete | Keys.Control;
     this.MenuItemRemove.Size                                           = new Size(227, 22);
     this.MenuItemRemove.Text                                           = "Удалить";
     this.MenuItemRemove.Click                                         += new EventHandler(this.MenuItemRemove_Click);
     this.toolStripSeparator3.Name                                      = "toolStripSeparator3";
     this.toolStripSeparator3.Size                                      = new Size(224, 6);
     this.MenuItemMoveToGroup.Name                                      = "MenuItemMoveToGroup";
     this.MenuItemMoveToGroup.ShortcutKeys                              = Keys.M | Keys.Control;
     this.MenuItemMoveToGroup.Size                                      = new Size(227, 22);
     this.MenuItemMoveToGroup.Text                                      = "Переместить в группу";
     this.MenuItemMoveToGroup.Click                                    += new EventHandler(this.MenuItemMoveToGroup_Click);
     this.ds.DataSetName                                                = "ds_error";
     this.ds.EnforceConstraints                                         = false;
     this.ds.SchemaSerializationMode                                    = SchemaSerializationMode.IncludeSchema;
     this.atButtonsPanelDialog.AcceptButton                             = atButtonsPanel.bpButtons.None;
     this.atButtonsPanelDialog.CancelButton                             = atButtonsPanel.bpButtons.None;
     this.atButtonsPanelDialog.CancelButtonText                         = "";
     this.atButtonsPanelDialog.CancelButtonUseCancelSelect              = true;
     this.atButtonsPanelDialog.CancelButtonVisible                      = true;
     this.atButtonsPanelDialog.CloseButtonText                          = "";
     this.atButtonsPanelDialog.CloseButtonUseCancelSelect               = false;
     this.atButtonsPanelDialog.CloseButtonVisible                       = false;
     this.atButtonsPanelDialog.DataMember                               = (string)null;
     this.atButtonsPanelDialog.DataSource                               = (DataSet)null;
     this.atButtonsPanelDialog.Dock                                     = DockStyle.Bottom;
     this.atButtonsPanelDialog.EnabledCancelButton                      = true;
     this.atButtonsPanelDialog.EnabledCloseButton                       = true;
     this.atButtonsPanelDialog.EnabledPrintButton                       = true;
     this.atButtonsPanelDialog.EnabledRefreshButton                     = true;
     this.atButtonsPanelDialog.EnabledSaveButton                        = true;
     this.atButtonsPanelDialog.EnabledScriptButton                      = true;
     this.atButtonsPanelDialog.IdDocAppearance                          = 0;
     this.atButtonsPanelDialog.Location                                 = new Point(0, 282);
     this.atButtonsPanelDialog.Name                                     = "atButtonsPanelDialog";
     this.atButtonsPanelDialog.PrintButtonText                          = "";
     this.atButtonsPanelDialog.PrintButtonVisible                       = false;
     this.atButtonsPanelDialog.ProcessedIsDialog                        = false;
     this.atButtonsPanelDialog.RefreshButtonText                        = "Обновить";
     this.atButtonsPanelDialog.RefreshButtonUseSelectItem               = true;
     this.atButtonsPanelDialog.RefreshButtonVisible                     = true;
     this.atButtonsPanelDialog.SaveButtonText                           = "Выбрать";
     this.atButtonsPanelDialog.SaveButtonUseSelectItem                  = true;
     this.atButtonsPanelDialog.SaveButtonVisible                        = true;
     this.atButtonsPanelDialog.ScriptButtonText                         = "";
     this.atButtonsPanelDialog.ScriptButtonVisible                      = false;
     this.atButtonsPanelDialog.Size                                     = new Size(736, 33);
     this.atButtonsPanelDialog.TabIndex                                 = 5;
     this.atButtonsPanelDialog.TextCancelButton                         = "Отменить";
     this.atButtonsPanelDialog.TextCloseButton                          = "Закрыть";
     this.atButtonsPanelDialog.TextPrintButton                          = "Печать...";
     this.atButtonsPanelDialog.TextRefreshButton                        = "Обновить";
     this.atButtonsPanelDialog.TextSaveButton                           = "Выбрать";
     this.atButtonsPanelDialog.TextScriptButton                         = "Скрипты...";
     this.atButtonsPanelDialog.VisibleCancelButton                      = true;
     this.atButtonsPanelDialog.VisibleCloseButton                       = false;
     this.atButtonsPanelDialog.VisiblePrintButton                       = false;
     this.atButtonsPanelDialog.VisibleRefreshButton                     = false;
     this.atButtonsPanelDialog.VisibleSaveButton                        = true;
     this.atButtonsPanelDialog.VisibleScriptButton                      = false;
     this.atButtonsPanelDialog.WidthPrintButton                         = 75;
     this.atTreeGroup1.Appearance.FocusedCell.BackColor                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.atTreeGroup1.Appearance.FocusedCell.ForeColor                 = Color.Black;
     this.atTreeGroup1.Appearance.FocusedCell.Options.UseBackColor      = true;
     this.atTreeGroup1.Appearance.FocusedCell.Options.UseForeColor      = true;
     this.atTreeGroup1.Appearance.FocusedRow.BackColor                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.atTreeGroup1.Appearance.FocusedRow.ForeColor                  = Color.Black;
     this.atTreeGroup1.Appearance.FocusedRow.Options.UseBackColor       = true;
     this.atTreeGroup1.Appearance.FocusedRow.Options.UseForeColor       = true;
     this.atTreeGroup1.Appearance.HideSelectionRow.BackColor            = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.atTreeGroup1.Appearance.HideSelectionRow.BackColor2           = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.atTreeGroup1.Appearance.HideSelectionRow.ForeColor            = Color.Black;
     this.atTreeGroup1.Appearance.HideSelectionRow.Options.UseBackColor = true;
     this.atTreeGroup1.Appearance.HideSelectionRow.Options.UseForeColor = true;
     this.atTreeGroup1.Appearance.SelectedRow.BackColor                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.atTreeGroup1.Appearance.SelectedRow.ForeColor                 = Color.Black;
     this.atTreeGroup1.Appearance.SelectedRow.Options.UseBackColor      = true;
     this.atTreeGroup1.Appearance.SelectedRow.Options.UseForeColor      = true;
     this.atTreeGroup1.BorderStyle                                      = BorderStyles.Simple;
     this.atTreeGroup1.ColumnText                                       = "Группы ошибок";
     this.atTreeGroup1.Connection                                       = (dbconn)null;
     this.atTreeGroup1.DataMember                                       = "errorgroup";
     this.atTreeGroup1.DataRelation                                     = "errorgroup.FK_errorgroup_errorgroup";
     this.atTreeGroup1.DataSource                                       = (object)this.ds;
     this.atTreeGroup1.Dock                                             = DockStyle.Left;
     this.atTreeGroup1.FindEnableAddress                                = true;
     this.atTreeGroup1.FindEnableAgreeName                              = true;
     this.atTreeGroup1.FindEnableComment                                = true;
     this.atTreeGroup1.FindEnableCustomer                               = true;
     this.atTreeGroup1.FindEnableDest                                   = true;
     this.atTreeGroup1.FindEnableDocName                                = true;
     this.atTreeGroup1.FindEnableDocOper                                = true;
     this.atTreeGroup1.FindEnableDtAgree                                = true;
     this.atTreeGroup1.FindEnableDtDoc                                  = true;
     this.atTreeGroup1.FindEnableEditDir                                = true;
     this.atTreeGroup1.FindEnableSign                                   = true;
     this.atTreeGroup1.GridView                                         = (GridView)null;
     this.atTreeGroup1.HorzScrollVisibility                             = DevExpress.XtraTreeList.ScrollVisibility.Never;
     this.atTreeGroup1.IdDocAppearance                                  = "";
     this.atTreeGroup1.ImageIndexFieldName                              = "_imageindex";
     this.atTreeGroup1.IsSupportFilter                                  = false;
     this.atTreeGroup1.KeyFieldName                                     = "iderrorgroup";
     this.atTreeGroup1.Location                                         = new Point(0, 0);
     this.atTreeGroup1.LookAndFeel.Style                                = LookAndFeelStyle.Flat;
     this.atTreeGroup1.LookAndFeel.UseDefaultLookAndFeel                = false;
     this.atTreeGroup1.MoveItems                                        = (DataRow[])null;
     this.atTreeGroup1.Name                                             = "atTreeGroup1";
     this.atTreeGroup1.OptionsBehavior.AutoFocusNewNode                 = true;
     this.atTreeGroup1.OptionsView.ShowHorzLines                        = false;
     this.atTreeGroup1.OptionsView.ShowIndicator                        = false;
     this.atTreeGroup1.OptionsView.ShowVertLines                        = false;
     this.atTreeGroup1.ParentFieldName                                  = "parentid";
     this.atTreeGroup1.PrimaryKeyName                                   = "iderrorgroup";
     this.atTreeGroup1.Size                                             = new Size(180, 282);
     this.atTreeGroup1.TabIndex                                         = 7;
     this.atTreeGroup1.TableNameDiraction                               = "";
     this.splitterControl1.Location                                     = new Point(180, 0);
     this.splitterControl1.Name                                         = "splitterControl1";
     this.splitterControl1.Size                                         = new Size(6, 282);
     this.splitterControl1.TabIndex                                     = 8;
     this.splitterControl1.TabStop                                      = false;
     this.gridControlError.ContextMenuStrip                             = this.MenuItem;
     this.gridControlError.DataMember                                   = "errorgroup.FK_errorgroup_error";
     this.gridControlError.DataSource                                   = (object)this.ds;
     this.gridControlError.Dock                                         = DockStyle.Fill;
     this.gridControlError.EmbeddedNavigator.Name                       = "";
     this.gridControlError.Location                                     = new Point(186, 0);
     this.gridControlError.LookAndFeel.Style                            = LookAndFeelStyle.Flat;
     this.gridControlError.LookAndFeel.UseDefaultLookAndFeel            = false;
     this.gridControlError.MainView                                     = (BaseView)this.gridViewError;
     this.gridControlError.Name                                         = "gridControlError";
     this.gridControlError.RepositoryItems.AddRange(new RepositoryItem[3]
     {
         (RepositoryItem)this.ButtonEditErrorType,
         (RepositoryItem)this.ImageEditPic,
         (RepositoryItem)this.cboShowType
     });
     this.gridControlError.Size     = new Size(550, 282);
     this.gridControlError.TabIndex = 9;
     this.gridControlError.ViewCollection.AddRange(new BaseView[1]
     {
         (BaseView)this.gridViewError
     });
     this.gridViewError.Appearance.FocusedRow.BackColor                    = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridViewError.Appearance.FocusedRow.BackColor2                   = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridViewError.Appearance.FocusedRow.BorderColor                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridViewError.Appearance.FocusedRow.ForeColor                    = Color.Black;
     this.gridViewError.Appearance.FocusedRow.Options.UseBackColor         = true;
     this.gridViewError.Appearance.FocusedRow.Options.UseBorderColor       = true;
     this.gridViewError.Appearance.FocusedRow.Options.UseForeColor         = true;
     this.gridViewError.Appearance.GroupPanel.BackColor                    = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridViewError.Appearance.GroupPanel.BackColor2                   = Color.FromArgb(192, 192, (int)byte.MaxValue);
     this.gridViewError.Appearance.GroupPanel.Options.UseBackColor         = true;
     this.gridViewError.Appearance.HideSelectionRow.BackColor              = Color.FromArgb(192, 192, (int)byte.MaxValue);
     this.gridViewError.Appearance.HideSelectionRow.BackColor2             = Color.FromArgb(192, 192, (int)byte.MaxValue);
     this.gridViewError.Appearance.HideSelectionRow.BorderColor            = Color.FromArgb(192, 192, (int)byte.MaxValue);
     this.gridViewError.Appearance.HideSelectionRow.ForeColor              = Color.Black;
     this.gridViewError.Appearance.HideSelectionRow.Options.UseBackColor   = true;
     this.gridViewError.Appearance.HideSelectionRow.Options.UseBorderColor = true;
     this.gridViewError.Appearance.HideSelectionRow.Options.UseForeColor   = true;
     this.gridViewError.Appearance.SelectedRow.BackColor                   = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridViewError.Appearance.SelectedRow.BackColor2                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridViewError.Appearance.SelectedRow.BorderColor                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridViewError.Appearance.SelectedRow.ForeColor                   = Color.Black;
     this.gridViewError.Appearance.SelectedRow.Options.UseBackColor        = true;
     this.gridViewError.Appearance.SelectedRow.Options.UseBorderColor      = true;
     this.gridViewError.Appearance.SelectedRow.Options.UseForeColor        = true;
     this.gridViewError.BorderStyle = BorderStyles.Simple;
     this.gridViewError.Columns.AddRange(new GridColumn[11]
     {
         this.coliderror,
         this.colcode,
         this.colname,
         this.colerrortype_name,
         this.colmessage1,
         this.colmessage2,
         this.colmessage3,
         this.colunpack_picture,
         this.colcomment,
         this.colshowtype_name,
         this.colissave
     });
     this.gridViewError.GridControl    = this.gridControlError;
     this.gridViewError.GroupPanelText = "Панель группировки";
     this.gridViewError.Name           = "gridViewError";
     this.gridViewError.OptionsLayout.StoreVisualOptions = false;
     this.gridViewError.OptionsSelection.MultiSelect     = true;
     this.gridViewError.OptionsView.ShowAutoFilterRow    = true;
     this.gridViewError.OptionsView.ShowDetailButtons    = false;
     this.gridViewError.OptionsView.ShowFilterPanelMode  = ShowFilterPanelMode.Never;
     this.gridViewError.OptionsView.ShowIndicator        = false;
     this.coliderror.Caption   = "#";
     this.coliderror.FieldName = "iderror";
     this.coliderror.Name      = "coliderror";
     this.coliderror.OptionsColumn.AllowEdit   = false;
     this.coliderror.OptionsFilter.AllowFilter = false;
     this.coliderror.Visible                          = true;
     this.coliderror.VisibleIndex                     = 0;
     this.colcode.Caption                             = "Код";
     this.colcode.FieldName                           = "code";
     this.colcode.Name                                = "colcode";
     this.colcode.OptionsFilter.AllowFilter           = false;
     this.colcode.Visible                             = true;
     this.colcode.VisibleIndex                        = 1;
     this.colname.Caption                             = "Наименование";
     this.colname.FieldName                           = "name";
     this.colname.Name                                = "colname";
     this.colname.OptionsFilter.AllowFilter           = false;
     this.colname.Visible                             = true;
     this.colname.VisibleIndex                        = 2;
     this.colerrortype_name.Caption                   = "Тип";
     this.colerrortype_name.ColumnEdit                = (RepositoryItem)this.ButtonEditErrorType;
     this.colerrortype_name.FieldName                 = "errortype_name";
     this.colerrortype_name.Name                      = "colerrortype_name";
     this.colerrortype_name.OptionsFilter.AllowFilter = false;
     this.colerrortype_name.Visible                   = true;
     this.colerrortype_name.VisibleIndex              = 3;
     this.ButtonEditErrorType.AutoHeight              = false;
     this.ButtonEditErrorType.Buttons.AddRange(new EditorButton[2]
     {
         new EditorButton(ButtonPredefines.Minus),
         new EditorButton()
     });
     this.ButtonEditErrorType.Name          = "ButtonEditErrorType";
     this.ButtonEditErrorType.TextEditStyle = TextEditStyles.DisableTextEditor;
     this.ButtonEditErrorType.ButtonClick  += new ButtonPressedEventHandler(this.ButtonEditErrorType_ButtonClick);
     this.colmessage1.Caption   = "Сообщение 1";
     this.colmessage1.FieldName = "message1";
     this.colmessage1.Name      = "colmessage1";
     this.colmessage1.OptionsFilter.AllowFilter = false;
     this.colmessage1.Visible      = true;
     this.colmessage1.VisibleIndex = 5;
     this.colmessage2.Caption      = "Сообщение 2";
     this.colmessage2.FieldName    = "message2";
     this.colmessage2.Name         = "colmessage2";
     this.colmessage2.OptionsFilter.AllowFilter = false;
     this.colmessage2.Visible      = true;
     this.colmessage2.VisibleIndex = 6;
     this.colmessage3.Caption      = "Сообщение 3";
     this.colmessage3.FieldName    = "message3";
     this.colmessage3.Name         = "colmessage3";
     this.colmessage3.OptionsFilter.AllowFilter = false;
     this.colmessage3.Visible          = true;
     this.colmessage3.VisibleIndex     = 7;
     this.colunpack_picture.Caption    = "Картинка";
     this.colunpack_picture.ColumnEdit = (RepositoryItem)this.ImageEditPic;
     this.colunpack_picture.FieldName  = "unpack_picture";
     this.colunpack_picture.Name       = "colunpack_picture";
     this.colunpack_picture.OptionsFilter.AllowFilter = false;
     this.colunpack_picture.Visible      = true;
     this.colunpack_picture.VisibleIndex = 8;
     this.ImageEditPic.ActionButtonIndex = 1;
     this.ImageEditPic.AutoHeight        = false;
     this.ImageEditPic.Buttons.AddRange(new EditorButton[2]
     {
         new EditorButton(ButtonPredefines.Minus),
         new EditorButton(ButtonPredefines.Combo)
     });
     this.ImageEditPic.Name                          = "ImageEditPic";
     this.ImageEditPic.PopupStartSize                = new Size(292, 174);
     this.ImageEditPic.SizeMode                      = PictureSizeMode.Squeeze;
     this.colcomment.Caption                         = "Комментарий";
     this.colcomment.FieldName                       = "comment";
     this.colcomment.Name                            = "colcomment";
     this.colcomment.OptionsFilter.AllowFilter       = false;
     this.colcomment.Visible                         = true;
     this.colcomment.VisibleIndex                    = 4;
     this.colshowtype_name.Caption                   = "Отображать";
     this.colshowtype_name.ColumnEdit                = (RepositoryItem)this.cboShowType;
     this.colshowtype_name.FieldName                 = "showtype_name";
     this.colshowtype_name.Name                      = "colshowtype_name";
     this.colshowtype_name.OptionsFilter.AllowFilter = false;
     this.colshowtype_name.Visible                   = true;
     this.colshowtype_name.VisibleIndex              = 9;
     this.cboShowType.AutoHeight                     = false;
     this.cboShowType.Buttons.AddRange(new EditorButton[1]
     {
         new EditorButton(ButtonPredefines.Combo)
     });
     this.cboShowType.Items.AddRange(new object[4]
     {
         (object)"Не отображать",
         (object)"Сообщение 1",
         (object)"Сообщение 2",
         (object)"Сообщение 3"
     });
     this.cboShowType.Name               = "cboShowType";
     this.cboShowType.TextEditStyle      = TextEditStyles.DisableTextEditor;
     this.cboShowType.EditValueChanging += new ChangingEventHandler(this.cboShowType_EditValueChanging);
     this.colissave.Caption              = "Сохранять";
     this.colissave.FieldName            = "issave";
     this.colissave.Name = "colissave";
     this.colissave.OptionsFilter.AllowFilter = false;
     this.colissave.Visible      = true;
     this.colissave.VisibleIndex = 10;
     this.AutoScaleDimensions    = new SizeF(6f, 13f);
     this.AutoScaleMode          = AutoScaleMode.Font;
     this.Controls.Add((Control)this.gridControlError);
     this.Controls.Add((Control)this.splitterControl1);
     this.Controls.Add((Control)this.atTreeGroup1);
     this.Controls.Add((Control)this.atButtonsPanelDialog);
     this.Controls.Add((Control)this.atButtonsPanel1);
     this.Name         = "ErrorForm";
     this.Size         = new Size(736, 348);
     this.Text         = "Справочник ошибок";
     this.FormClosing += new FormClosing(this.ErrorForm_FormClosing);
     this.atButtonsPanel1.EndInit();
     this.MenuItem.ResumeLayout(false);
     this.ds.EndInit();
     this.atButtonsPanelDialog.EndInit();
     this.atTreeGroup1.EndInit();
     this.gridControlError.EndInit();
     this.gridViewError.EndInit();
     this.ButtonEditErrorType.EndInit();
     this.ImageEditPic.EndInit();
     this.cboShowType.EndInit();
     this.ResumeLayout(false);
 }
Exemplo n.º 17
0
 private void InitializeComponent()
 {
     this.components              = (IContainer) new Container();
     this.panel1                  = new Panel();
     this.simpleButtonApply       = new SimpleButton();
     this.simpleButtonCancel      = new SimpleButton();
     this.simpleButtonExit        = new SimpleButton();
     this.panel2                  = new Panel();
     this.gridControl1            = new GridControl();
     this.contextMenuStripPicture = new ContextMenuStrip(this.components);
     this.toolStripMenuItemAdd    = new ToolStripMenuItem();
     this.toolStripMenuItemDelete = new ToolStripMenuItem();
     this.toolStripSeparator1     = new ToolStripSeparator();
     this.toolStripMenuItemExport = new ToolStripMenuItem();
     this.toolStripMenuItemImport = new ToolStripMenuItem();
     this.ds                       = new ds_picture();
     this.gridView1                = new GridView();
     this.colidpicture             = new GridColumn();
     this.colname                  = new GridColumn();
     this.colcomment               = new GridColumn();
     this.colpicture               = new GridColumn();
     this.repositoryItemImageEdit1 = new RepositoryItemImageEdit();
     this.colbevel                 = new GridColumn();
     this.colwidth                 = new GridColumn();
     this.colheight                = new GridColumn();
     this.colmarking               = new GridColumn();
     this.openFileDialog1          = new OpenFileDialog();
     this.saveFileDialog1          = new SaveFileDialog();
     this.panel1.SuspendLayout();
     this.panel2.SuspendLayout();
     this.gridControl1.BeginInit();
     this.contextMenuStripPicture.SuspendLayout();
     this.ds.BeginInit();
     this.gridView1.BeginInit();
     this.repositoryItemImageEdit1.BeginInit();
     this.SuspendLayout();
     this.panel1.Controls.Add((Control)this.simpleButtonApply);
     this.panel1.Controls.Add((Control)this.simpleButtonCancel);
     this.panel1.Controls.Add((Control)this.simpleButtonExit);
     this.panel1.Dock                         = DockStyle.Bottom;
     this.panel1.Location                     = new Point(0, 538);
     this.panel1.Name                         = "panel1";
     this.panel1.Size                         = new Size(908, 35);
     this.panel1.TabIndex                     = 0;
     this.simpleButtonApply.Anchor            = AnchorStyles.Bottom | AnchorStyles.Right;
     this.simpleButtonApply.ButtonStyle       = BorderStyles.Simple;
     this.simpleButtonApply.Location          = new Point(668, 6);
     this.simpleButtonApply.LookAndFeel.Style = LookAndFeelStyle.Flat;
     this.simpleButtonApply.LookAndFeel.UseDefaultLookAndFeel = false;
     this.simpleButtonApply.Name               = "simpleButtonApply";
     this.simpleButtonApply.Size               = new Size(75, 23);
     this.simpleButtonApply.TabIndex           = 0;
     this.simpleButtonApply.Text               = "Применить";
     this.simpleButtonApply.Click             += new EventHandler(this.simpleButtonApply_Click);
     this.simpleButtonCancel.Anchor            = AnchorStyles.Bottom | AnchorStyles.Right;
     this.simpleButtonCancel.ButtonStyle       = BorderStyles.Simple;
     this.simpleButtonCancel.Location          = new Point(749, 6);
     this.simpleButtonCancel.LookAndFeel.Style = LookAndFeelStyle.Flat;
     this.simpleButtonCancel.LookAndFeel.UseDefaultLookAndFeel = false;
     this.simpleButtonCancel.Name            = "simpleButtonCancel";
     this.simpleButtonCancel.Size            = new Size(75, 23);
     this.simpleButtonCancel.TabIndex        = 0;
     this.simpleButtonCancel.Text            = "Отменить";
     this.simpleButtonCancel.Click          += new EventHandler(this.simpleButtonCancel_Click);
     this.simpleButtonExit.Anchor            = AnchorStyles.Bottom | AnchorStyles.Right;
     this.simpleButtonExit.ButtonStyle       = BorderStyles.Simple;
     this.simpleButtonExit.Location          = new Point(830, 6);
     this.simpleButtonExit.LookAndFeel.Style = LookAndFeelStyle.Flat;
     this.simpleButtonExit.LookAndFeel.UseDefaultLookAndFeel = false;
     this.simpleButtonExit.Name     = "simpleButtonExit";
     this.simpleButtonExit.Size     = new Size(75, 23);
     this.simpleButtonExit.TabIndex = 0;
     this.simpleButtonExit.Text     = "Выход";
     this.simpleButtonExit.Click   += new EventHandler(this.simpleButtonExit_Click);
     this.panel2.Controls.Add((Control)this.gridControl1);
     this.panel2.Dock     = DockStyle.Fill;
     this.panel2.Location = new Point(0, 0);
     this.panel2.Name     = "panel2";
     this.panel2.Size     = new Size(908, 538);
     this.panel2.TabIndex = 1;
     this.gridControl1.ContextMenuStrip                  = this.contextMenuStripPicture;
     this.gridControl1.DataMember                        = "picture";
     this.gridControl1.DataSource                        = (object)this.ds;
     this.gridControl1.Dock                              = DockStyle.Fill;
     this.gridControl1.EmbeddedNavigator.Name            = "";
     this.gridControl1.Location                          = new Point(0, 0);
     this.gridControl1.LookAndFeel.Style                 = LookAndFeelStyle.Flat;
     this.gridControl1.LookAndFeel.UseDefaultLookAndFeel = false;
     this.gridControl1.MainView                          = (BaseView)this.gridView1;
     this.gridControl1.Name                              = "gridControl1";
     this.gridControl1.RepositoryItems.AddRange(new RepositoryItem[1]
     {
         (RepositoryItem)this.repositoryItemImageEdit1
     });
     this.gridControl1.Size     = new Size(908, 538);
     this.gridControl1.TabIndex = 0;
     this.gridControl1.ViewCollection.AddRange(new BaseView[1]
     {
         (BaseView)this.gridView1
     });
     this.contextMenuStripPicture.Items.AddRange(new ToolStripItem[5]
     {
         (ToolStripItem)this.toolStripMenuItemAdd,
         (ToolStripItem)this.toolStripMenuItemDelete,
         (ToolStripItem)this.toolStripSeparator1,
         (ToolStripItem)this.toolStripMenuItemExport,
         (ToolStripItem)this.toolStripMenuItemImport
     });
     this.contextMenuStripPicture.Name   = "contextMenuStripPicture";
     this.contextMenuStripPicture.Size   = new Size(125, 98);
     this.toolStripMenuItemAdd.Name      = "toolStripMenuItemAdd";
     this.toolStripMenuItemAdd.Size      = new Size(124, 22);
     this.toolStripMenuItemAdd.Text      = "Добавить";
     this.toolStripMenuItemAdd.Click    += new EventHandler(this.toolStripMenuItemAdd_Click);
     this.toolStripMenuItemDelete.Name   = "toolStripMenuItemDelete";
     this.toolStripMenuItemDelete.Size   = new Size(124, 22);
     this.toolStripMenuItemDelete.Text   = "Удалить";
     this.toolStripMenuItemDelete.Click += new EventHandler(this.toolStripMenuItemDelete_Click);
     this.toolStripSeparator1.Name       = "toolStripSeparator1";
     this.toolStripSeparator1.Size       = new Size(121, 6);
     this.toolStripMenuItemExport.Name   = "toolStripMenuItemExport";
     this.toolStripMenuItemExport.Size   = new Size(124, 22);
     this.toolStripMenuItemExport.Text   = "Экспорт";
     this.toolStripMenuItemExport.Click += new EventHandler(this.toolStripMenuItemExport_Click);
     this.toolStripMenuItemImport.Name   = "toolStripMenuItemImport";
     this.toolStripMenuItemImport.Size   = new Size(124, 22);
     this.toolStripMenuItemImport.Text   = "Импорт";
     this.toolStripMenuItemImport.Click += new EventHandler(this.toolStripMenuItemImport_Click);
     this.ds.DataSetName             = "ds_picture";
     this.ds.SchemaSerializationMode = SchemaSerializationMode.IncludeSchema;
     this.gridView1.Appearance.FocusedRow.BackColor                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridView1.Appearance.FocusedRow.BackColor2                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridView1.Appearance.FocusedRow.ForeColor                  = Color.Black;
     this.gridView1.Appearance.FocusedRow.Options.UseBackColor       = true;
     this.gridView1.Appearance.FocusedRow.Options.UseForeColor       = true;
     this.gridView1.Appearance.GroupPanel.BackColor                  = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridView1.Appearance.GroupPanel.BackColor2                 = Color.FromArgb(192, 192, (int)byte.MaxValue);
     this.gridView1.Appearance.GroupPanel.Options.UseBackColor       = true;
     this.gridView1.Appearance.HideSelectionRow.BackColor            = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridView1.Appearance.HideSelectionRow.BackColor2           = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridView1.Appearance.HideSelectionRow.ForeColor            = Color.Black;
     this.gridView1.Appearance.HideSelectionRow.Options.UseBackColor = true;
     this.gridView1.Appearance.HideSelectionRow.Options.UseForeColor = true;
     this.gridView1.Appearance.SelectedRow.BackColor                 = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridView1.Appearance.SelectedRow.BackColor2                = Color.FromArgb(128, 128, (int)byte.MaxValue);
     this.gridView1.Appearance.SelectedRow.ForeColor                 = Color.Black;
     this.gridView1.Appearance.SelectedRow.Options.UseBackColor      = true;
     this.gridView1.Appearance.SelectedRow.Options.UseForeColor      = true;
     this.gridView1.BorderStyle = BorderStyles.Simple;
     this.gridView1.Columns.AddRange(new GridColumn[8]
     {
         this.colidpicture,
         this.colname,
         this.colcomment,
         this.colpicture,
         this.colbevel,
         this.colwidth,
         this.colheight,
         this.colmarking
     });
     this.gridView1.GridControl                  = this.gridControl1;
     this.gridView1.GroupPanelText               = "Панель группировки";
     this.gridView1.Name                         = "gridView1";
     this.gridView1.OptionsView.ShowIndicator    = false;
     this.colidpicture.Caption                   = "#";
     this.colidpicture.FieldName                 = "idpicture";
     this.colidpicture.Name                      = "colidpicture";
     this.colidpicture.OptionsColumn.AllowEdit   = false;
     this.colidpicture.OptionsFilter.AllowFilter = false;
     this.colidpicture.Visible                   = true;
     this.colidpicture.VisibleIndex              = 0;
     this.colname.Caption                        = "Наименование";
     this.colname.FieldName                      = "name";
     this.colname.Name = "colname";
     this.colname.OptionsFilter.AllowFilter = false;
     this.colname.Visible      = true;
     this.colname.VisibleIndex = 2;
     this.colcomment.Caption   = "Комментарий";
     this.colcomment.FieldName = "comment";
     this.colcomment.Name      = "colcomment";
     this.colcomment.OptionsFilter.AllowFilter = false;
     this.colcomment.Visible                   = true;
     this.colcomment.VisibleIndex              = 3;
     this.colpicture.Caption                   = "Рисунок";
     this.colpicture.ColumnEdit                = (RepositoryItem)this.repositoryItemImageEdit1;
     this.colpicture.FieldName                 = "picture";
     this.colpicture.Name                      = "colpicture";
     this.colpicture.OptionsColumn.AllowEdit   = false;
     this.colpicture.OptionsFilter.AllowFilter = false;
     this.colpicture.Visible                   = true;
     this.colpicture.VisibleIndex              = 4;
     this.repositoryItemImageEdit1.AutoHeight  = false;
     this.repositoryItemImageEdit1.Buttons.AddRange(new EditorButton[1]
     {
         new EditorButton(ButtonPredefines.Combo)
     });
     this.repositoryItemImageEdit1.Name = "repositoryItemImageEdit1";
     this.colbevel.Caption        = "Бевель";
     this.colbevel.FieldName      = "bevel";
     this.colbevel.Name           = "colbevel";
     this.colbevel.Visible        = true;
     this.colbevel.VisibleIndex   = 5;
     this.colwidth.Caption        = "Ширина";
     this.colwidth.FieldName      = "width";
     this.colwidth.Name           = "colwidth";
     this.colwidth.Visible        = true;
     this.colwidth.VisibleIndex   = 6;
     this.colheight.Caption       = "Высота";
     this.colheight.FieldName     = "height";
     this.colheight.Name          = "colheight";
     this.colheight.Visible       = true;
     this.colheight.VisibleIndex  = 7;
     this.colmarking.Caption      = "Артикул";
     this.colmarking.FieldName    = "marking";
     this.colmarking.Name         = "colmarking";
     this.colmarking.Visible      = true;
     this.colmarking.VisibleIndex = 1;
     this.openFileDialog1.Filter  = "Рисунки svg|*.svg";
     this.saveFileDialog1.Filter  = "Рисунки svg|*.svg";
     this.AutoScaleDimensions     = new SizeF(6f, 13f);
     this.AutoScaleMode           = AutoScaleMode.Font;
     this.Controls.Add((Control)this.panel2);
     this.Controls.Add((Control)this.panel1);
     this.Name         = "PicturesForm";
     this.Size         = new Size(908, 573);
     this.Text         = "Рисунки витражей";
     this.FormClosing += new FormClosing(this.PicturesForm_FormClosing);
     this.panel1.ResumeLayout(false);
     this.panel2.ResumeLayout(false);
     this.gridControl1.EndInit();
     this.contextMenuStripPicture.ResumeLayout(false);
     this.ds.EndInit();
     this.gridView1.EndInit();
     this.repositoryItemImageEdit1.EndInit();
     this.ResumeLayout(false);
 }
Exemplo n.º 18
0
        private void InitContr()
        {
            if (dsLoad != null)
            {
                return;
            }

            string strBusClassName = drBtn["FrmClassName"].ToString();

            dsFormUkyndaAdt = this.GetFrmLoadUkyndaDsAdt(strBusClassName);
            dsFormUkyndaAdt.AcceptChanges();
            dsFormAdt = this.GetFrmLoadDsAdt(strBusClassName);
            dsFormAdt.AcceptChanges();
            dsLoad = this.GetFrmLoadDsNew(strBusClassName);
            dsLoad.AcceptChanges();
            dtShow  = dsLoad.Tables[0];
            dtConst = dsLoad.Tables[1];

            drMain               = dsLoad.Tables[2].Rows[0];
            strSpName            = drMain["SpName"].ToString();
            strQueryFlag         = drMain["QueryFlag"].ToString();
            strAddFlag           = drMain["AddFlag"].ToString();
            strKeyFiled          = drMain["KeyIdFiled"].ToString();
            strGetWFBalceCtrlIds = drMain["GetWFBalceCtrlIds"].ToString();

            splitContainerControl1.SplitterPosition = int.Parse(drMain["MainSplitterPosition"].ToString());

            dtBtns   = dsLoad.Tables[3];
            dtTabs   = dsLoad.Tables[4];
            dtGroupC = dsLoad.Tables[5];
            dtSte    = dsLoad.Tables[6];
            dtContr  = dsLoad.Tables[7];
            dtBtnsM  = dsLoad.Tables[8];
            dtSp     = dsLoad.Tables[9];

            if (drBtn["FrmShowIcon"].ToString() == "True")
            {
                GridColumn gridCol             = new GridColumn();
                RepositoryItemImageEdit repImg = new RepositoryItemImageEdit();
                repImg.AutoHeight = false;
                repImg.Buttons.Clear();
                repImg.Name             = "gridVInfo_repImg";
                repImg.PopupFormMinSize = new System.Drawing.Size(450, 350);
                repImg.ReadOnly         = true;
                repImg.Popup           += new System.EventHandler(this.repImg_Popup);

                gridCol.Caption    = "图片";
                gridCol.ColumnEdit = repImg;
                gridCol.FieldName  = "Icon";
                gridCol.Name       = "gridVInfo_GCol";
                gridCol.OptionsColumn.AllowMove  = false;
                gridCol.OptionsColumn.ReadOnly   = true;
                gridCol.OptionsColumn.FixedWidth = true;
                gridCol.Visible      = true;
                gridCol.VisibleIndex = 0;
                gridCol.Width        = 50;

                this.gridCInfo.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                    repImg
                });
                gridVInfo.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridCol });
            }
            else if (drBtn["FrmShowPicEdit"].ToString() == "True")
            {
                GridColumn gridCol = new GridColumn();
                RepositoryItemPictureEdit repPic = new RepositoryItemPictureEdit();
                repPic.Name        = "gridVInfo_repPic";
                repPic.ReadOnly    = true;
                repPic.ShowMenu    = false;
                repPic.SizeMode    = DevExpress.XtraEditors.Controls.PictureSizeMode.Zoom;
                repPic.MouseLeave += new System.EventHandler(this.repPic_MouseLeave);
                repPic.MouseHover += new EventHandler(repPic_MouseHover);

                gridCol.Caption    = "图片";
                gridCol.ColumnEdit = repPic;
                gridCol.FieldName  = "Icon";
                gridCol.Name       = "gridVInfo_GCol";
                gridCol.OptionsColumn.AllowMove  = false;
                gridCol.OptionsColumn.ReadOnly   = true;
                gridCol.OptionsColumn.FixedWidth = true;
                gridCol.Visible      = true;
                gridCol.VisibleIndex = 0;
                gridCol.Width        = int.Parse(drBtn["FrmPicGvWidth"].ToString());

                this.gridCInfo.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
                    repPic
                });
                gridVInfo.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { gridCol });

                this.gridVInfo.RowHeight = int.Parse(drBtn["FrmPicGvRowHeight"].ToString());
                this.gridVInfo.OptionsView.ShowAutoFilterRow = false;
                this.picEdit.Location = new System.Drawing.Point(int.Parse(drBtn["FrmPicX"].ToString()), int.Parse(drBtn["FrmPicY"].ToString()));
            }
            Rectangle rect = SystemInformation.VirtualScreen;

            StaticFunctions.ShowGridControl(gridVInfo, dtShow, dtConst, out strFileds);
            StaticFunctions.SetGridViewStyleFormatCondition(gridVInfo, dtBtnsM);
            IsAddChildGv = this.drBtn["IsAddChildGv"].ToString() == "True";
            if (IsAddChildGv)
            {
                gvChild = StaticFunctions.ShowGridVChildGv("gridVCom", gridCInfo, dtShow, dtConst, out strFiledsInfo);
                StaticFunctions.SetGridViewStyleFormatCondition(gvChild, dtBtnsM);
            }

            blInitBound = true;
            #region GroupC
            GridViewEdit = gridVMain;
            List <Control> lisGcContrs = new List <Control>();
            int            iMaxHeight  = StaticFunctions.ShowTabItemBusAdd(dtTabs, dtGroupC, xtabItemInfo, xtabItemInfo.Name, string.Empty
                                                                           , lisGcContrs, dtShow, dtConst, GcOrdControls, GcOrdarrContrSeq, lstFiledsOrd);
            if (lisGcContrs.Count == 0)
            {
                splitContainerControl1.PanelVisibility = SplitPanelVisibility.Panel1;
            }
            else
            {
                splitContainerControl1.PanelVisibility  = SplitPanelVisibility.Both;
                splitContainerControl1.SplitterPosition = iMaxHeight + 50;
            }
            foreach (Control ctrl in lisGcContrs)
            {
                ctrl.Enter += new System.EventHandler(this.Txt_Enter);
                switch (ctrl.GetType().ToString())
                {
                case "DevExpress.XtraEditors.TextEdit":
                    SetControlEvent(ctrl);
                    break;

                case "DevExpress.XtraEditors.CheckEdit":
                    break;

                case "DevExpress.XtraEditors.LookUpEdit":
                    LookUpEdit dpl = ctrl as LookUpEdit;
                    dpl.Properties.QueryPopUp += new System.ComponentModel.CancelEventHandler(this.lookUpEdit_Properties_QueryPopUp);
                    dpl.Properties.Closed     += new DevExpress.XtraEditors.Controls.ClosedEventHandler(this.lookUpEdit_Properties_Closed);
                    break;

                case "DevExpress.XtraEditors.CheckedComboBoxEdit":
                    CheckedComboBoxEdit chkdpl = ctrl as CheckedComboBoxEdit;
                    chkdpl.Properties.Closed += new DevExpress.XtraEditors.Controls.ClosedEventHandler(this.lookUpEdit_Properties_Closed);
                    break;

                case "DevExpress.XtraEditors.DateEdit":
                    break;

                case "ProduceManager.UcTxtPopup":
                    ProduceManager.UcTxtPopup ucp = ctrl as ProduceManager.UcTxtPopup;
                    ucp.onClosePopUp += new UcTxtPopup.ClosePopUp(ucp_onClosePopUp);
                    StaticFunctions.BoundSpicalContr(dtContr, dsFormAdt, dsFormUkyndaAdt, ucp, dtShow);
                    break;

                case "ProduceManager.UcTreeList":
                    ProduceManager.UcTreeList uct = ctrl as ProduceManager.UcTreeList;
                    uct.onClosePopUp += new UcTreeList.ClosePopUp(uct_onClosePopUp);
                    StaticFunctions.BoundSpicalContr(dtContr, dsFormAdt, dsFormUkyndaAdt, uct, dtShow);
                    break;

                case "ExtendControl.ExtPopupTree":
                    ExtendControl.ExtPopupTree ept = ctrl as ExtendControl.ExtPopupTree;
                    ept.Properties.Closed += new DevExpress.XtraEditors.Controls.ClosedEventHandler(this.lookUpEdit_Properties_Closed);
                    StaticFunctions.BoundSpicalContr(dtContr, dsFormAdt, dsFormUkyndaAdt, ept, dtShow);
                    break;

                default:
                    break;
                }
            }
            #endregion
            blInitBound = false;
            xtabItemInfo_SelectedPageChanged(xtabItemInfo, new DevExpress.XtraTab.TabPageChangedEventArgs(null, xtabItemInfo.SelectedTabPage));
        }