private void FillNewRow(SchemaObject schemaObject, Func <SchemaObject, BaseRow> rowConstructor) { CategoryRow categoryRow = null; if (!string.IsNullOrEmpty(schemaObject.ParentPath)) { categoryRow = PropertyGridControl.GetRowByName(schemaObject.ParentPath) as CategoryRow; } if (categoryRow != null) { var row = rowConstructor(schemaObject); if (row != null) { categoryRow.ChildRows.Add(row); } } else { var row = rowConstructor(schemaObject); if (row != null) { PropertyGridControl.Rows.Add(row); } } }
/// <summary> /// 打开配置窗体 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="propertyGridControl"></param> /// <param name="t"></param> private void OpenConfigWindow(PropertyGridControl propertyGridControl, Window window) { MainView mainWindow = (((((propertyGridControl.Parent as ScrollViewer).Parent as Grid).Parent) as Grid).Parent as Grid).Parent as MainView; window.WindowStartupLocation = WindowStartupLocation.CenterOwner; window.Owner = mainWindow; window.ShowDialog(); }
public EditorDialogMultipleChoiceValues(CampaignQuestionnaire oQuestionnaire, PropertyGridControl sourcePropertyGrid) { InitializeComponent(); sourcePG = sourcePropertyGrid; campaignQuestionnaire = oQuestionnaire; answerOptionList = campaignQuestionnaire.Form.Settings.AnswerOptions; CreateEditorRows(); }
private void HideGridProperties() { PropertyGridControl grid = LayoutTreeHelper.GetVisualChildren(this).Where(x => x is PropertyGridControl).Cast<PropertyGridControl>().FirstOrDefault(); if(grid == null) return; HideProperty(grid, dataSourcePropertyName); HideProperty(grid, dataMemberPropertyName); HideProperty(grid, dataAdapterPropertyName); }
public EditorDialogAnswerOptions(CampaignQuestionnaire oQuestionnaire, PropertyGridControl sourcePropertyGrid) { InitializeComponent(); this.KeyPreview = true; sourcePG = sourcePropertyGrid; campaignQuestionnaire = oQuestionnaire; answerOptionList = campaignQuestionnaire.Form.Settings.AnswerOptions; CreateEditorRows(); }
private static void HideProperty(PropertyGridControl grid, string propertyName) { PropertyDefinitionBase propertyInstance = grid.PropertyDefinitions.FirstOrDefault(x=> x.Path == propertyName); if(propertyInstance == null){ propertyInstance = new PropertyDefinition() { Path = propertyName, }; grid.PropertyDefinitions.Add(propertyInstance); } propertyInstance.Visibility = System.Windows.Visibility.Collapsed; }
public EditorDialogOtherChoices(CampaignQuestionnaire oQuestionnaire, PropertyGridControl sourcePropertyGrid, OtherChoiceOptions options = OtherChoiceOptions.OtherChoice) { InitializeComponent(); sourcePG = sourcePropertyGrid; campaignQuestionnaire = oQuestionnaire; answerOptionList = campaignQuestionnaire.Form.Settings.AnswerOptions; oChoiceOption = options; CreateEditorRows(); }
private void OnCustomRecordCellEdit(object sender, GetCustomRowCellEditEventArgs e) { PropertyGridControl control = (PropertyGridControl)sender; MemberInfo[] mi = control.SelectedObject.GetType().GetMember(e.Row.Properties.FieldName); PasswordPropertyTextAttribute attr = (PasswordPropertyTextAttribute)Attribute.GetCustomAttribute(mi[0], typeof(PasswordPropertyTextAttribute)); if (attr != null && attr.Password) { e.RepositoryItem = passwordEdit; } }
private void OnCustomPropertyDescriptors(object sender, DevExpress.XtraVerticalGrid.Events.CustomPropertyDescriptorsEventArgs e) { PropertyGridControl grid = sender as PropertyGridControl; PropertyDescriptorCollection sourceColl = TypeDescriptor.GetProperties(grid.SelectedObject); PropertyDescriptorCollection destColl = new PropertyDescriptorCollection(null); foreach (PropertyDescriptor pd in sourceColl) { destColl.Add(new MyPropertyDescriptor(pd)); } e.Properties = destColl; }
public CameraSettings(IManagedCamera cam) { InitializeComponent(); gridControl = new PropertyGridControl(); Grid.SetRow(gridControl, 1); LayoutLeft.Children.Add(gridControl); SetCamera(cam); }
protected override void OnPreviewMouseDown(MouseButtonEventArgs e) { base.OnPreviewMouseDown(e); DesignerCanvas designer = VisualTreeHelper.GetParent(this) as DesignerCanvas; // update selection if (designer != null) { if ((Keyboard.Modifiers & (ModifierKeys.Shift | ModifierKeys.Control)) != ModifierKeys.None) { if (this.IsSelected) { designer.SelectionService.RemoveFromSelection(this); } else { designer.SelectionService.AddToSelection(this); } } else if (!this.IsSelected) { designer.SelectionService.SelectItem(this); //if (!string.IsNullOrEmpty(this.RealatedPorpertyCardName)) //{ this.RealatedPorpertyCardName = "PropertyGridCard"; PropertyGridControl card = designer.FindName(this.RealatedPorpertyCardName) as PropertyGridControl; if (card != null) { var count = VisualTreeHelper.GetChildrenCount(this); for (int i = 0; i <= count - 1; i++) { var child = VisualTreeHelper.GetChild(this, i); var length = VisualTreeHelper.GetChildrenCount(child); for (int j = 0; j < length; j++) { var aa = VisualTreeHelper.GetChild(child, j) as ContentPresenter; if (aa != null) { card.SelectedObject = aa.Content; } } } } } Focus(); } e.Handled = false; }
/// <summary> /// 配置数据源 /// </summary> /// <param name="propertyGridControl"></param> private void ConfigDataSource(PropertyGridControl propertyGridControl) { if (propertyGridControl != null) { IChartControl chartControl = propertyGridControl.SelectedObject as IChartControl; if (chartControl != null) { IChartViewModel singleHisViewModel = chartControl.ChartViewModel; DataSourceSelectView dataSourceConfigView = new DataSourceSelectView(singleHisViewModel); OpenConfigWindow(propertyGridControl, dataSourceConfigView); } } }
/// <summary> /// 配置数据接口 /// </summary> /// <param name="propertyGridControl"></param> private void ConfigDataInterface(PropertyGridControl propertyGridControl) { if (propertyGridControl != null) { IChartControl chartControl = propertyGridControl.SelectedObject as IChartControl; if (chartControl != null) { IChartViewModel singleHisViewModel = chartControl.ChartViewModel; InterfaceSelectView interfaceView = new InterfaceSelectView(singleHisViewModel); OpenConfigWindow(propertyGridControl, interfaceView); } } }
public static void LoadGridProperty(PanelControl panelControl1, object gv, ListAction ribbonControl1 = null) { if (panelControl1.Controls.Count > 0) { panelControl1.Controls.RemoveAt(0); } PropertyGridControl propertyGridControl1 = new PropertyGridControl(); ((ISupportInitialize)(propertyGridControl1)).BeginInit(); propertyGridControl1.Dock = DockStyle.Fill; panelControl1.Width = 340; panelControl1.Controls.Add(propertyGridControl1); panelControl1.Visible = true; ((ISupportInitialize)(propertyGridControl1)).EndInit(); propertyGridControl1.Visible = true; propertyGridControl1.FindPanelVisible = true; propertyGridControl1.SelectedObject = gv; propertyGridControl1.RetrieveFields(); if (ribbonControl1 != null) { ribbonControl1.SettingsButtonEnable(false); } //foreach (var item in ribbonControl1.Items) //{ // if (item.ToString() == "DevExpress.XtraBars.BarButtonItem" || // item.ToString() == "DevExpress.XtraBars.BarSubItem") // { // if (item.ToString() == "DevExpress.XtraBars.BarSubItem") // { // var it = (BarSubItem)item; // if (it.Name != "customizedBarSubItem") // it.Enabled = false; // } // else // { // var it1 = (BarButtonItem)item; // if (@"gridBarButtonItem,columnBarButtonItem,resetGridBarButtonItem,cancelSettingsBarButtonItem,closeBarButtonItem".IndexOf(it1.Name, StringComparison.Ordinal) < // 0) // { // it1.Enabled = false; // } // } // } //} }
private PropertyGridControl GetElementEditor(string elementType, Action <PropertyCollection> elementProperties) { PropertyGridControl elementEditor; if (!_elementEditors.TryGetValue(elementType, out elementEditor)) { elementEditor = new PropertyGridControl(); elementProperties(elementEditor.Properties); _elementEditors.Add(elementType, elementEditor); } return(elementEditor); }
private void GridForm_GridViewColumnMenu_click(object sender, EventArgs e) { PropertyGridControl propertyGridControl = new PropertyGridControl(); propertyGridControl.SelectedObject = column; propertyGridControl.Dock = System.Windows.Forms.DockStyle.Fill; XtraForm propertyForm = new XtraForm(); propertyForm.Owner = form; propertyForm.Text = "Grid Column Property: " + column.Caption; propertyForm.Controls.Add(propertyGridControl); propertyForm.Width = 300; propertyForm.Height = 500; propertyForm.Show(); }
private void FieldPropertyMenuItem_Click(object sender, EventArgs e) { PropertyGridControl propertyGridControl = new PropertyGridControl(); propertyGridControl.SelectedObject = field; propertyGridControl.Dock = System.Windows.Forms.DockStyle.Fill; XtraForm propertyForm = new XtraForm(); propertyForm.Text = "Pivot Field Property: " + field.Caption; propertyForm.Owner = pivotForm; propertyForm.Width = 400; propertyForm.Height = 500; propertyForm.Controls.Add(propertyGridControl); propertyForm.Show(); }
private void PivotLayoutProperty_Click(object sender, EventArgs e) { PropertyGridControl propertyGridControl = new PropertyGridControl(); propertyGridControl.SelectedObject = pivotGrid; propertyGridControl.Dock = System.Windows.Forms.DockStyle.Fill; XtraForm propertyForm = new XtraForm(); propertyForm.Text = "Pivot Property: " + pivotForm.Text; propertyForm.Controls.Add(propertyGridControl); propertyForm.Owner = pivotForm; propertyForm.Width = 300; propertyForm.Height = 500; propertyForm.Show(); }
private void GridForm_GridViewPropertyMenuItem_Click(object sender, EventArgs e) { PropertyGridControl propertyGridControl = new PropertyGridControl(); GridView view = (GridView)gridControl.MainView; propertyGridControl.SelectedObject = view; propertyGridControl.Dock = System.Windows.Forms.DockStyle.Fill; XtraForm propertyForm = new XtraForm(); propertyForm.Text = "Grid Property: " + form.Text; propertyForm.Owner = form; propertyForm.Controls.Add(propertyGridControl); propertyForm.Width = 300; propertyForm.Height = 500; propertyForm.Show(); }
private void AddElementEditor(PrintElementNode elementNode) { PropertyGridControl elementEditor = null; if (elementNode != null) { elementEditor = GetElementEditor(elementNode.ElementType); if (elementEditor != null) { elementEditor.EditValue = elementNode.ElementMetadata; elementEditor.EditValueChanged += OnElementEditorValueChanged; } } Content = elementEditor; }
private void PropertyGridControl_CustomRecordCellEdit(object sender, DevExpress.XtraVerticalGrid.Events.GetCustomRowCellEditEventArgs e) { RepositoryItem repositoryItem = null; var propDesc = PropertyGridControl.GetPropertyDescriptor(e.Row); if (propDesc == null) { return; } var controller = Controller as ObjectPropertyEditController; if (controller != null) { var editController = controller.GetPredefinedEditController(propDesc.PropertyType, propDesc.Name); if (editController != null) { repositoryItem = editController.CreateRepositoryItem(propDesc.PropertyType); } } if (repositoryItem == null) { if (propDesc.PropertyType.IsAddon()) { // 如果是插件,统一使用CommonObjectEditControl,这样可以新增空对象 var editController = new CommonObjectEditController(); editController.StartEditProperty(EditValue, propDesc.Name); repositoryItem = editController.CreateRepositoryItem(propDesc.PropertyType); } else { repositoryItem = EditorPublic.CreateRepositoryItem(propDesc); } } if (repositoryItem != null) { e.RepositoryItem = repositoryItem; } }
private void IteratePropertyGridControl(PropertyGridControl pgc) { IteratePropertyGridControl(pgc.Rows); }
protected virtual void FirePropertyValueChanged(CellValueChangedEventArgs args) { PropertyValueChanged?.Invoke(this, new PropertyValueChangedEventArgs(args, PropertyGridControl.GetPropertyDescriptor(args.Row))); }
public FilePropertyEditorSettings(PropertyGridControl propertyGridControl, string filterExtensions) { this.propertyGridControl = propertyGridControl; // В info должен быть фильтр расширений для диалога. Если передан null, // будем показывать все файлы. this.filterExtensions = filterExtensions ?? "*.*|*.*"; DefaultButtonClick += FilePropertyEditorSettings_DefaultButtonClick; }
private void InitializeComponent() { this.splitContainerMain = new SplitContainer(); this.OptionsTree = new GPGTreeView(); this.splitContainerGridAndLabel = new SplitContainer(); this.pgcProps = new PropertyGridControl(); this.riComboBox = new RepositoryItemComboBox(); this.repositoryItemColorEdit1 = new RepositoryItemColorEdit(); this.repositoryItemTextEdit1 = new RepositoryItemTextEdit(); this.repositoryItemLookUpEdit1 = new RepositoryItemLookUpEdit(); this.repositoryItemComboBox1 = new RepositoryItemComboBox(); this.repositoryItemTextEdit2 = new RepositoryItemTextEdit(); this.editor_Color = new RepositoryItemColorEdit(); this.repositoryItemTextEdit3 = new RepositoryItemTextEdit(); this.gpgLabelDescription = new GPGLabel(); this.splitContainerMain.Panel1.SuspendLayout(); this.splitContainerMain.Panel2.SuspendLayout(); this.splitContainerMain.SuspendLayout(); this.splitContainerGridAndLabel.Panel1.SuspendLayout(); this.splitContainerGridAndLabel.Panel2.SuspendLayout(); this.splitContainerGridAndLabel.SuspendLayout(); this.pgcProps.BeginInit(); this.riComboBox.BeginInit(); this.repositoryItemColorEdit1.BeginInit(); this.repositoryItemTextEdit1.BeginInit(); this.repositoryItemLookUpEdit1.BeginInit(); this.repositoryItemComboBox1.BeginInit(); this.repositoryItemTextEdit2.BeginInit(); this.editor_Color.BeginInit(); this.repositoryItemTextEdit3.BeginInit(); base.SuspendLayout(); this.splitContainerMain.BackColor = Color.FromArgb(0xcc, 0xcc, 0xff); this.splitContainerMain.Dock = DockStyle.Fill; this.splitContainerMain.Location = new Point(2, 2); this.splitContainerMain.Margin = new Padding(0); this.splitContainerMain.Name = "splitContainerMain"; this.splitContainerMain.Panel1.Controls.Add(this.OptionsTree); this.splitContainerMain.Panel2.Controls.Add(this.splitContainerGridAndLabel); this.splitContainerMain.Size = new Size(0x1cf, 0x12f); this.splitContainerMain.SplitterDistance = 0x99; this.splitContainerMain.TabIndex = 1; this.OptionsTree.BackColor = Color.Black; this.OptionsTree.BorderStyle = BorderStyle.None; this.OptionsTree.Dock = DockStyle.Fill; this.OptionsTree.ForeColor = Color.White; this.OptionsTree.HideSelection = false; this.OptionsTree.Location = new Point(0, 0); this.OptionsTree.Margin = new Padding(0); this.OptionsTree.Name = "OptionsTree"; this.OptionsTree.Size = new Size(0x99, 0x12f); this.OptionsTree.TabIndex = 0; this.splitContainerGridAndLabel.Dock = DockStyle.Fill; this.splitContainerGridAndLabel.Location = new Point(0, 0); this.splitContainerGridAndLabel.Name = "splitContainerGridAndLabel"; this.splitContainerGridAndLabel.Orientation = Orientation.Horizontal; this.splitContainerGridAndLabel.Panel1.BackColor = Color.LightSteelBlue; this.splitContainerGridAndLabel.Panel1.Controls.Add(this.pgcProps); this.splitContainerGridAndLabel.Panel2.Controls.Add(this.gpgLabelDescription); this.splitContainerGridAndLabel.Size = new Size(0x132, 0x12f); this.splitContainerGridAndLabel.SplitterDistance = 0xe7; this.splitContainerGridAndLabel.SplitterWidth = 2; this.splitContainerGridAndLabel.TabIndex = 0; this.pgcProps.Appearance.Empty.BackColor = Color.LightSteelBlue; this.pgcProps.Appearance.Empty.Options.UseBackColor = true; this.pgcProps.AutoGenerateRows = true; this.pgcProps.BorderStyle = BorderStyles.NoBorder; this.pgcProps.DefaultEditors.AddRange(new DevExpress.XtraVerticalGrid.Rows.DefaultEditor[] { new DevExpress.XtraVerticalGrid.Rows.DefaultEditor(null, this.riComboBox), new DevExpress.XtraVerticalGrid.Rows.DefaultEditor(typeof(Color), this.repositoryItemColorEdit1) }); this.pgcProps.Dock = DockStyle.Fill; this.pgcProps.Location = new Point(0, 0); this.pgcProps.LookAndFeel.SkinName = "Money Twins"; this.pgcProps.LookAndFeel.UseDefaultLookAndFeel = false; this.pgcProps.Margin = new Padding(0); this.pgcProps.Name = "pgcProps"; this.pgcProps.OptionsBehavior.UseEnterAsTab = true; this.pgcProps.RepositoryItems.AddRange(new RepositoryItem[] { this.repositoryItemTextEdit1, this.repositoryItemLookUpEdit1, this.repositoryItemComboBox1, this.riComboBox, this.repositoryItemTextEdit2, this.editor_Color, this.repositoryItemColorEdit1, this.repositoryItemTextEdit3 }); this.pgcProps.Size = new Size(0x132, 0xe7); this.pgcProps.TabIndex = 4; this.pgcProps.RowChanging += new RowChangingEventHandler(this.pgcProps_RowChanging); this.riComboBox.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); this.riComboBox.Items.AddRange(new object[] { "None", "True", "False" }); this.riComboBox.Name = "riComboBox"; this.repositoryItemColorEdit1.AutoHeight = false; this.repositoryItemColorEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemColorEdit1.Name = "repositoryItemColorEdit1"; this.repositoryItemTextEdit1.AutoHeight = false; this.repositoryItemTextEdit1.Name = "repositoryItemTextEdit1"; this.repositoryItemLookUpEdit1.AutoHeight = false; this.repositoryItemLookUpEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemLookUpEdit1.Name = "repositoryItemLookUpEdit1"; this.repositoryItemComboBox1.AutoHeight = false; this.repositoryItemComboBox1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemComboBox1.Name = "repositoryItemComboBox1"; this.repositoryItemTextEdit2.Appearance.Options.UseTextOptions = true; this.repositoryItemTextEdit2.Appearance.TextOptions.HAlignment = HorzAlignment.Near; this.repositoryItemTextEdit2.AppearanceDisabled.Options.UseTextOptions = true; this.repositoryItemTextEdit2.AppearanceDisabled.TextOptions.HAlignment = HorzAlignment.Near; this.repositoryItemTextEdit2.AppearanceFocused.Options.UseTextOptions = true; this.repositoryItemTextEdit2.AppearanceFocused.TextOptions.HAlignment = HorzAlignment.Near; this.repositoryItemTextEdit2.AutoHeight = false; this.repositoryItemTextEdit2.DisplayFormat.FormatType = FormatType.Numeric; this.repositoryItemTextEdit2.EditFormat.FormatType = FormatType.Numeric; this.repositoryItemTextEdit2.HideSelection = false; this.repositoryItemTextEdit2.Name = "repositoryItemTextEdit2"; this.editor_Color.AutoHeight = false; this.editor_Color.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); this.editor_Color.Name = "editor_Color"; this.repositoryItemTextEdit3.AutoHeight = false; this.repositoryItemTextEdit3.Name = "repositoryItemTextEdit3"; this.gpgLabelDescription.AutoStyle = false; this.gpgLabelDescription.BackColor = Color.LightSteelBlue; this.gpgLabelDescription.Dock = DockStyle.Fill; this.gpgLabelDescription.Font = new Font("Verdana", 8f, FontStyle.Bold, GraphicsUnit.Point, 0); this.gpgLabelDescription.ForeColor = Color.Black; this.gpgLabelDescription.IgnoreMouseWheel = false; this.gpgLabelDescription.IsStyled = false; this.gpgLabelDescription.Location = new Point(0, 0); this.gpgLabelDescription.Name = "gpgLabelDescription"; this.gpgLabelDescription.Size = new Size(0x132, 70); this.gpgLabelDescription.TabIndex = 0; this.gpgLabelDescription.TextAlign = ContentAlignment.MiddleCenter; this.gpgLabelDescription.TextStyle = TextStyles.Default; base.AutoScaleDimensions = new SizeF(6f, 13f); base.AutoScaleMode = AutoScaleMode.Font; this.BackColor = Color.Black; base.Controls.Add(this.splitContainerMain); base.Margin = new Padding(0); base.Name = "GPGOptionsEditor"; base.Padding = new Padding(2); base.Size = new Size(0x1d3, 0x133); this.splitContainerMain.Panel1.ResumeLayout(false); this.splitContainerMain.Panel2.ResumeLayout(false); this.splitContainerMain.ResumeLayout(false); this.splitContainerGridAndLabel.Panel1.ResumeLayout(false); this.splitContainerGridAndLabel.Panel2.ResumeLayout(false); this.splitContainerGridAndLabel.ResumeLayout(false); this.pgcProps.EndInit(); this.riComboBox.EndInit(); this.repositoryItemColorEdit1.EndInit(); this.repositoryItemTextEdit1.EndInit(); this.repositoryItemLookUpEdit1.EndInit(); this.repositoryItemComboBox1.EndInit(); this.repositoryItemTextEdit2.EndInit(); this.editor_Color.EndInit(); this.repositoryItemTextEdit3.EndInit(); base.ResumeLayout(false); }
void SingleHisDT(PropertyGridControl propertyGridControl) { ConfigDataInterface(propertyGridControl); }
void SingleHisDS(PropertyGridControl propertyGridControl) { ConfigDataSource(propertyGridControl); }
public static BaseEditSettings GetSettings(string editorTypeName, string info, PropertyGridControl propertyGridControl, IWixPropertyGridControlDataSource dataSource) { switch (editorTypeName) { case WixPropertyEditorsNames.FilePropertyEditor: return new FilePropertyEditorSettings(propertyGridControl, info); case WixPropertyEditorsNames.DirectoryComboBoxPropertyEditor: return new DirectoryComboBoxPropertyEditor(dataSource); case WixPropertyEditorsNames.FeatureDisplayComboBoxPropertyEditor: return new FeatureDisplayComboBoxPropertyEditor(); case WixPropertyEditorsNames.FeatureAbsentComboBoxPropertyEditor: return new FeatureAbsentComboBoxPropertyEditor(); case WixPropertyEditorsNames.SqlScriptSequenceSpinEditPropertyEditor: return new SqlScriptSequenceSpinEditPropertyEditor(); default: return null; } }
private void InitializeComponent() { this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); this.btnCancel = new DevExpress.XtraEditors.SimpleButton(); this.propertyDescriptionControl1 = new DevExpress.XtraVerticalGrid.PropertyDescriptionControl(); this.propertyGridControl1 = new DevExpress.XtraVerticalGrid.PropertyGridControl(); this.txtDuration = new DevExpress.XtraEditors.Repository.RepositoryItemSpinEdit(); this.txtComment = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit(); this.txtName = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); this.row = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_name = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_comment = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_duration = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.row11 = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_x = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_y = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_z = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_heading = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_tilt = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.r_roll = new DevExpress.XtraVerticalGrid.Rows.EditorRow(); this.btnOK = new DevExpress.XtraEditors.SimpleButton(); this.layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); this.layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.propertyGridControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txtDuration)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txtComment)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txtName)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); this.SuspendLayout(); // // layoutControl1 // this.layoutControl1.Controls.Add(this.btnCancel); this.layoutControl1.Controls.Add(this.propertyDescriptionControl1); this.layoutControl1.Controls.Add(this.propertyGridControl1); this.layoutControl1.Controls.Add(this.btnOK); this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutControl1.Location = new System.Drawing.Point(0, 0); this.layoutControl1.Name = "layoutControl1"; this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(601, 110, 250, 350); this.layoutControl1.Root = this.layoutControlGroup1; this.layoutControl1.Size = new System.Drawing.Size(312, 374); this.layoutControl1.TabIndex = 0; this.layoutControl1.Text = "layoutControl1"; // // btnCancel // this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Location = new System.Drawing.Point(161, 350); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(149, 22); this.btnCancel.StyleController = this.layoutControl1; this.btnCancel.TabIndex = 3; this.btnCancel.Text = "取消"; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // propertyDescriptionControl1 // this.propertyDescriptionControl1.Location = new System.Drawing.Point(2, 282); this.propertyDescriptionControl1.Name = "propertyDescriptionControl1"; this.propertyDescriptionControl1.PropertyGrid = this.propertyGridControl1; this.propertyDescriptionControl1.Size = new System.Drawing.Size(308, 64); this.propertyDescriptionControl1.TabIndex = 1; this.propertyDescriptionControl1.TabStop = false; // // propertyGridControl1 // this.propertyGridControl1.Location = new System.Drawing.Point(2, 2); this.propertyGridControl1.Name = "propertyGridControl1"; this.propertyGridControl1.OptionsBehavior.ResizeHeaderPanel = false; this.propertyGridControl1.OptionsBehavior.ResizeRowHeaders = false; this.propertyGridControl1.OptionsBehavior.ResizeRowValues = false; this.propertyGridControl1.OptionsBehavior.UseDefaultEditorsCollection = false; this.propertyGridControl1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { this.txtDuration, this.txtComment, this.txtName }); this.propertyGridControl1.Rows.AddRange(new DevExpress.XtraVerticalGrid.Rows.BaseRow[] { this.row, this.row11 }); this.propertyGridControl1.ShowButtonMode = DevExpress.XtraVerticalGrid.ShowButtonModeEnum.ShowAlways; this.propertyGridControl1.Size = new System.Drawing.Size(308, 265); this.propertyGridControl1.TabIndex = 0; // // txtDuration // this.txtDuration.AutoHeight = false; this.txtDuration.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton() }); this.txtDuration.MaxValue = new decimal(new int[] { 65535, 0, 0, 0 }); this.txtDuration.MinValue = new decimal(new int[] { 1, 0, 0, 0 }); this.txtDuration.Name = "txtDuration"; // // txtComment // this.txtComment.MaxLength = 256; this.txtComment.Name = "txtComment"; // // txtName // this.txtName.AutoHeight = false; this.txtName.MaxLength = 100; this.txtName.Name = "txtName"; // // row // this.row.ChildRows.AddRange(new DevExpress.XtraVerticalGrid.Rows.BaseRow[] { this.r_name, this.r_comment, this.r_duration }); this.row.Name = "row"; this.row.Properties.Caption = "编辑"; this.row.Properties.FieldName = "Property1"; this.row.Properties.ReadOnly = true; // // r_name // this.r_name.Name = "r_name"; this.r_name.Properties.Caption = "名称"; this.r_name.Properties.FieldName = "Name"; this.r_name.Properties.RowEdit = this.txtName; // // r_comment // this.r_comment.Height = 70; this.r_comment.Name = "r_comment"; this.r_comment.Properties.Caption = "说明"; this.r_comment.Properties.FieldName = "Comment"; this.r_comment.Properties.RowEdit = this.txtComment; // // r_duration // this.r_duration.Name = "r_duration"; this.r_duration.Properties.Caption = "播放间隔(秒)"; this.r_duration.Properties.FieldName = "Duration"; this.r_duration.Properties.RowEdit = this.txtDuration; // // row11 // this.row11.ChildRows.AddRange(new DevExpress.XtraVerticalGrid.Rows.BaseRow[] { this.r_x, this.r_y, this.r_z, this.r_heading, this.r_tilt, this.r_roll }); this.row11.Name = "row11"; this.row11.Properties.Caption = "相机位置"; this.row11.Properties.FieldName = "Property2"; this.row11.Properties.ReadOnly = true; // // r_x // this.r_x.Name = "r_x"; this.r_x.Properties.Caption = "X"; this.r_x.Properties.FieldName = "X"; this.r_x.Properties.ReadOnly = true; // // r_y // this.r_y.Name = "r_y"; this.r_y.Properties.Caption = "Y"; this.r_y.Properties.FieldName = "Y"; this.r_y.Properties.ReadOnly = true; // // r_z // this.r_z.Name = "r_z"; this.r_z.Properties.Caption = "Z"; this.r_z.Properties.FieldName = "Z"; this.r_z.Properties.ReadOnly = true; // // r_heading // this.r_heading.Name = "r_heading"; this.r_heading.Properties.Caption = "Heading"; this.r_heading.Properties.FieldName = "Heading"; this.r_heading.Properties.ReadOnly = true; // // r_tilt // this.r_tilt.Name = "r_tilt"; this.r_tilt.Properties.Caption = "Tilt"; this.r_tilt.Properties.FieldName = "Tilt"; this.r_tilt.Properties.ReadOnly = true; // // r_roll // this.r_roll.Name = "r_roll"; this.r_roll.Properties.Caption = "Roll"; this.r_roll.Properties.FieldName = "Roll"; this.r_roll.Properties.ReadOnly = true; // // btnOK // this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.Location = new System.Drawing.Point(2, 350); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(155, 22); this.btnOK.StyleController = this.layoutControl1; this.btnOK.TabIndex = 2; this.btnOK.Text = "确定"; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // layoutControlGroup1 // this.layoutControlGroup1.CustomizationFormText = "layoutControlGroup1"; this.layoutControlGroup1.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; this.layoutControlGroup1.GroupBordersVisible = false; this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { this.layoutControlItem3, this.layoutControlItem1, this.layoutControlItem2, this.emptySpaceItem1, this.layoutControlItem4 }); this.layoutControlGroup1.Location = new System.Drawing.Point(0, 0); this.layoutControlGroup1.Name = "layoutControlGroup1"; this.layoutControlGroup1.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); this.layoutControlGroup1.Size = new System.Drawing.Size(312, 374); this.layoutControlGroup1.Text = "layoutControlGroup1"; this.layoutControlGroup1.TextVisible = false; // // layoutControlItem3 // this.layoutControlItem3.Control = this.btnOK; this.layoutControlItem3.CustomizationFormText = "layoutControlItem3"; this.layoutControlItem3.Location = new System.Drawing.Point(0, 348); this.layoutControlItem3.Name = "layoutControlItem3"; this.layoutControlItem3.Size = new System.Drawing.Size(159, 26); this.layoutControlItem3.Text = "layoutControlItem3"; this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem3.TextToControlDistance = 0; this.layoutControlItem3.TextVisible = false; // // layoutControlItem1 // this.layoutControlItem1.Control = this.propertyGridControl1; this.layoutControlItem1.CustomizationFormText = "layoutControlItem1"; this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); this.layoutControlItem1.Name = "layoutControlItem1"; this.layoutControlItem1.Size = new System.Drawing.Size(312, 269); this.layoutControlItem1.Text = "layoutControlItem1"; this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem1.TextToControlDistance = 0; this.layoutControlItem1.TextVisible = false; // // layoutControlItem2 // this.layoutControlItem2.Control = this.propertyDescriptionControl1; this.layoutControlItem2.CustomizationFormText = "layoutControlItem2"; this.layoutControlItem2.Location = new System.Drawing.Point(0, 280); this.layoutControlItem2.Name = "layoutControlItem2"; this.layoutControlItem2.Size = new System.Drawing.Size(312, 68); this.layoutControlItem2.Text = "layoutControlItem2"; this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem2.TextToControlDistance = 0; this.layoutControlItem2.TextVisible = false; // // emptySpaceItem1 // this.emptySpaceItem1.AllowHotTrack = false; this.emptySpaceItem1.CustomizationFormText = "emptySpaceItem1"; this.emptySpaceItem1.Location = new System.Drawing.Point(0, 269); this.emptySpaceItem1.Name = "emptySpaceItem1"; this.emptySpaceItem1.Size = new System.Drawing.Size(312, 11); this.emptySpaceItem1.Text = "emptySpaceItem1"; this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); // // layoutControlItem4 // this.layoutControlItem4.Control = this.btnCancel; this.layoutControlItem4.CustomizationFormText = "layoutControlItem4"; this.layoutControlItem4.Location = new System.Drawing.Point(159, 348); this.layoutControlItem4.Name = "layoutControlItem4"; this.layoutControlItem4.Size = new System.Drawing.Size(153, 26); this.layoutControlItem4.Text = "layoutControlItem4"; this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); this.layoutControlItem4.TextToControlDistance = 0; this.layoutControlItem4.TextVisible = false; // // FormEditLocation // this.AcceptButton = this.btnOK; this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.btnCancel; this.ClientSize = new System.Drawing.Size(312, 374); this.Controls.Add(this.layoutControl1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; this.Name = "FormEditLocation"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "特定场景属性"; ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); this.layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.propertyGridControl1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txtDuration)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txtComment)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txtName)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlGroup1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); this.ResumeLayout(false); }
private void InitializeComponent() { this.gpgLogGrid = new GPGChatGrid(); this.gvLogView = new GridView(); this.colTime = new GridColumn(); this.repositoryItemTimeEdit1 = new RepositoryItemTimeEdit(); this.colType = new GridColumn(); this.colDescription = new GridColumn(); this.colData = new GridColumn(); this.rimMemoEdit3 = new RepositoryItemMemoEdit(); this.rimPictureEdit3 = new RepositoryItemPictureEdit(); this.rimTextEdit = new RepositoryItemTextEdit(); this.riPopup = new RepositoryItemPopupContainerEdit(); this.pcPropertyView = new PopupContainerControl(); this.pgData = new PropertyGridControl(); this.repositoryItemMemoExEdit1 = new RepositoryItemMemoExEdit(); this.btnCancel = new GPGButton(); this.gpgLogGrid.BeginInit(); this.gvLogView.BeginInit(); this.repositoryItemTimeEdit1.BeginInit(); this.rimMemoEdit3.BeginInit(); this.rimPictureEdit3.BeginInit(); this.rimTextEdit.BeginInit(); this.riPopup.BeginInit(); this.pcPropertyView.BeginInit(); this.pcPropertyView.SuspendLayout(); this.pgData.BeginInit(); this.repositoryItemMemoExEdit1.BeginInit(); base.SuspendLayout(); base.ttDefault.DefaultController.AutoPopDelay = 0x3e8; this.gpgLogGrid.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; this.gpgLogGrid.CustomizeStyle = false; this.gpgLogGrid.EmbeddedNavigator.Name = ""; this.gpgLogGrid.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0); this.gpgLogGrid.IgnoreMouseWheel = false; this.gpgLogGrid.Location = new Point(13, 0x4c); this.gpgLogGrid.LookAndFeel.SkinName = "Money Twins"; this.gpgLogGrid.LookAndFeel.UseDefaultLookAndFeel = false; this.gpgLogGrid.MainView = this.gvLogView; this.gpgLogGrid.Name = "gpgLogGrid"; this.gpgLogGrid.RepositoryItems.AddRange(new RepositoryItem[] { this.rimPictureEdit3, this.rimTextEdit, this.rimMemoEdit3, this.riPopup, this.repositoryItemTimeEdit1, this.repositoryItemMemoExEdit1 }); this.gpgLogGrid.ShowOnlyPredefinedDetails = true; this.gpgLogGrid.Size = new Size(0x268, 0x138); this.gpgLogGrid.TabIndex = 0x1c; this.gpgLogGrid.ViewCollection.AddRange(new BaseView[] { this.gvLogView }); this.gvLogView.ActiveFilterString = ""; this.gvLogView.Appearance.ColumnFilterButton.BackColor = Color.Black; this.gvLogView.Appearance.ColumnFilterButton.BackColor2 = Color.FromArgb(20, 20, 20); this.gvLogView.Appearance.ColumnFilterButton.BorderColor = Color.Black; this.gvLogView.Appearance.ColumnFilterButton.ForeColor = Color.Gray; this.gvLogView.Appearance.ColumnFilterButton.Options.UseBackColor = true; this.gvLogView.Appearance.ColumnFilterButton.Options.UseBorderColor = true; this.gvLogView.Appearance.ColumnFilterButton.Options.UseForeColor = true; this.gvLogView.Appearance.ColumnFilterButtonActive.BackColor = Color.FromArgb(20, 20, 20); this.gvLogView.Appearance.ColumnFilterButtonActive.BackColor2 = Color.FromArgb(0x4e, 0x4e, 0x4e); this.gvLogView.Appearance.ColumnFilterButtonActive.BorderColor = Color.FromArgb(20, 20, 20); this.gvLogView.Appearance.ColumnFilterButtonActive.ForeColor = Color.Blue; this.gvLogView.Appearance.ColumnFilterButtonActive.Options.UseBackColor = true; this.gvLogView.Appearance.ColumnFilterButtonActive.Options.UseBorderColor = true; this.gvLogView.Appearance.ColumnFilterButtonActive.Options.UseForeColor = true; this.gvLogView.Appearance.Empty.BackColor = Color.Black; this.gvLogView.Appearance.Empty.Options.UseBackColor = true; this.gvLogView.Appearance.FilterCloseButton.BackColor = Color.FromArgb(0xd4, 0xd0, 200); this.gvLogView.Appearance.FilterCloseButton.BackColor2 = Color.FromArgb(90, 90, 90); this.gvLogView.Appearance.FilterCloseButton.BorderColor = Color.FromArgb(0xd4, 0xd0, 200); this.gvLogView.Appearance.FilterCloseButton.ForeColor = Color.Black; this.gvLogView.Appearance.FilterCloseButton.GradientMode = LinearGradientMode.ForwardDiagonal; this.gvLogView.Appearance.FilterCloseButton.Options.UseBackColor = true; this.gvLogView.Appearance.FilterCloseButton.Options.UseBorderColor = true; this.gvLogView.Appearance.FilterCloseButton.Options.UseForeColor = true; this.gvLogView.Appearance.FilterPanel.BackColor = Color.Black; this.gvLogView.Appearance.FilterPanel.BackColor2 = Color.FromArgb(0xd4, 0xd0, 200); this.gvLogView.Appearance.FilterPanel.ForeColor = Color.White; this.gvLogView.Appearance.FilterPanel.GradientMode = LinearGradientMode.ForwardDiagonal; this.gvLogView.Appearance.FilterPanel.Options.UseBackColor = true; this.gvLogView.Appearance.FilterPanel.Options.UseForeColor = true; this.gvLogView.Appearance.FixedLine.BackColor = Color.FromArgb(0x3a, 0x3a, 0x3a); this.gvLogView.Appearance.FixedLine.Options.UseBackColor = true; this.gvLogView.Appearance.FocusedCell.BackColor = Color.Black; this.gvLogView.Appearance.FocusedCell.Font = new Font("Tahoma", 10f); this.gvLogView.Appearance.FocusedCell.ForeColor = Color.White; this.gvLogView.Appearance.FocusedCell.Options.UseBackColor = true; this.gvLogView.Appearance.FocusedCell.Options.UseFont = true; this.gvLogView.Appearance.FocusedCell.Options.UseForeColor = true; this.gvLogView.Appearance.FocusedRow.BackColor = Color.FromArgb(0xbb, 0xc9, 0xe2); this.gvLogView.Appearance.FocusedRow.BackColor2 = Color.FromArgb(0x52, 0x83, 190); this.gvLogView.Appearance.FocusedRow.Font = new Font("Arial", 9.75f); this.gvLogView.Appearance.FocusedRow.ForeColor = Color.White; this.gvLogView.Appearance.FocusedRow.GradientMode = LinearGradientMode.ForwardDiagonal; this.gvLogView.Appearance.FocusedRow.Options.UseBackColor = true; this.gvLogView.Appearance.FocusedRow.Options.UseFont = true; this.gvLogView.Appearance.FocusedRow.Options.UseForeColor = true; this.gvLogView.Appearance.FooterPanel.BackColor = Color.Black; this.gvLogView.Appearance.FooterPanel.BorderColor = Color.Black; this.gvLogView.Appearance.FooterPanel.Font = new Font("Tahoma", 10f); this.gvLogView.Appearance.FooterPanel.ForeColor = Color.White; this.gvLogView.Appearance.FooterPanel.Options.UseBackColor = true; this.gvLogView.Appearance.FooterPanel.Options.UseBorderColor = true; this.gvLogView.Appearance.FooterPanel.Options.UseFont = true; this.gvLogView.Appearance.FooterPanel.Options.UseForeColor = true; this.gvLogView.Appearance.GroupButton.BackColor = Color.Black; this.gvLogView.Appearance.GroupButton.BorderColor = Color.Black; this.gvLogView.Appearance.GroupButton.ForeColor = Color.White; this.gvLogView.Appearance.GroupButton.Options.UseBackColor = true; this.gvLogView.Appearance.GroupButton.Options.UseBorderColor = true; this.gvLogView.Appearance.GroupButton.Options.UseForeColor = true; this.gvLogView.Appearance.GroupFooter.BackColor = Color.FromArgb(10, 10, 10); this.gvLogView.Appearance.GroupFooter.BorderColor = Color.FromArgb(10, 10, 10); this.gvLogView.Appearance.GroupFooter.ForeColor = Color.White; this.gvLogView.Appearance.GroupFooter.Options.UseBackColor = true; this.gvLogView.Appearance.GroupFooter.Options.UseBorderColor = true; this.gvLogView.Appearance.GroupFooter.Options.UseForeColor = true; this.gvLogView.Appearance.GroupPanel.BackColor = Color.Black; this.gvLogView.Appearance.GroupPanel.BackColor2 = Color.Black; this.gvLogView.Appearance.GroupPanel.Font = new Font("Tahoma", 10f, FontStyle.Bold); this.gvLogView.Appearance.GroupPanel.ForeColor = Color.White; this.gvLogView.Appearance.GroupPanel.Options.UseBackColor = true; this.gvLogView.Appearance.GroupPanel.Options.UseFont = true; this.gvLogView.Appearance.GroupPanel.Options.UseForeColor = true; this.gvLogView.Appearance.GroupRow.BackColor = Color.Gray; this.gvLogView.Appearance.GroupRow.Font = new Font("Tahoma", 10f); this.gvLogView.Appearance.GroupRow.ForeColor = Color.White; this.gvLogView.Appearance.GroupRow.Options.UseBackColor = true; this.gvLogView.Appearance.GroupRow.Options.UseFont = true; this.gvLogView.Appearance.GroupRow.Options.UseForeColor = true; this.gvLogView.Appearance.HeaderPanel.BackColor = Color.Black; this.gvLogView.Appearance.HeaderPanel.BorderColor = Color.Black; this.gvLogView.Appearance.HeaderPanel.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0); this.gvLogView.Appearance.HeaderPanel.ForeColor = Color.Black; this.gvLogView.Appearance.HeaderPanel.Options.UseBackColor = true; this.gvLogView.Appearance.HeaderPanel.Options.UseBorderColor = true; this.gvLogView.Appearance.HeaderPanel.Options.UseFont = true; this.gvLogView.Appearance.HeaderPanel.Options.UseForeColor = true; this.gvLogView.Appearance.HideSelectionRow.BackColor = Color.Gray; this.gvLogView.Appearance.HideSelectionRow.Font = new Font("Tahoma", 10f); this.gvLogView.Appearance.HideSelectionRow.ForeColor = Color.FromArgb(0xd4, 0xd0, 200); this.gvLogView.Appearance.HideSelectionRow.Options.UseBackColor = true; this.gvLogView.Appearance.HideSelectionRow.Options.UseFont = true; this.gvLogView.Appearance.HideSelectionRow.Options.UseForeColor = true; this.gvLogView.Appearance.HorzLine.BackColor = Color.FromArgb(0x52, 0x83, 190); this.gvLogView.Appearance.HorzLine.Options.UseBackColor = true; this.gvLogView.Appearance.Preview.BackColor = Color.White; this.gvLogView.Appearance.Preview.Font = new Font("Tahoma", 10f); this.gvLogView.Appearance.Preview.ForeColor = Color.Purple; this.gvLogView.Appearance.Preview.Options.UseBackColor = true; this.gvLogView.Appearance.Preview.Options.UseFont = true; this.gvLogView.Appearance.Preview.Options.UseForeColor = true; this.gvLogView.Appearance.Row.BackColor = Color.Black; this.gvLogView.Appearance.Row.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0xb2); this.gvLogView.Appearance.Row.ForeColor = Color.White; this.gvLogView.Appearance.Row.Options.UseBackColor = true; this.gvLogView.Appearance.Row.Options.UseFont = true; this.gvLogView.Appearance.Row.Options.UseForeColor = true; this.gvLogView.Appearance.RowSeparator.BackColor = Color.White; this.gvLogView.Appearance.RowSeparator.BackColor2 = Color.White; this.gvLogView.Appearance.RowSeparator.Options.UseBackColor = true; this.gvLogView.Appearance.SelectedRow.BackColor = Color.FromArgb(0xbb, 0xc9, 0xe2); this.gvLogView.Appearance.SelectedRow.BackColor2 = Color.FromArgb(0x52, 0x83, 190); this.gvLogView.Appearance.SelectedRow.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0); this.gvLogView.Appearance.SelectedRow.ForeColor = Color.White; this.gvLogView.Appearance.SelectedRow.GradientMode = LinearGradientMode.ForwardDiagonal; this.gvLogView.Appearance.SelectedRow.Options.UseBackColor = true; this.gvLogView.Appearance.SelectedRow.Options.UseFont = true; this.gvLogView.Appearance.SelectedRow.Options.UseForeColor = true; this.gvLogView.Appearance.TopNewRow.Font = new Font("Tahoma", 10f); this.gvLogView.Appearance.TopNewRow.ForeColor = Color.White; this.gvLogView.Appearance.TopNewRow.Options.UseFont = true; this.gvLogView.Appearance.TopNewRow.Options.UseForeColor = true; this.gvLogView.Appearance.VertLine.BackColor = Color.FromArgb(0x52, 0x83, 190); this.gvLogView.Appearance.VertLine.Options.UseBackColor = true; this.gvLogView.BorderStyle = BorderStyles.NoBorder; this.gvLogView.Columns.AddRange(new GridColumn[] { this.colTime, this.colType, this.colDescription, this.colData }); this.gvLogView.GridControl = this.gpgLogGrid; this.gvLogView.Name = "gvLogView"; this.gvLogView.OptionsBehavior.AutoPopulateColumns = false; this.gvLogView.OptionsDetail.AllowZoomDetail = false; this.gvLogView.OptionsDetail.EnableMasterViewMode = false; this.gvLogView.OptionsDetail.ShowDetailTabs = false; this.gvLogView.OptionsDetail.SmartDetailExpand = false; this.gvLogView.OptionsSelection.EnableAppearanceFocusedCell = false; this.gvLogView.OptionsSelection.MultiSelect = true; this.gvLogView.OptionsView.RowAutoHeight = true; this.colTime.Caption = "Time"; this.colTime.ColumnEdit = this.repositoryItemTimeEdit1; this.colTime.FieldName = "DateTime"; this.colTime.Name = "colTime"; this.colTime.OptionsColumn.AllowEdit = false; this.colTime.Visible = true; this.colTime.VisibleIndex = 0; this.repositoryItemTimeEdit1.AutoHeight = false; this.repositoryItemTimeEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton() }); this.repositoryItemTimeEdit1.Name = "repositoryItemTimeEdit1"; this.colType.Caption = "Type"; this.colType.FieldName = "LogType"; this.colType.Name = "colType"; this.colType.OptionsColumn.AllowEdit = false; this.colType.Visible = true; this.colType.VisibleIndex = 1; this.colDescription.Caption = "Description"; this.colDescription.FieldName = "Description"; this.colDescription.Name = "colDescription"; this.colDescription.OptionsColumn.AllowEdit = false; this.colDescription.Visible = true; this.colDescription.VisibleIndex = 2; this.colData.Caption = "Data"; this.colData.ColumnEdit = this.rimMemoEdit3; this.colData.FieldName = "Data"; this.colData.Name = "colData"; this.colData.Visible = true; this.colData.VisibleIndex = 3; this.rimMemoEdit3.MaxLength = 500; this.rimMemoEdit3.Name = "rimMemoEdit3"; this.rimPictureEdit3.Name = "rimPictureEdit3"; this.rimPictureEdit3.PictureAlignment = ContentAlignment.TopCenter; this.rimTextEdit.AutoHeight = false; this.rimTextEdit.Name = "rimTextEdit"; this.riPopup.AutoHeight = false; this.riPopup.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); this.riPopup.Name = "riPopup"; this.riPopup.PopupControl = this.pcPropertyView; this.riPopup.Popup += new EventHandler(this.riPopup_Popup); this.pcPropertyView.Controls.Add(this.pgData); this.pcPropertyView.Location = new Point(13, 0xda); this.pcPropertyView.Name = "pcPropertyView"; this.pcPropertyView.Size = new Size(0xdf, 180); this.pcPropertyView.TabIndex = 0x1f; this.pcPropertyView.Text = "popupContainerControl1"; this.pgData.Dock = DockStyle.Fill; this.pgData.Location = new Point(0, 0); this.pgData.Name = "pgData"; this.pgData.Size = new Size(0xdf, 180); this.pgData.TabIndex = 0; this.repositoryItemMemoExEdit1.AutoHeight = false; this.repositoryItemMemoExEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) }); this.repositoryItemMemoExEdit1.Name = "repositoryItemMemoExEdit1"; this.btnCancel.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this.btnCancel.Appearance.ForeColor = Color.Black; this.btnCancel.Appearance.Options.UseForeColor = true; this.btnCancel.Location = new Point(0x20d, 0x18a); this.btnCancel.LookAndFeel.SkinName = "London Liquid Sky"; this.btnCancel.LookAndFeel.UseDefaultLookAndFeel = false; this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new Size(0x68, 0x17); this.btnCancel.TabIndex = 30; this.btnCancel.Text = "<LOC>Cancel"; this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new EventHandler(this.btnCancel_Click); base.AutoScaleMode = AutoScaleMode.None; base.ClientSize = new Size(640, 480); base.Controls.Add(this.pcPropertyView); base.Controls.Add(this.btnCancel); base.Controls.Add(this.gpgLogGrid); this.Font = new Font("Verdana", 8f); base.Location = new Point(0, 0); base.Name = "DlgLogWatcher"; this.Text = "Log Watcher"; base.Controls.SetChildIndex(this.gpgLogGrid, 0); base.Controls.SetChildIndex(this.btnCancel, 0); base.Controls.SetChildIndex(this.pcPropertyView, 0); this.gpgLogGrid.EndInit(); this.gvLogView.EndInit(); this.repositoryItemTimeEdit1.EndInit(); this.rimMemoEdit3.EndInit(); this.rimPictureEdit3.EndInit(); this.rimTextEdit.EndInit(); this.riPopup.EndInit(); this.pcPropertyView.EndInit(); this.pcPropertyView.ResumeLayout(false); this.pgData.EndInit(); this.repositoryItemMemoExEdit1.EndInit(); base.ResumeLayout(false); base.PerformLayout(); }
public Control CreateSettingControl(CustClassInfo item) { XtraUserControl xtraUserControl = new XtraUserControl(); xtraUserControl.AutoScroll = true; xtraUserControl.Dock = DockStyle.Fill; xtraUserControl.Text = item.ClassName; SimpleButton button = new SimpleButton() { Text = "导出报表" }; button.Appearance.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); button.Appearance.Options.UseFont = true; button.Dock = System.Windows.Forms.DockStyle.Bottom; button.Location = new System.Drawing.Point(0, 0); button.Size = new System.Drawing.Size(240, 50); xtraUserControl.Controls.Add(button); ProgressBarControl progressBar = new ProgressBarControl(); progressBar.Dock = DockStyle.Bottom; progressBar.Properties.Appearance.BackColor = System.Drawing.Color.Gainsboro; progressBar.Properties.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); progressBar.Properties.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Flat; progressBar.Properties.LookAndFeel.UseDefaultLookAndFeel = false; progressBar.Properties.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192))))); progressBar.Size = new System.Drawing.Size(240, 30); xtraUserControl.Controls.Add(progressBar); //XtraForm form = new XtraForm(); if (item.ListOrSingle) { GridView gv = new GridView(); gv.OptionsView.ShowGroupPanel = false; gv.OptionsView.NewItemRowPosition = NewItemRowPosition.Top; gv.OptionsView.ShowFooter = true; GridControl gc = new GridControl(); gc.Dock = DockStyle.Fill; gc.MainView = gv; gc.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gv }); gv.GridControl = gc; if (item.ClassType == null) //如果还嵌套List { GridView gvSub = new GridView(); //最多嵌套两层 gvSub.OptionsView.ShowGroupPanel = false; gvSub.OptionsView.NewItemRowPosition = NewItemRowPosition.Top; gvSub.OptionsView.ShowFooter = true; gvSub.GridControl = gc; } object genericList = ClassDynamicCreater.CreateGeneric(typeof(BindingList <>), item.ClassType); if (item.DataSourceTag == null || item.DataSourceTag.GetType() != genericList.GetType()) { item.DataSourceTag = genericList; } //IBindingList ibl = item.DataSourceTag as IBindingList; gc.DataSource = item.DataSourceTag; //form.Controls.Add(gc); xtraUserControl.Controls.Add(gc); button.Click += (o, e) => { if (!Directory.Exists(ExportDirectory)) { Directory.CreateDirectory(ExportDirectory); } progressBar.Position = 0; gv.ExportToXlsx($@"{ExportDirectory}{item.ClassName}.xlsx"); progressBar.Position = 100; Task.Run(() => { Process.Start("explorer.exe", ExportDirectory); }); }; } else { PropertyGridControl pc = new PropertyGridControl(); pc.Dock = DockStyle.Fill; pc.SelectedObject = item.Instance; //form.Controls.Add(pc); xtraUserControl.Controls.Add(pc); button.Click += (o, e) => { if (!Directory.Exists(ExportDirectory)) { Directory.CreateDirectory(ExportDirectory); } progressBar.Position = 0; pc.ExportToXlsx($@"{ExportDirectory}{item.ClassName}.xlsx"); progressBar.Position = 100; Task.Run(() => { Process.Start("explorer.exe", ExportDirectory); }); }; } return(xtraUserControl); }
private void 查看_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { int i = this.gridView1.FocusedRowHandle; if (i >= 0) { CustClassInfo item = CustClassManager.Instance.AllClasses[i]; XtraForm form = new XtraForm(); if (item.ListOrSingle) { GridView gv = new GridView(); gv.OptionsView.ShowGroupPanel = false; gv.OptionsView.NewItemRowPosition = NewItemRowPosition.Top; gv.OptionsView.ShowFooter = true; GridControl gc = new GridControl(); gc.Dock = DockStyle.Fill; gc.MainView = gv; gc.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gv }); gv.GridControl = gc; foreach (var itemP in item.ClassType.GetProperties()) { Type typeP = itemP.PropertyType; if (typeP.IsGenericType) //判断是否有属性为List<> //注意这里最多嵌套两层,三层或以上的情况懒得再递归了,一般最多两层 { Type listSubType = typeP.GetGenericArguments()[0]; //如List<string>获取到string type GridView gvSub = new GridView(); gvSub.OptionsView.ShowGroupPanel = false; gvSub.OptionsView.NewItemRowPosition = NewItemRowPosition.Top; gvSub.OptionsView.ShowFooter = true; gvSub.GridControl = gc; GridLevelNode gridLevelNode = new GridLevelNode(); gridLevelNode.LevelTemplate = gvSub; gridLevelNode.RelationName = $@"{itemP.Name}"; gc.LevelTree.Nodes.AddRange(new GridLevelNode[] { gridLevelNode }); } } object genericList = ClassDynamicCreater.CreateGeneric(typeof(BindingList <>), item.ClassType); if (item.DataSourceTag == null || item.DataSourceTag.GetType() != genericList.GetType()) { item.DataSourceTag = genericList; } //IBindingList ibl = item.DataSourceTag as IBindingList; gc.DataSource = item.DataSourceTag; form.Controls.Add(gc); } else { PropertyGridControl pc = new PropertyGridControl(); pc.Dock = DockStyle.Fill; pc.SelectedObject = item.Instance; form.Controls.Add(pc); } form.ShowDialog(); } }
public UnboundRowsHelper(PropertyGridControl pg) { _PropertyGrid = pg; _PropertyGrid.CustomPropertyDescriptors += _PropertyGrid_CustomPropertyDescriptors; }
public void RetrieveFields() { PropertyGridControl.RetrieveFields(); }
private void PropertyGridControl_PopupMenuShowing(object sender, DevExpress.XtraVerticalGrid.Events.PopupMenuShowingEventArgs e) { if (e.Row != null) { var controller = Controller as ObjectPropertyEditController; if (controller == null) { return; } var propDesc = PropertyGridControl.GetPropertyDescriptor(e.Row); if (propDesc != null) { // 修改字段标题 var menuChangeCaption = new DXEditMenuItem("标题(&C)" , new TextEditController().CreateRepositoryItem(typeof(string))); menuChangeCaption.Width = 100; menuChangeCaption.EditValue = e.Row.Properties.Caption; menuChangeCaption.BeginGroup = true; menuChangeCaption.EditValueChanged += (s, a) => { if (menuChangeCaption.EditValue.IsNull()) { e.Row.Properties.Caption = propDesc.Name; } else { e.Row.Properties.Caption = (string)menuChangeCaption.EditValue; } }; e.Menu.Items.Add(menuChangeCaption); // 增加删除行菜单 var menuHideRow = new DXMenuItem("隐藏行(&D)" , (s, a) => { e.Row.Visible = false; }); e.Menu.Items.Add(menuHideRow); // 增加更改编辑器菜单 var menuChangeEditor = new DXMenuItem("更改编辑器(&E)..." , (s, a) => { Type editControllerType; if (EditorPublic.SelectEditControllerType(propDesc.PropertyType, out editControllerType) == DialogReturn.OK) { if (editControllerType != null) { var editController = editControllerType.CreateInstance() as BaseEditController; if (controller != null) { controller.SetPredfinedEditController(propDesc.Name, editController.GetType()); } } } } , Properties.Resources.renamedatasource_16x16); menuChangeEditor.BeginGroup = true; e.Menu.Items.Add(menuChangeEditor); // 增加恢复编辑器菜单 var menuRecoverEditor = new DXMenuItem("恢复编辑器(&R)" , (s, a) => { if (UIPublic.ShowYesNoDialog("您确定要恢复默认的编辑器吗?") == DialogReturn.Yes) { controller.RemovePredefinedEditController(propDesc.Name); } } , Properties.Resources.clearformatting_16x16); e.Menu.Items.Add(menuRecoverEditor); } // 恢复所有编辑器 var menuClearEditors = new DXMenuItem("恢复所有编辑器(&C)" , (s, a) => { if (UIPublic.ShowYesNoDialog("您确定要恢复所有默认的编辑器吗?") == DialogReturn.Yes) { controller.ClearPredefinedEditControllers(); } } , Properties.Resources.clear_16x16); menuClearEditors.BeginGroup = true; e.Menu.Items.Add(menuClearEditors); } }
public WixPropertyBuilder(PropertyGridControl propertyGridControl) { this.propertyGridControl = propertyGridControl; // Если не будет ничего проинициализировано в дальнейшем, то // будем безопасно использовать нулевой объект. WixDataSource = new NullWixPropertyGridControlDataSource(); }