private void AddButtonsToList(DevExpress.XtraEditors.Controls.EditorButtonCollection listButtons) { foreach (DevExpress.XtraEditors.Controls.EditorButton b in listButtons) { if (b.Caption.ToLower() == "Refresh".ToLower()) { return; } } DevExpress.Utils.ToolTipTitleItem toolTipTitleItem1 = new DevExpress.Utils.ToolTipTitleItem(); System.Drawing.Image refreshIcon = DevExpress.Images.ImageResourceCache.Default.GetImage("grayscaleimages/actions/refresh_16x16.png"); DevExpress.Utils.ToolTipItem toolTipItem1 = new DevExpress.Utils.ToolTipItem(); DevExpress.Utils.SuperToolTip superToolTip1 = new DevExpress.Utils.SuperToolTip(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); toolTipTitleItem1.Appearance.Image = refreshIcon; toolTipTitleItem1.Appearance.Options.UseImage = true; toolTipTitleItem1.Image = refreshIcon; toolTipTitleItem1.Text = "Refresh list from database"; toolTipItem1.LeftIndent = 6; toolTipItem1.Text = "Press this button only when you want to retrieve new inserted rows from database " + ""; superToolTip1.Items.Add(toolTipTitleItem1); superToolTip1.Items.Add(toolTipItem1); DevExpress.XtraEditors.Controls.EditorButton refreshButton = new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Refresh", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, refreshIcon, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, "", null, superToolTip1, true); listButtons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { refreshButton /*,new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)*/ }); // }
private void InitDefaultProperties( ) { this.AutoHeight = true; this.ShowDropDown = DevExpress.XtraEditors.Controls.ShowDropDown.SingleClick; this.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; this.PopupFilterMode = DevExpress.XtraEditors.PopupFilterMode.Contains; this.NullText = String.Empty; this.PopupFormSize = new System.Drawing.Size(550, 800); this.QueryPopUp += new System.ComponentModel.CancelEventHandler(ABCRepositoryGridLookupEdit_QueryPopUp); if (DesignMode == false && this.OwnerEdit == null) { try { DevExpress.XtraEditors.Controls.EditorButton searchBtn = new DevExpress.XtraEditors.Controls.EditorButton(); searchBtn.Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph; searchBtn.Image = ABCControls.ABCImageList.GetImage16x16("DocLink"); searchBtn.Appearance.Options.UseImage = true; searchBtn.GlyphAlignment = HorzAlignment.Near; searchBtn.Tag = "Link"; searchBtn.IsLeft = true; searchBtn.EnableImageTransparency = true; this.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(ABCRepositoryGridLookupEdit_ButtonClick); this.Buttons.Add(searchBtn); } catch (Exception ex) { } } }
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { DevExpress.XtraEditors.Controls.EditorButton btn = e.Button; switch (btn.Caption) { case "删除": int focusedRowHandle = this.gridView1.FocusedRowHandle; if (focusedRowHandle == -1) { return; } DataRow dr = this.gridView1.GetDataRow(focusedRowHandle); int n = int.Parse(dr["Num"].ToString()); if (this._dict.ContainsKey(n) && this._dict[n] != null) { d3.ObjectManager.DeleteObject(this._dict[n]); } if (this._dictLabel.ContainsKey(n) && this._dictLabel[n] != null) { d3.ObjectManager.DeleteObject(this._dictLabel[n]); } this._dict.Remove(n); this._dictLabel.Remove(n); this._dt.Rows.Remove(dr); this.gridView1.RefreshRow(focusedRowHandle); break; } }
protected override void OnLoaded() { this.Properties.Buttons.Clear(); if (CheckDesingModel.IsDesingMode) { return; } var frm = this.FindForm(); Code = string.Format("{0}.{1}", frm.GetType().FullName, this.Name); this.Properties.NullValuePromptShowForEmptyValue = true; this.Properties.AllowNullInput = DefaultBoolean.False; RefreshSearch(); var ebtnSet = new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph);//设置用户字段 ebtnSet.Caption = "设"; this.Properties.Buttons.Add(ebtnSet); if (Loginer.CurrentLoginer.IsSysAdmin) { var ebtnConfig = new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph);//配置查询字段 ebtnConfig.Caption = "配"; this.Properties.Buttons.Add(ebtnConfig); } this.Properties.ButtonClick += Properties_ButtonClick; }
private void InitDefaultProperties( ) { this.AutoHeight = true; this.AutoSearchColumnIndex = 0; this.ShowDropDown = DevExpress.XtraEditors.Controls.ShowDropDown.SingleClick; this.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.Standard; this.HotTrackItems = true; this.SearchMode = DevExpress.XtraEditors.Controls.SearchMode.AutoFilter; this.CaseSensitiveSearch = false; this.NullText = ""; this.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup; if (DesignMode == false && this.OwnerEdit == null) { try { DevExpress.XtraEditors.Controls.EditorButton searchBtn = new DevExpress.XtraEditors.Controls.EditorButton(); searchBtn.Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph; searchBtn.Image = ABCControls.ABCImageList.GetImage16x16("DocLink"); searchBtn.Appearance.Options.UseImage = true; searchBtn.GlyphAlignment = HorzAlignment.Near; searchBtn.Tag = "Link"; searchBtn.IsLeft = true; searchBtn.EnableImageTransparency = true; this.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(ABCRepositoryLookUpEdit_ButtonClick); this.Buttons.Add(searchBtn); } catch (Exception ex) { } } }
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { DevExpress.XtraEditors.Controls.EditorButton btn = e.Button; switch (btn.Caption) { case "定位": DF3DApplication app = DF3DApplication.Application; if (app == null || app.Current3DMapControl == null) { return; } int focusedRowHandle = this.gridView1.FocusedRowHandle; if (focusedRowHandle == -1) { return; } DataRow dr = this.gridView1.GetDataRow(focusedRowHandle); if (dr["geo"] != null && dr["Name"] != null && dr["fcName"] != null && dr["fc"] != null) { ISurfaceSymbol ss = new SurfaceSymbolClass(); ss.Color = 0xcc00ff00; ICurveSymbol cs = new CurveSymbolClass(); cs.Color = 0xff00ff00; cs.Width = -5; ss.BoundarySymbol = cs; ISimplePointSymbol ps = new SimplePointSymbol(); ps.Size = SystemInfo.Instance.SymbolSize; ps.FillColor = Convert.ToUInt32(SystemInfo.Instance.FillColor, 16); IGeometry objGeo = dr["geo"] as IGeometry; if (objGeo.GeometryType == gviGeometryType.gviGeometryModelPoint) { IModelPoint mp = objGeo as IModelPoint; IModelPointSymbol mps = new ModelPointSymbol(); mps.SetResourceDataSet((dr["fc"] as IFeatureClass).FeatureDataSet); mps.Color = 0xffffff00; IRenderModelPoint rMP = app.Current3DMapControl.ObjectManager.CreateRenderModelPoint(mp, mps, app.Current3DMapControl.ProjectTree.RootID); rMP.Glow(8000); app.Current3DMapControl.ObjectManager.DelayDelete(rMP.Guid, 8000); IGeometryFactory geoFact = new GeometryFactory(); IPoint pt = geoFact.CreatePoint(gviVertexAttribute.gviVertexAttributeZ); pt.X = mp.X; pt.Y = mp.Y; pt.Z = mp.Z; ITableLabel tl = DrawTool.CreateTableLabel1(1); tl.TitleText = dr["fcName"].ToString(); tl.SetRecord(0, 0, dr["Name"].ToString()); tl.Position = pt; this._listRender.Add(tl.Guid); app.Current3DMapControl.Camera.FlyToObject(tl.Guid, gviActionCode.gviActionFlyTo); } } break; } }
protected override object CreateControlCore() { var control = new DecimalEdit(); var button = new DevExpress.XtraEditors.Controls.EditorButton(); button.Caption = "="; button.IsLeft = false; button.Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph; control.Properties.Buttons.Add(button); control.ButtonClick += control_ButtonClick; return(control); }
void repositoryItemButtonEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { ////this.gridView1.OptionsEditForm.BeginUpdate(); DevExpress.XtraEditors.Controls.EditorButton temp = (DevExpress.XtraEditors.Controls.EditorButton)e.Button; //temp.Visible = false; DataRow row = gridView1.GetDataRow(gridView1.FocusedRowHandle); string cellValue = gridView1.GetRowCellValue(this.gridView1.FocusedRowHandle, "Height").ToString(); MessageBox.Show(cellValue); ////this.gridView1.OptionsEditForm.EndUpdate(); }
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { DevExpress.XtraEditors.Controls.EditorButton btn = e.Button; switch (btn.Caption) { case "删除": int focusedRowHandle = this.gridView1.FocusedRowHandle; if (focusedRowHandle == -1) return; DataRow dr = this.gridView1.GetDataRow(focusedRowHandle); this._dt.Rows.Remove(dr); this.gridView1.RefreshRow(focusedRowHandle); break; } }
void repositoryItemButtonEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { //MessageBox.Show(""); DevExpress.XtraEditors.Controls.EditorButton temp = (DevExpress.XtraEditors.Controls.EditorButton)e.Button; string b = temp.Caption; //System.Data.DataRow row = gridView1.GetDataRow(gridView1.FocusedRowHandle); //string cellValue = gridView1.GetRowCellValue(this.gridView1.FocusedRowHandle, "Height").ToString(); //MessageBox.Show(cellValue); string editInfo = this.gridView1.GetFocusedRowCellValue(gridView1.Columns[gridView1.FocusedColumn.FieldName]).ToString(); editInfo = this.gridView1.GetFocusedRowCellDisplayText(gridView1.FocusedColumn.FieldName); //editInfo = ((RepositoryItem)gridView1.Columns[gridView1.FocusedColumn.FieldName].ColumnEdit).Name; }
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { DevExpress.XtraEditors.Controls.EditorButton btn = e.Button; switch (btn.Caption) { case "定位": DF3DApplication app = DF3DApplication.Application; if (app == null || app.Current3DMapControl == null) { return; } int focusedRowHandle = this.gridView1.FocusedRowHandle; if (focusedRowHandle == -1) { return; } DataRow dr = this.gridView1.GetDataRow(focusedRowHandle); if (dr["geo"] != null && dr["Name"] != null && dr["fcName"] != null) { ISurfaceSymbol ss = new SurfaceSymbolClass(); ss.Color = 0xcc00ff00; ICurveSymbol cs = new CurveSymbolClass(); cs.Color = 0xff00ff00; cs.Width = -5; ss.BoundarySymbol = cs; ISimplePointSymbol ps = new SimplePointSymbol(); ps.Size = SystemInfo.Instance.SymbolSize; ps.FillColor = Convert.ToUInt32(SystemInfo.Instance.FillColor, 16); IGeometry objGeo = dr["geo"] as IGeometry; IPoint pt = null; if (objGeo.GeometryType == gviGeometryType.gviGeometryMultiPolyline) { double x = 0; double y = 0; double z = 0; IMultiPolyline mPolyline = objGeo as IMultiPolyline; for (int m = 0; m < mPolyline.GeometryCount; m++) { IPolyline polyline = mPolyline.GetPolyline(m); IPoint pttemp = polyline.Midpoint; x += pttemp.X; y += pttemp.Y; z += pttemp.Z; } x = x / mPolyline.GeometryCount; y = y / mPolyline.GeometryCount; z = z / mPolyline.GeometryCount; pt = (new GeometryFactory()).CreatePoint(gviVertexAttribute.gviVertexAttributeZ); pt.X = x; pt.Y = y; pt.Z = z; IRenderMultiPolyline rMPolyline = app.Current3DMapControl.ObjectManager.CreateRenderMultiPolyline(mPolyline, cs, app.Current3DMapControl.ProjectTree.RootID); rMPolyline.HeightStyle = gviHeightStyle.gviHeightOnEverything; rMPolyline.Glow(8000); this._listRender.Add(rMPolyline.Guid); } else if (objGeo.GeometryType == gviGeometryType.gviGeometryMultiPolygon) { double x = 0; double y = 0; double z = 0; IMultiPolygon mPolygon = objGeo as IMultiPolygon; for (int m = 0; m < mPolygon.GeometryCount; m++) { IPolygon polygon = mPolygon.GetPolygon(m); IPoint pttemp = polygon.Centroid; x += pttemp.X; y += pttemp.Y; z += pttemp.Z; } x = x / mPolygon.GeometryCount; y = y / mPolygon.GeometryCount; z = z / mPolygon.GeometryCount; pt = (new GeometryFactory()).CreatePoint(gviVertexAttribute.gviVertexAttributeZ); pt.X = x; pt.Y = y; pt.Z = z; IRenderMultiPolygon rMPolygon = app.Current3DMapControl.ObjectManager.CreateRenderMultiPolygon(mPolygon, ss, app.Current3DMapControl.ProjectTree.RootID); rMPolygon.HeightStyle = gviHeightStyle.gviHeightOnEverything; rMPolygon.Glow(8000); this._listRender.Add(rMPolygon.Guid); } else if (objGeo.GeometryType == gviGeometryType.gviGeometryPolyline) { IPolyline polyline = objGeo as IPolyline; pt = polyline.Midpoint; IRenderPolyline rPolyline = app.Current3DMapControl.ObjectManager.CreateRenderPolyline(polyline, cs, app.Current3DMapControl.ProjectTree.RootID); rPolyline.HeightStyle = gviHeightStyle.gviHeightOnEverything; rPolyline.Glow(8000); this._listRender.Add(rPolyline.Guid); } else if (objGeo.GeometryType == gviGeometryType.gviGeometryPoint) { IPoint point = objGeo as IPoint; pt = point; IRenderPoint rPoint = app.Current3DMapControl.ObjectManager.CreateRenderPoint(point, ps, app.Current3DMapControl.ProjectTree.RootID); rPoint.Glow(8000); this._listRender.Add(rPoint.Guid); } else if (objGeo.GeometryType == gviGeometryType.gviGeometryPolygon) { IPolygon polygon = objGeo as IPolygon; pt = polygon.Centroid; IRenderPolygon rPolygon = app.Current3DMapControl.ObjectManager.CreateRenderPolygon(polygon, ss, app.Current3DMapControl.ProjectTree.RootID); rPolygon.HeightStyle = gviHeightStyle.gviHeightOnEverything; rPolygon.Glow(8000); this._listRender.Add(rPolygon.Guid); } else { return; } ITableLabel tl = DrawTool.CreateTableLabel1(1); tl.TitleText = dr["fcName"].ToString(); tl.SetRecord(0, 0, dr["Name"].ToString()); tl.Position = pt; this._listRender.Add(tl.Guid); app.Current3DMapControl.Camera.FlyToObject(tl.Guid, gviActionCode.gviActionFlyTo); } break; } }
private void InitializeComponent() { DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); this.simpleButtonCancel = new DevExpress.XtraEditors.SimpleButton(); this.simpleButtonSave = new DevExpress.XtraEditors.SimpleButton(); this.gridControlHistory = new DevExpress.XtraGrid.GridControl(); this.gridViewHistory = new DevExpress.XtraGrid.Views.Grid.GridView(); this.gridColumnId = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumnComment = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemMemoEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit(); this.repositoryItemMemoEdit2 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit(); this.gridColumnCreationDate = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumnUser = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumnCustomerContact = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumnDelete = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); this.repositoryItemButtonEdit2 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); this.memoEdit1 = new DevExpress.XtraEditors.MemoEdit(); this.layoutControlGroupQuestion1 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItemHeader = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItemHeader.Name = "layoutControlItemHeader"+Guid.NewGuid().ToString(); this.layoutControlItemPrefix = new DevExpress.XtraLayout.LayoutControlItem(); this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); // // layoutControlGroupQuestion1 // this.layoutControlGroupQuestion1.CustomizationFormText = "Root"; this.layoutControlGroupQuestion1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; this.layoutControlGroupQuestion1.AppearanceGroup.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold); this.layoutControlGroupQuestion1.AppearanceGroup.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; this.layoutControlGroupQuestion1.AppearanceGroup.Options.UseFont = true; this.layoutControlGroupQuestion1.ExpandButtonVisible = false; this.layoutControlGroupQuestion1.GroupBordersVisible = true; this.layoutControlGroupQuestion1.TextVisible = false; //this.layoutControlGroupQuestion1.Location = new System.Drawing.Point(0, 0); this.layoutControlGroupQuestion1.Padding = new DevExpress.XtraLayout.Utils.Padding(1, 1, 1, 1); this.layoutControlGroupQuestion1.ShowInCustomizationForm = false; //this.layoutControlGroupQuestion1.Text = oSettings.Label + " " + oSettings.QuestionText; this.layoutControlGroupQuestion1.BeginUpdate(); #region Prefix lprefix = new Label(); lprefix.Name = "lprefix"; lprefix.Text = ""; lprefix.Visible = false; this.layoutControlItemPrefix.Location = new System.Drawing.Point(0, 0); this.layoutControlItemPrefix.Name = "layoutControlItemPrefix1"; this.layoutControlItemPrefix.Control = lprefix; this.layoutControlItemPrefix.ShowInCustomizationForm = false; this.layoutControlItemPrefix.TextVisible = false; this.layoutControlItemPrefix.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); this.layoutControlItemPrefix.MinSize = new Size(0, 10); this.layoutControlItemPrefix.MaxSize = new Size(0, 10); this.layoutControlItemPrefix.SizeConstraintsType = SizeConstraintsType.Custom; this.layoutControlItemPrefix.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; #endregion #region Footer //bool isCustomerOwned = false; //bool isBrightvisionOwned = false; //if (oSettings.CustomerOwnership && oSettings.BVOwnership) // isCustomerOwnershipOnly = true; //ctlFooter = new Footer() { // IsAccountLevel = oSettings.DataBindings.account_level, // IsCustomerOwnershipOnly = isCustomerOwnershipOnly, // HelpText = oSettings.QuestionHelp, // LanguageCode = oSettings.DataBindings.language_code //}; Settings oSettings = Questionnaire.Form.Settings; ctlFooter = new Footer() { IsAccountLevel = oSettings.DataBindings.account_level, IsCustomerOwned = oSettings.CustomerOwnership, IsBrightvisionOwned = oSettings.BVOwnership, HelpText = oSettings.QuestionHelp, LanguageCode = oSettings.DataBindings.language_code, QuestionText = oSettings.Label + " " + oSettings.QuestionText }; ctlFooter.InitializeFooter(); ctlFooter.Dock = DockStyle.Fill; ctlFooter.Height = 20; this.layoutControlItemHeader.Control = ctlFooter; this.layoutControlItemHeader.ShowInCustomizationForm = false; this.layoutControlItemHeader.TextVisible = false; this.layoutControlItemHeader.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); this.layoutControlItemHeader.MinSize = new Size(0, 24); this.layoutControlItemHeader.MaxSize = new Size(0, 24); this.layoutControlItemHeader.Click += new EventHandler(layoutControlGroupQuestion1_Click); this.layoutControlItemHeader.SizeConstraintsType = SizeConstraintsType.Default; #endregion // // layoutControl1 // this.layoutControl1.Controls.Add(this.ctlFooter); this.layoutControl1.Controls.Add(this.simpleButtonCancel); this.layoutControl1.Controls.Add(this.simpleButtonSave); this.layoutControl1.Controls.Add(this.gridControlHistory); this.layoutControl1.Controls.Add(this.memoEdit1); this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControl1.Location = new System.Drawing.Point(0, 0); this.layoutControl1.Name = "layoutControl1"; this.layoutControl1.Root = this.layoutControlGroupQuestion1; //this.layoutControl1.Size = new System.Drawing.Size(539, 216); this.layoutControl1.TabIndex = 2; this.layoutControl1.Text = "layoutControl1"; // // simpleButtonCancel // this.simpleButtonCancel.Image = global::BrightVision.DQControl.Properties.Resources.cancel_16x16; this.simpleButtonCancel.Location = new System.Drawing.Point(498, 41); this.simpleButtonCancel.Margin = new System.Windows.Forms.Padding(1); this.simpleButtonCancel.Name = "simpleButtonCancel"; this.simpleButtonCancel.MinimumSize = new System.Drawing.Size(22, 22); this.simpleButtonCancel.MaximumSize = new System.Drawing.Size(22, 22); this.simpleButtonCancel.ImageLocation = ImageLocation.MiddleCenter; this.simpleButtonCancel.StyleController = this.layoutControl1; this.simpleButtonCancel.TabIndex = 7; this.simpleButtonCancel.ToolTip = "Cancel"; this.simpleButtonCancel.Click += new EventHandler(simpleButtonCancel_Click); // // simpleButtonSave // this.simpleButtonSave.Image = global::BrightVision.DQControl.Properties.Resources.save_16x16; this.simpleButtonSave.Location = new System.Drawing.Point(498, 7); this.simpleButtonSave.Margin = new System.Windows.Forms.Padding(1); this.simpleButtonSave.Name = "simpleButtonSave"; this.simpleButtonSave.MinimumSize = new System.Drawing.Size(22, 22); this.simpleButtonSave.MaximumSize = new System.Drawing.Size(22, 22); this.simpleButtonSave.ImageLocation = ImageLocation.MiddleCenter; this.simpleButtonSave.StyleController = this.layoutControl1; this.simpleButtonSave.TabIndex = 6; this.simpleButtonSave.Click += new EventHandler(simpleButtonSave_Click); this.simpleButtonSave.ToolTip = "Save"; // // gridControl1 // this.gridControlHistory.Location = new System.Drawing.Point(7, 75); this.gridControlHistory.MainView = this.gridViewHistory; this.gridControlHistory.Name = "gridControlHistory"; this.gridControlHistory.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.repositoryItemButtonEdit1, this.repositoryItemMemoEdit1, this.repositoryItemMemoEdit2, this.repositoryItemButtonEdit2}); this.gridControlHistory.MinimumSize = new System.Drawing.Size(0, 150); this.gridControlHistory.MaximumSize = new System.Drawing.Size(0, 150); this.gridControlHistory.Size = new Size(0, 150); this.gridControlHistory.TabIndex = 4; this.gridControlHistory.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridViewHistory}); // // gridView1 // this.gridViewHistory.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { this.gridColumnId, this.gridColumnComment, this.gridColumnCreationDate, this.gridColumnUser, this.gridColumnCustomerContact, this.gridColumnDelete}); this.gridViewHistory.GridControl = this.gridControlHistory; this.gridViewHistory.Name = "gridViewHistory"; this.gridViewHistory.OptionsSelection.EnableAppearanceFocusedCell = false; this.gridViewHistory.OptionsView.RowAutoHeight = true; this.gridViewHistory.OptionsView.ShowGroupPanel = false; this.gridViewHistory.OptionsBehavior.ReadOnly = true; //this.gridViewHistory.VertScrollVisibility = DevExpress.XtraGrid.Views.Base.ScrollVisibility.Always; this.gridViewHistory.CustomRowCellEdit += new DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventHandler(gridViewHistory_CustomRowCellEdit); // //gridcolumn id // this.gridColumnId.Caption = "Id"; this.gridColumnId.FieldName = "id"; this.gridColumnId.Name = "gridColumnId"; this.gridColumnId.Visible = false; // // gridColumn1 // this.gridColumnComment.Caption = "Comment"; this.gridColumnComment.ColumnEdit = this.repositoryItemMemoEdit1; this.gridColumnComment.FieldName = "Comment"; this.gridColumnComment.Name = "gridColumnComment"; this.gridColumnComment.Visible = true; this.gridColumnComment.VisibleIndex = 0; this.gridColumnComment.Width = 200; this.gridColumnComment.MaxWidth = 0; this.gridColumnComment.MinWidth = 0; this.gridColumnComment.ColumnEdit.EditValueChanged += new EventHandler(ColumnEdit_EditValueChanged); // // repositoryItemMemoEdit1 // this.repositoryItemMemoEdit1.Name = "repositoryItemMemoEdit1"; this.repositoryItemMemoEdit1.ReadOnly = false; this.repositoryItemMemoEdit2.Name = "repositoryItemMemoEdit2"; this.repositoryItemMemoEdit2.ReadOnly = true; // // gridColumn2 // this.gridColumnCreationDate.Caption = "Date"; this.gridColumnCreationDate.FieldName = "CreationDate"; this.gridColumnCreationDate.Name = "gridColumnCreationDate"; this.gridColumnCreationDate.Visible = true; this.gridColumnCreationDate.VisibleIndex = 1; this.gridColumnCreationDate.Width = 50; this.gridColumnCreationDate.MaxWidth = 0; this.gridColumnCreationDate.MinWidth = 0; this.gridColumnCreationDate.DisplayFormat.FormatType = FormatType.Custom; this.gridColumnCreationDate.DisplayFormat.Format = new DateCustomFormatter(); this.gridColumnCreationDate.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm"; this.gridColumnCreationDate.OptionsColumn.ReadOnly = true; // // gridColumn3 // this.gridColumnUser.Caption = "User"; this.gridColumnUser.FieldName = "User"; this.gridColumnUser.Name = "gridColumnUser"; this.gridColumnUser.Visible = true; this.gridColumnUser.VisibleIndex = 2; this.gridColumnUser.Width = 70; this.gridColumnUser.MaxWidth = 0; this.gridColumnUser.MinWidth = 0; this.gridColumnUser.OptionsColumn.ReadOnly = true; // // gridColumn4 // this.gridColumnCustomerContact.Caption = "Contact"; this.gridColumnCustomerContact.FieldName = "CustomerContact"; this.gridColumnCustomerContact.Name = "gridColumnCustomerContact"; this.gridColumnCustomerContact.Visible = true; this.gridColumnCustomerContact.VisibleIndex = 3; this.gridColumnCustomerContact.Width = 70; this.gridColumnCustomerContact.MaxWidth = 0; this.gridColumnCustomerContact.MinWidth = 0; this.gridColumnCustomerContact.OptionsColumn.ReadOnly = true; // // gridColumn5 // this.gridColumnDelete.Caption = ""; this.gridColumnDelete.ColumnEdit = this.repositoryItemButtonEdit1; this.gridColumnDelete.FieldName = ""; this.gridColumnDelete.MaxWidth = 30; this.gridColumnDelete.Name = "gridColumnDelete"; this.gridColumnDelete.Visible = true; this.gridColumnDelete.VisibleIndex = 4; this.gridColumnDelete.Width = 30; this.gridColumnDelete.OptionsColumn.ReadOnly = true; // // repositoryItemButtonEdit1 // Image img = ((System.Drawing.Image)(global::BrightVision.DQControl.Properties.Resources.cancel_16x16)); var btn = new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, DevExpress.XtraEditors.ImageLocation.MiddleCenter, img, null, null, "Delete"); this.repositoryItemButtonEdit1.Buttons.Add(btn); this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; //this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(repositoryItemButtonDelete_ButtonClick); this.repositoryItemButtonEdit1.Click += new EventHandler(repositoryItemButtonDelete_Click); //btn.Appearance.Image = img; this.repositoryItemButtonEdit2.Buttons.Add(btn); this.repositoryItemButtonEdit2.Name = "repositoryItemButtonEdit1"; this.repositoryItemButtonEdit2.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; this.repositoryItemButtonEdit2.ReadOnly = true; // // memoEdit1 // this.memoEdit1.Location = new System.Drawing.Point(7, 7); this.memoEdit1.Name = "memoEdit1"; //this.memoEdit1.MinimumSize = new Size(100, 52); //this.memoEdit1.MaximumSize = new Size(0,0); this.memoEdit1.StyleController = this.layoutControl1; this.memoEdit1.TabIndex = 8; this.memoEdit1.Properties.ScrollBars = ScrollBars.None; this.memoEdit1.TextChanged += new EventHandler(memoEdit1_TextChanged); // // emptySpaceItem1 // this.emptySpaceItem1.AllowHotTrack = false; this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1"; this.emptySpaceItem1.Location = new System.Drawing.Point(383, 52); this.emptySpaceItem1.Name = "emptySpaceItem1"; this.emptySpaceItem1.Size = new System.Drawing.Size(22, 212); this.emptySpaceItem1.Text = "emptySpaceItem1"; this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); // //gridControl // this.layoutControlItem1.Control = this.gridControlHistory; this.layoutControlItem1.CustomizationFormText = "layoutControlItem1"; this.layoutControlItem1.Location = new System.Drawing.Point(0, 68); //this.layoutControlItem1.MinSize = new System.Drawing.Size(0, 100); //this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 200); this.Size = new Size(0, 150); this.layoutControlItem1.Name = "layoutControlItem1"; this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.SupportHorzAlignment; this.layoutControlItem1.ControlAlignment = ContentAlignment.BottomCenter; //this.layoutControlItem1.Size = new Size(0, 150); this.layoutControlItem1.Text = "layoutControlItem1"; this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem1.TextToControlDistance = 0; this.layoutControlItem1.TextVisible = false; // // layoutControlItem3 // this.layoutControlItem3.Control = this.simpleButtonSave; this.layoutControlItem3.CustomizationFormText = "layoutControlItem3"; this.layoutControlItem3.Location = new System.Drawing.Point(491, 0); this.layoutControlItem3.MaxSize = new System.Drawing.Size(22, 22); this.layoutControlItem3.MinSize = new System.Drawing.Size(22, 22); this.layoutControlItem3.Padding = new DevExpress.XtraLayout.Utils.Padding(1); this.layoutControlItem3.Name = "layoutControlItem3"; this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Default; this.layoutControlItem3.Text = "layoutControlItem3"; this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem3.TextToControlDistance = 0; this.layoutControlItem3.TextVisible = false; // // layoutControlItem4 // this.layoutControlItem4.Control = this.simpleButtonCancel; this.layoutControlItem4.CustomizationFormText = "layoutControlItem4"; this.layoutControlItem4.Location = new System.Drawing.Point(491, 34); this.layoutControlItem4.MaxSize = new System.Drawing.Size(22, 102); this.layoutControlItem4.MinSize = new System.Drawing.Size(22, 22); this.layoutControlItem4.Size = new Size(22, 102); this.layoutControlItem4.Padding = new DevExpress.XtraLayout.Utils.Padding(1); this.layoutControlItem4.Name = "layoutControlItem4"; this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Default; this.layoutControlItem4.Text = "layoutControlItem4"; this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem4.TextToControlDistance = 0; this.layoutControlItem4.TextVisible = false; // // layoutControlItem2 // this.layoutControlItem2.Control = this.memoEdit1; this.layoutControlItem2.CustomizationFormText = "layoutControlItem2"; this.layoutControlItem2.Location = new System.Drawing.Point(0, 0); this.layoutControlItem2.Name = "layoutControlItem2"; this.layoutControlItem2.Text = "layoutControlItem2"; this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem1.MinSize = new Size(0, 24); this.layoutControlItem1.MaxSize = new Size(0, 24); this.layoutControlItem2.TextToControlDistance = 0; this.layoutControlItem2.TextVisible = false; this.layoutControlItem2.SizeConstraintsType = SizeConstraintsType.SupportHorzAlignment; // // testinglayout // this.layoutControlGroupQuestion1.AddItem(this.layoutControlItemHeader); this.layoutControlGroupQuestion1.AddItem(this.layoutControlItemPrefix); this.layoutControlGroupQuestion1.AddItem(this.layoutControlItem2); this.layoutControlGroupQuestion1.AddItem(this.layoutControlItem3, this.layoutControlItem2, DevExpress.XtraLayout.Utils.InsertType.Right); this.layoutControlGroupQuestion1.AddItem(this.layoutControlItem4, this.layoutControlItem3, DevExpress.XtraLayout.Utils.InsertType.Bottom); this.layoutControlGroupQuestion1.AddItem(this.layoutControlItem1); this.layoutControlGroupQuestion1.Click += new EventHandler(layoutControlGroupQuestion1_Click); this.layoutControlGroupQuestion1.EndUpdate(); }