public MainForm () { // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.Dock = DockStyle.Top; _propertyGrid.Height = 200; Controls.Add (_propertyGrid); // // _resetButton // _resetButton = new Button (); _resetButton.Location = new Point (120, 210); _resetButton.Size = new Size (60, 20); _resetButton.Text = "Reset"; _resetButton.Click += new EventHandler (ResetButton_Click); Controls.Add (_resetButton); // // MainForm // ClientSize = new Size (300, 240); Location = new Point (250, 100); StartPosition = FormStartPosition.Manual; Text = "bug #339001"; Load += new EventHandler (MainForm_Load); }
public MainForm () { SetStyle (ControlStyles.DoubleBuffer | ControlStyles.UserPaint, true); // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right); _propertyGrid.CommandsVisibleIfAvailable = true; _propertyGrid.Dock = DockStyle.Fill; _propertyGrid.LargeButtons = false; _propertyGrid.LineColor = SystemColors.ScrollBar; _propertyGrid.TabIndex = 0; _propertyGrid.ViewBackColor = SystemColors.Window; _propertyGrid.ViewForeColor = SystemColors.WindowText; _propertyGrid.SelectedObject = new DocumenterConfig (); _propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler (PropertyGrid_PropertyValueChanged); Controls.Add (_propertyGrid); // // MainForm // AllowDrop = true; AutoScaleBaseSize = new Size (5, 13); ClientSize = new Size (350, 350); Location = new Point (250, 100); MinimumSize = new Size (350, 350); SizeGripStyle = SizeGripStyle.Show; StartPosition = FormStartPosition.Manual; Text = "bug #79829"; Load += new EventHandler (MainForm_Load); ResumeLayout (false); _propertyGrid.SelectedObject = new DocumenterConfig (); }
public PropertyFeel(PropertyGrid grid) { if (grid != null) { mPropCtrl = grid; mParentWnd = mPropCtrl.Grid; } }
public PropertyTypeDescriptorContext(PropertyDescriptor descriptor, object instance, PropertyEnumerator propEnum, PropertyGrid propGrid) { _descriptor = descriptor; _targetInstance = instance; _propEnum = propEnum; _propertyGrid = propGrid; }
public PropertyGridView() { PropertyGrid = new PropertyGrid(); DataContext = PropertyGrid; InitializeComponent(); thumb.DragDelta += new DragDeltaEventHandler(thumb_DragDelta); }
private void Advanced_Click(object sender, EventArgs e) { //Set up a form to display the advanced connection properties Form frm = new Form(); PropertyGrid pg = new PropertyGrid(); pg.SelectedObject = cp; pg.Dock = DockStyle.Fill; pg.Parent = frm; frm.ShowDialog(); }
public PropertyGridView (PropertyGrid propertyGrid) { property_grid = propertyGrid; string_format = new StringFormat (); string_format.FormatFlags = StringFormatFlags.NoWrap; string_format.Trimming = StringTrimming.None; grid_textbox = new PropertyGridTextBox (); grid_textbox.DropDownButtonClicked +=new EventHandler (DropDownButtonClicked); grid_textbox.DialogButtonClicked +=new EventHandler (DialogButtonClicked); dropdown_form = new PropertyGridDropDown (); dropdown_form.FormBorderStyle = FormBorderStyle.None; dropdown_form.StartPosition = FormStartPosition.Manual; dropdown_form.ShowInTaskbar = false; dialog_form = new Form (); dialog_form.StartPosition = FormStartPosition.Manual; dialog_form.FormBorderStyle = FormBorderStyle.None; dialog_form.ShowInTaskbar = false; dropdown_form_padding = new Padding (0, 0, 2, 2); row_height = Font.Height + font_height_padding; grid_textbox.Visible = false; grid_textbox.Font = this.Font; grid_textbox.BackColor = SystemColors.Window; grid_textbox.Validate += new CancelEventHandler (grid_textbox_Validate); grid_textbox.ToggleValue+=new EventHandler (grid_textbox_ToggleValue); grid_textbox.KeyDown+=new KeyEventHandler (grid_textbox_KeyDown); this.Controls.Add (grid_textbox); vbar = new ImplicitVScrollBar (); vbar.Visible = false; vbar.Value = 0; vbar.ValueChanged+=new EventHandler (VScrollBar_HandleValueChanged); vbar.Dock = DockStyle.Right; this.Controls.AddImplicit (vbar); resizing_grid = false; bold_font = new Font (this.Font, FontStyle.Bold); inactive_text_brush = new SolidBrush (ThemeEngine.Current.ColorGrayText); ForeColorChanged+=new EventHandler (RedrawEvent); BackColorChanged+=new System.EventHandler (RedrawEvent); FontChanged+=new EventHandler (RedrawEvent); SetStyle (ControlStyles.Selectable, true); SetStyle (ControlStyles.DoubleBuffer, true); SetStyle (ControlStyles.UserPaint, true); SetStyle (ControlStyles.AllPaintingInWmPaint, true); SetStyle (ControlStyles.ResizeRedraw, true); }
public PropertyValueIndirect(PropertyGrid grid, PropertyValue parentValue, object target, PropertyDescriptor propertyDescriptor, Attribute[] attributes) : base(parentValue) { Grid = grid; _targets.Add(new Utilities.KeyValuePair(propertyDescriptor, target)); Attributes = attributes; // ExtractDisplayedValues(); }
public MainForm () { // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.Dock = DockStyle.Top; _propertyGrid.SelectedObject = new Config (); _propertyGrid.Size = new Size (405, 200); Controls.Add (_propertyGrid); // // _resetButton // _resetButton = new Button (); _resetButton.Location = new Point (8, 210); _resetButton.Size = new Size (60, 20); _resetButton.Text = "Reset"; _resetButton.Click += new EventHandler (ResetButton_Click); Controls.Add (_resetButton); // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Bottom; _tabControl.Size = new Size (405, 140); Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Steps to execute:{0}{0}" + "1. Click the Reset button.{0}{0}" + "Expected result:{0}{0}" + "1. The PropertyGrid is cleared.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // MainForm // ClientSize = new Size (405, 380); StartPosition = FormStartPosition.CenterScreen; Text = "bug #80438"; }
public AdvancedShapeCollectionLoadingWindow(Cursor cursor, MultiButtonMessageBox mbmb, TypesToLoad typesToLoad) : base(cursor) { this.AddWindow(mbmb); this.ScaleX = mbmb.ScaleX + 12.5f; mbmb.DrawBorders = false; mbmb.X = mbmb.ScaleX; mbmb.RemoveButton(mbmb.GetButton("Advanced >>")); // Maybe one day we want to allow the user to go back to the // basic view? It's a pain, so I won't do that now mbmb.Y = mbmb.ScaleY; this.ScaleY = mbmb.ScaleY + 1; //Button cancelButton = mbmb.GetButton("Cancel"); //mbmb.RemoveButton(cancelButton); mbmb.HasMoveBar = false; mbmb.HasCloseButton = false; this.HasMoveBar = true; //mbmb.AddButton(cancelButton); TextDisplay textDisplay = new TextDisplay(cursor); textDisplay.Text = "Offset"; this.AddWindow(textDisplay); textDisplay.X = mbmb.ScaleX * 2; textDisplay.Y = 1; offsetWindow = new Vector3Display(cursor); this.AddWindow(offsetWindow); offsetWindow.X = mbmb.ScaleX * 2 + offsetWindow.ScaleX ; offsetWindow.Y = offsetWindow.ScaleY + 2; mbmb.Closing += new GuiMessage(CloseThis); this.Name = ""; PropertyGrid<TypesToLoad> propertyGrid = new PropertyGrid<TypesToLoad>(cursor); propertyGrid.ObjectDisplaying = typesToLoad; propertyGrid.HasMoveBar = false; propertyGrid.HasCloseButton = false; this.AddWindow(propertyGrid); propertyGrid.X = mbmb.ScaleX * 2 + propertyGrid.ScaleX - 1; // subtract 1 because we're not going to show the frames propertyGrid.Y = propertyGrid.ScaleY + 2 + offsetWindow.ScaleY * 2 + .5f; propertyGrid.DrawBorders = false; }
public PropertyGridTest() { Application.Init (); Window win = new Gtk.Window ("PropertyGridTest"); window = win; win.DeleteEvent += new DeleteEventHandler (Main_Closed); propgrid = new PropertyGrid (this); win.Add(propgrid); win.ShowAll (); Application.Run (); }
public MainForm () { // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.Dock = DockStyle.Fill; Controls.Add (_propertyGrid); // // MainForm // ClientSize = new Size (300, 240); Location = new Point (250, 100); StartPosition = FormStartPosition.Manual; Text = "bug #322446"; Load += new EventHandler (MainForm_Load); }
public MainForm () { // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.HelpVisible = false; _propertyGrid.Size = new Size (405, 150); _propertyGrid.SelectedObject = new Config (); Controls.Add (_propertyGrid); // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Bottom; _tabControl.Size = new Size (405, 190); Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. Click in the textbox for the FeedbackEmailAddress field.{0}{0}" + "2. Click in the textbox for the Name field.{0}{0}" + "3. Enter some text.{0}{0}" + "Expected result:{0}{0}" + "1. The entered text is immediately displayed.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // MainForm // ClientSize = new Size (405, 350); StartPosition = FormStartPosition.CenterScreen; Text = "bug #81791"; }
public MainForm () { // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.Dock = DockStyle.Top; _propertyGrid.Height = 200; _propertyGrid.HelpVisible = false; _propertyGrid.SelectedObject = new Config (); Controls.Add (_propertyGrid); // // _sortListBox // _sortListBox = new ListBox (); _sortListBox.Location = new Point (0, 210); _sortListBox.Size = new Size (200, 60); Controls.Add (_sortListBox); // // _modifyButton // _modifyButton = new Button (); _modifyButton.Location = new Point (215, 210); _modifyButton.Size = new Size (80, 20); _modifyButton.Text = "Modify"; _modifyButton.Click += new EventHandler (ModifyButton_Click); Controls.Add (_modifyButton); // // _refreshButton // _refreshButton = new Button (); _refreshButton.Location = new Point (215, 245); _refreshButton.Size = new Size (80, 20); _refreshButton.Text = "Refresh"; _refreshButton.Click += new EventHandler (RefreshButton_Click); Controls.Add (_refreshButton); // // MainForm // ClientSize = new Size (300, 275); Location = new Point (250, 100); StartPosition = FormStartPosition.Manual; Text = "bug #82196"; Load += new EventHandler (MainForm_Load); }
private static void CreateObjectOfSelectedType(Window callingWindow) { CollapseListBox collapseListBox = callingWindow as CollapseListBox; Type type = collapseListBox.GetFirstHighlightedObject() as Type; mObjectToSerialize = Activator.CreateInstance(type); mTypeOfObjectToSerialize = type; if (PropertyGrid.IsIEnumerable(type)) { mObjectListDisplayWindow = CreateListDisplayWindowForObject(mObjectToSerialize); } else { mObjectPropertyGrid = CreatePropertyGridForObject(mObjectToSerialize); } }
public MainForm () { // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.Dock = DockStyle.Top; _propertyGrid.HelpVisible = false; _propertyGrid.SelectedObject = new Config (); _propertyGrid.Size = new Size (405, 150); Controls.Add (_propertyGrid); // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Bottom; _tabControl.Size = new Size (405, 140); Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The value of the FeedbackEmailAddress is \"something\".{0}{0}" + "2. The Name field has no value.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // MainForm // ClientSize = new Size (405, 300); StartPosition = FormStartPosition.CenterScreen; Text = "bug #81800"; }
public MainForm () { // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.Dock = DockStyle.Fill; _propertyGrid.HelpVisible = false; _propertyGrid.SelectedObject = new Config (); Controls.Add (_propertyGrid); // // MainForm // ClientSize = new Size (300, 150); Location = new Point (250, 100); StartPosition = FormStartPosition.Manual; Text = "bug #82070"; Load += new EventHandler (MainForm_Load); }
public MainForm () { // // _propertyGrid // _propertyGrid = new PropertyGrid (); _propertyGrid.Dock = DockStyle.Fill; Controls.Add (_propertyGrid); // // _timer // _timer = new Timer (); _timer.Interval = 1000; _timer.Enabled = true; _timer.Tick += new EventHandler (Timer_Tick); // // MainForm // ClientSize = new Size (300, 240); Location = new Point (250, 100); StartPosition = FormStartPosition.Manual; Text = "bug #358593"; Load += new EventHandler (MainForm_Load); }
//public static void CreatePixelCoordinateUi(PropertyGrid propertyGrid, // string topProperty, string bottomProperty, string leftProperty, string rightProperty) //{ // UpDown throwaway; // CreatePixelCoordinateUi(propertyGrid, topProperty, bottomProperty, leftProperty, rightProperty, // out throwaway, out throwaway, out throwaway, out throwaway); //} public static void CreatePixelCoordinateUi(PropertyGrid propertyGrid, string topProperty, string bottomProperty, string leftProperty, string rightProperty, string category, out UpDown topPixel, out UpDown leftPixel, out UpDown heightPixel, out UpDown widthPixel) { propertyGrid.ExcludeMember(topProperty); propertyGrid.ExcludeMember(bottomProperty); propertyGrid.ExcludeMember(leftProperty); propertyGrid.ExcludeMember(rightProperty); leftPixel = new UpDown(GuiManager.Cursor); leftPixel.ScaleX = 7; leftPixel.Precision = 0; propertyGrid.AddWindow(leftPixel, category); propertyGrid.SetLabelForWindow(leftPixel, "Left Pixel"); topPixel = new UpDown(GuiManager.Cursor); topPixel.ScaleX = 7; topPixel.Precision = 0; propertyGrid.AddWindow(topPixel, category); propertyGrid.SetLabelForWindow(topPixel, "Top Pixel"); widthPixel = new UpDown(GuiManager.Cursor); widthPixel.ScaleX = 7; widthPixel.Precision = 0; propertyGrid.AddWindow(widthPixel, category); propertyGrid.SetLabelForWindow(widthPixel, "Pixel Width"); heightPixel = new UpDown(GuiManager.Cursor); heightPixel.ScaleX = 7; heightPixel.Precision = 0; propertyGrid.AddWindow(heightPixel, category); propertyGrid.SetLabelForWindow(heightPixel, "Pixel Height"); }
public override void LaunchDialogue() { //dialogue and buttons Dialog dialog = new Dialog (); dialog.Title = "Expandable Object Editor "; dialog.Modal = true; dialog.AllowGrow = true; dialog.AllowShrink = true; dialog.Modal = true; dialog.AddActionWidget (new Button (Stock.Cancel), ResponseType.Cancel); dialog.AddActionWidget (new Button (Stock.Ok), ResponseType.Ok); //propGrid grid = new PropertyGrid (parentRow.ParentGrid.EditorManager); grid.CurrentObject = parentRow.PropertyValue; grid.WidthRequest = 200; grid.ShowHelp = false; dialog.VBox.PackStart (grid, true, true, 5); //show and get response dialog.ShowAll (); ResponseType response = (ResponseType) dialog.Run(); dialog.Destroy (); //if 'OK' put items back in collection if (response == ResponseType.Ok) { } //clean up so we start fresh if launched again }
private void BuildUI() { _desktop = new Desktop(); _desktop.ContextMenuClosed += _desktop_ContextMenuClosed; _desktop.KeyDownHandler = key => { if (_autoCompleteMenu != null && (key == Keys.Up || key == Keys.Down || key == Keys.Enter)) { _autoCompleteMenu.OnKeyDown(key); } else { _desktop.OnKeyDown(key); } }; _desktop.KeyDown += (s, a) => { if (_desktop.HasModalWidget || _ui._mainMenu.IsOpen) { return; } if (_desktop.DownKeys.Contains(Keys.LeftControl) || _desktop.DownKeys.Contains(Keys.RightControl)) { if (_desktop.DownKeys.Contains(Keys.N)) { NewItemOnClicked(this, EventArgs.Empty); } else if (_desktop.DownKeys.Contains(Keys.O)) { OpenItemOnClicked(this, EventArgs.Empty); } else if (_desktop.DownKeys.Contains(Keys.R)) { OnMenuFileReloadSelected(this, EventArgs.Empty); } else if (_desktop.DownKeys.Contains(Keys.S)) { SaveItemOnClicked(this, EventArgs.Empty); } else if (_desktop.DownKeys.Contains(Keys.E)) { ExportCsItemOnSelected(this, EventArgs.Empty); } else if (_desktop.DownKeys.Contains(Keys.D)) { OnMenuFileReloadStylesheet(this, EventArgs.Empty); } else if (_desktop.DownKeys.Contains(Keys.Q)) { Exit(); } else if (_desktop.DownKeys.Contains(Keys.F)) { _menuEditUpdateSource_Selected(this, EventArgs.Empty); } } }; _ui = new StudioWidget(); _ui._menuFileNew.Selected += NewItemOnClicked; _ui._menuFileOpen.Selected += OpenItemOnClicked; _ui._menuFileReload.Selected += OnMenuFileReloadSelected; _ui._menuFileSave.Selected += SaveItemOnClicked; _ui._menuFileSaveAs.Selected += SaveAsItemOnClicked; _ui._menuFileExportToCS.Selected += ExportCsItemOnSelected; _ui._menuFileLoadStylesheet.Selected += OnMenuFileLoadStylesheet; _ui._menuFileReloadStylesheet.Selected += OnMenuFileReloadStylesheet; _ui._menuFileResetStylesheet.Selected += OnMenuFileResetStylesheetSelected; _ui._menuFileDebugOptions.Selected += DebugOptionsItemOnSelected; _ui._menuFileQuit.Selected += QuitItemOnDown; _ui._menuItemSelectAll.Selected += (s, a) => { _ui._textSource.SelectAll(); }; _ui._menuEditFormatSource.Selected += _menuEditUpdateSource_Selected; _ui._menuHelpAbout.Selected += AboutItemOnClicked; _ui._textSource.CursorPositionChanged += _textSource_CursorPositionChanged; _ui._textSource.TextChanged += _textSource_TextChanged; _ui._textSource.KeyDown += _textSource_KeyDown; _ui._textSource.Char += _textSource_Char; _ui._textStatus.Text = string.Empty; _ui._textLocation.Text = "Line: 0, Column: 0, Indent: 0"; _propertyGrid = new PropertyGrid { IgnoreCollections = true }; _propertyGrid.PropertyChanged += PropertyGridOnPropertyChanged; _propertyGrid.CustomValuesProvider = RecordValuesProvider; _propertyGrid.CustomSetter = RecordSetter; _ui._propertyGridPane.Content = _propertyGrid; _ui._topSplitPane.SetSplitterPosition(0, _state != null ? _state.TopSplitterPosition : 0.75f); _ui._leftSplitPane.SetSplitterPosition(0, _state != null ? _state.LeftSplitterPosition : 0.5f); _desktop.Widgets.Add(_ui); UpdateMenuFile(); }
public override void LaunchDialogue() { //the Type in the collection IList collection = (IList)Value; string displayName = Property.DisplayName; //populate list with existing items ListStore itemStore = new ListStore(typeof(object), typeof(int), typeof(string)); for (int i = 0; i < collection.Count; i++) { itemStore.AppendValues(collection [i], i, collection [i].ToString()); } #region Building Dialogue TreeView itemTree; PropertyGrid grid; TreeIter previousIter = TreeIter.Zero; //dialogue and buttons Dialog dialog = new Dialog() { Title = displayName + " Editor", Modal = true, AllowGrow = true, AllowShrink = true, }; var toplevel = this.Container.Toplevel as Window; if (toplevel != null) { dialog.TransientFor = toplevel; } dialog.AddActionWidget(new Button(Stock.Cancel), ResponseType.Cancel); dialog.AddActionWidget(new Button(Stock.Ok), ResponseType.Ok); //three columns for items, sorting, PropGrid HBox hBox = new HBox(); dialog.VBox.PackStart(hBox, true, true, 5); //propGrid at end grid = new PropertyGrid(base.EditorManager) { CurrentObject = null, WidthRequest = 200, ShowHelp = false }; hBox.PackEnd(grid, true, true, 5); //followed by a ButtonBox VBox buttonBox = new VBox(); buttonBox.Spacing = 6; hBox.PackEnd(buttonBox, false, false, 5); //add/remove buttons Button addButton = new Button(new Image(Stock.Add, IconSize.Button)); buttonBox.PackStart(addButton, false, false, 0); if (types [0].IsAbstract) { addButton.Sensitive = false; } Button removeButton = new Button(new Gtk.Image(Stock.Remove, IconSize.Button)); buttonBox.PackStart(removeButton, false, false, 0); //sorting buttons Button upButton = new Button(new Image(Stock.GoUp, IconSize.Button)); buttonBox.PackStart(upButton, false, false, 0); Button downButton = new Button(new Image(Stock.GoDown, IconSize.Button)); buttonBox.PackStart(downButton, false, false, 0); //Third column has list (TreeView) in a ScrolledWindow ScrolledWindow listScroll = new ScrolledWindow(); listScroll.WidthRequest = 200; listScroll.HeightRequest = 320; hBox.PackStart(listScroll, false, false, 5); itemTree = new TreeView(itemStore); itemTree.Selection.Mode = SelectionMode.Single; itemTree.HeadersVisible = false; listScroll.AddWithViewport(itemTree); //renderers and attribs for TreeView CellRenderer rdr = new CellRendererText(); itemTree.AppendColumn(new TreeViewColumn("Index", rdr, "text", 1)); rdr = new CellRendererText(); itemTree.AppendColumn(new TreeViewColumn("Object", rdr, "text", 2)); #endregion #region Events addButton.Clicked += delegate { //create the object object instance = System.Activator.CreateInstance(types[0]); //get existing selection and insert after it TreeIter oldIter, newIter; if (itemTree.Selection.GetSelected(out oldIter)) { newIter = itemStore.InsertAfter(oldIter); } //or append if no previous selection else { newIter = itemStore.Append(); } itemStore.SetValue(newIter, 0, instance); //select, set name and update all the indices itemTree.Selection.SelectIter(newIter); UpdateName(itemStore, newIter); UpdateIndices(itemStore); }; removeButton.Clicked += delegate { //get selected iter and the replacement selection TreeIter iter, newSelection; if (!itemTree.Selection.GetSelected(out iter)) { return; } newSelection = iter; if (!IterPrev(itemStore, ref newSelection)) { newSelection = iter; if (!itemStore.IterNext(ref newSelection)) { newSelection = TreeIter.Zero; } } //new selection. Zeroing previousIter prevents trying to update name of deleted iter. previousIter = TreeIter.Zero; if (itemStore.IterIsValid(newSelection)) { itemTree.Selection.SelectIter(newSelection); } //and the removal and index update itemStore.Remove(ref iter); UpdateIndices(itemStore); }; upButton.Clicked += delegate { TreeIter iter, prev; if (!itemTree.Selection.GetSelected(out iter)) { return; } //get previous iter prev = iter; if (!IterPrev(itemStore, ref prev)) { return; } //swap the two itemStore.Swap(iter, prev); //swap indices too object prevVal = itemStore.GetValue(prev, 1); object iterVal = itemStore.GetValue(iter, 1); itemStore.SetValue(prev, 1, iterVal); itemStore.SetValue(iter, 1, prevVal); }; downButton.Clicked += delegate { TreeIter iter, next; if (!itemTree.Selection.GetSelected(out iter)) { return; } //get next iter next = iter; if (!itemStore.IterNext(ref next)) { return; } //swap the two itemStore.Swap(iter, next); //swap indices too object nextVal = itemStore.GetValue(next, 1); object iterVal = itemStore.GetValue(iter, 1); itemStore.SetValue(next, 1, iterVal); itemStore.SetValue(iter, 1, nextVal); }; itemTree.Selection.Changed += delegate { TreeIter iter; if (!itemTree.Selection.GetSelected(out iter)) { removeButton.Sensitive = false; return; } removeButton.Sensitive = true; //update grid object obj = itemStore.GetValue(iter, 0); grid.CurrentObject = obj; //update previously selected iter's name UpdateName(itemStore, previousIter); //update current selection so we can update //name next selection change previousIter = iter; }; grid.Changed += delegate { TreeIter iter; if (itemTree.Selection.GetSelected(out iter)) { UpdateName(itemStore, iter); } }; TreeIter selectionIter; removeButton.Sensitive = itemTree.Selection.GetSelected(out selectionIter); dialog.ShowAll(); grid.ShowToolbar = false; #endregion //if 'OK' put items back in collection //if (MonoDevelop.Ide.MessageService.ShowCustomDialog (dialog, toplevel) == (int)ResponseType.Ok) { DesignerTransaction tran = CreateTransaction(Instance); object old = collection; try { collection.Clear(); foreach (object[] o in itemStore) { collection.Add(o[0]); } EndTransaction(Instance, tran, old, collection, true); } catch { EndTransaction(Instance, tran, old, collection, false); throw; } } }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmEasySampleFixed)); this.txtClass = new System.Windows.Forms.TextBox(); this.txtData = new System.Windows.Forms.TextBox(); this.grid1 = new System.Windows.Forms.PropertyGrid(); this.cmdRun = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // pictureBox3 // // // txtClass // this.txtClass.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtClass.Location = new System.Drawing.Point(8, 136); this.txtClass.Multiline = true; this.txtClass.Name = "txtClass"; this.txtClass.ReadOnly = true; this.txtClass.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.txtClass.Size = new System.Drawing.Size(328, 160); this.txtClass.TabIndex = 0; this.txtClass.Text = resources.GetString("txtClass.Text"); this.txtClass.WordWrap = false; // // txtData // this.txtData.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txtData.Location = new System.Drawing.Point(8, 320); this.txtData.Multiline = true; this.txtData.Name = "txtData"; this.txtData.ReadOnly = true; this.txtData.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.txtData.Size = new System.Drawing.Size(664, 144); this.txtData.TabIndex = 1; this.txtData.Text = resources.GetString("txtData.Text"); this.txtData.WordWrap = false; // // grid1 // this.grid1.HelpVisible = false; this.grid1.LineColor = System.Drawing.SystemColors.ScrollBar; this.grid1.Location = new System.Drawing.Point(344, 136); this.grid1.Name = "grid1"; this.grid1.PropertySort = System.Windows.Forms.PropertySort.Alphabetical; this.grid1.Size = new System.Drawing.Size(320, 160); this.grid1.TabIndex = 2; this.grid1.ToolbarVisible = false; // // cmdRun // this.cmdRun.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(110))))); this.cmdRun.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cmdRun.ForeColor = System.Drawing.Color.Gainsboro; this.cmdRun.Location = new System.Drawing.Point(336, 8); this.cmdRun.Name = "cmdRun"; this.cmdRun.Size = new System.Drawing.Size(152, 32); this.cmdRun.TabIndex = 0; this.cmdRun.Text = "RUN >>"; this.cmdRun.UseVisualStyleBackColor = false; this.cmdRun.Click += new System.EventHandler(this.cmdRun_Click); // // label2 // this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.ForeColor = System.Drawing.Color.White; this.label2.Location = new System.Drawing.Point(8, 120); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(216, 16); this.label2.TabIndex = 7; this.label2.Text = "Code of the Mapping Class"; // // label1 // this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.ForeColor = System.Drawing.Color.White; this.label1.Location = new System.Drawing.Point(344, 120); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(216, 16); this.label1.TabIndex = 8; this.label1.Text = "Output Array"; // // label3 // this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.ForeColor = System.Drawing.Color.White; this.label3.Location = new System.Drawing.Point(8, 304); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(264, 16); this.label3.TabIndex = 9; this.label3.Text = "Input Data to the FileHelperEngine"; // // textBox1 // this.textBox1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.textBox1.Location = new System.Drawing.Point(8, 72); this.textBox1.Multiline = true; this.textBox1.Name = "textBox1"; this.textBox1.ReadOnly = true; this.textBox1.Size = new System.Drawing.Size(656, 40); this.textBox1.TabIndex = 13; this.textBox1.Text = "var engine = new FileHelperEngine<CustomersFixed>();\r\n ... = engine.ReadFile(\"in" + "file.txt\")"; this.textBox1.WordWrap = false; // // label4 // this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.ForeColor = System.Drawing.Color.White; this.label4.Location = new System.Drawing.Point(8, 56); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(152, 16); this.label4.TabIndex = 12; this.label4.Text = "Code to Read the File"; // // frmEasySampleFixed // this.AutoScaleBaseSize = new System.Drawing.Size(5, 14); this.ClientSize = new System.Drawing.Size(680, 496); this.Controls.Add(this.label4); this.Controls.Add(this.label1); this.Controls.Add(this.label2); this.Controls.Add(this.cmdRun); this.Controls.Add(this.grid1); this.Controls.Add(this.txtData); this.Controls.Add(this.txtClass); this.Controls.Add(this.label3); this.Controls.Add(this.textBox1); this.Name = "frmEasySampleFixed"; this.Text = "FileHelpers - Easy Fixed Length Example"; this.Controls.SetChildIndex(this.textBox1, 0); this.Controls.SetChildIndex(this.label3, 0); this.Controls.SetChildIndex(this.txtClass, 0); this.Controls.SetChildIndex(this.txtData, 0); this.Controls.SetChildIndex(this.grid1, 0); this.Controls.SetChildIndex(this.cmdRun, 0); this.Controls.SetChildIndex(this.label2, 0); this.Controls.SetChildIndex(this.label1, 0); this.Controls.SetChildIndex(this.label4, 0); this.ResumeLayout(false); this.PerformLayout(); }
protected override Control GetEditControl(object instance) { _source = instance; if (_source != null) { if (_panelBody != null && !_panelBody.IsDisposed) { _panelBody.Dispose(); } _panelBody = new Panel(); _panelBody.Width = 800; _panelBody.Height = 500; Panel panelBottom = new Panel(); panelBottom.Height = 80; panelBottom.Dock = DockStyle.Bottom; _panelBody.Controls.Add(panelBottom); MedButton btnUp = new MedButton(); btnUp.Click += new EventHandler(btnUp_Click); panelBottom.Controls.Add(btnUp); btnUp.Text = "上移(&W)"; btnUp.Location = new System.Drawing.Point(10, 10); btnUp.Width = 60; MedButton btnDown = new MedButton(); btnDown.Click += new EventHandler(btnDown_Click); panelBottom.Controls.Add(btnDown); btnDown.Text = "下移(&S)"; btnDown.Location = new System.Drawing.Point(90, 10); btnDown.Width = 60; MedButton btnAdd = new MedButton(); btnAdd.Click += new EventHandler(btnAdd_Click); panelBottom.Controls.Add(btnAdd); btnAdd.Text = "添加(&A)"; btnAdd.Location = new System.Drawing.Point(170, 10); btnAdd.Width = 60; MedButton btnDelete = new MedButton(); btnDelete.Click += new EventHandler(btnDelete_Click); panelBottom.Controls.Add(btnDelete); btnDelete.Text = "删除(&D)"; btnDelete.Location = new System.Drawing.Point(250, 10); btnDelete.Width = 60; MedButton btnOK = new MedButton(); btnOK.Click += new EventHandler(btnOK_Click); panelBottom.Controls.Add(btnOK); btnOK.Text = "确定(&O)"; btnOK.Location = new System.Drawing.Point(410, 10); btnOK.Width = 60; if (_gird != null && !_gird.IsDisposed) { _gird.Dispose(); } _gird = new MedGridView(); _gird.Columns.Add("显示文本", "显示文本"); _gird.Columns.Add("字段名称", "字段名称"); _gird.Columns.Add("宽度", "宽度"); if (_listBox != null && !_listBox.IsDisposed) { _listBox.Dispose(); } _listBox = new ListBox(); if (_propertyGrid != null && !_propertyGrid.IsDisposed) { _propertyGrid.Dispose(); } _propertyGrid = new PropertyGrid(); if (_source is MedGridView) { (_source as MedGridView).GetMedGridViewColumns(out _medGridViewColumns); } //else // if (_source is MedDevGrid) // { // (_source as MedDevGrid).GetMedGridViewColumns(out _medGridViewColumns); // } ResetList(); _panelBody.Controls.Add(_gird); _gird.Dock = DockStyle.Left; _gird.BringToFront(); _gird.Visible = false; _panelBody.Controls.Add(_listBox); _listBox.Dock = DockStyle.Left; _listBox.BringToFront(); _listBox.Width += 30; _listBox.SelectedIndexChanged += new EventHandler(listBox_SelectedIndexChanged); _panelBody.Controls.Add(_propertyGrid); _propertyGrid.Dock = DockStyle.Fill; _propertyGrid.BringToFront(); _propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(propertyGrid_PropertyValueChanged); return(_panelBody); } else { return(base.GetEditControl(instance)); } }
protected override void TestFixtureSetUp() { window = application.GetWindow("FormWithPropertyGrid"); propertyGrid = window.Get <PropertyGrid>("propertyGrid1"); }
public static GridItemCollection GetAllGridEntries(PropertyGrid grid) { object view = grid.GetType().GetField("gridView", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(grid); return((GridItemCollection)view.GetType().InvokeMember("GetAllGridEntries", BindingFlags.InvokeMethod | BindingFlags.NonPublic | BindingFlags.Instance, null, view, null)); }
internal void ShowOpenGLSLBook(PropertyGrid propertyGrid) => $"{GLSLUrl}{GetBookmark(propertyGrid)}".Launch();
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.dataSet11 = new DynamicFilter.DataSet1(); this.imageList1 = new System.Windows.Forms.ImageList(this.components); this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl(); this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); this.panel1 = new System.Windows.Forms.Panel(); this.checkBox8 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); this.checkBox7 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); this.checkBox6 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); this.checkBox5 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); this.checkBox4 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); this.checkBox3 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); this.checkBox2 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); this.checkBox1 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).BeginInit(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.checkBox8)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox7)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox6)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox5)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox4)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox1)).BeginInit(); this.SuspendLayout(); // // dataSet11 // this.dataSet11.DataSetName = "DataSet1"; this.dataSet11.Locale = new System.Globalization.CultureInfo("en-US"); this.dataSet11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // // imageList1 // this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); this.imageList1.TransparentColor = System.Drawing.Color.Transparent; this.imageList1.Images.SetKeyName(0, "filter_delete.png"); this.imageList1.Images.SetKeyName(1, "filter.png"); // // gridGroupingControl1 // this.gridGroupingControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.gridGroupingControl1.BackColor = System.Drawing.SystemColors.Window; this.gridGroupingControl1.DataSource = this.dataSet11.Customers; this.gridGroupingControl1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.gridGroupingControl1.FreezeCaption = false; this.gridGroupingControl1.Location = new System.Drawing.Point(9, 2); this.gridGroupingControl1.Name = "gridGroupingControl1"; this.gridGroupingControl1.ShowGroupDropArea = true; this.gridGroupingControl1.Size = new System.Drawing.Size(725, 639); this.gridGroupingControl1.TabIndex = 14; this.gridGroupingControl1.Text = "gridGroupingControl1"; this.gridGroupingControl1.TopLevelGroupOptions.ShowFilterBar = true; this.gridGroupingControl1.VersionInfo = "4.201.0.37"; // // propertyGrid1 // this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.propertyGrid1.BackColor = System.Drawing.Color.White; this.propertyGrid1.CommandsBackColor = System.Drawing.Color.White; this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.White; this.propertyGrid1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.propertyGrid1.HelpBackColor = System.Drawing.Color.White; this.propertyGrid1.LineColor = System.Drawing.Color.White; this.propertyGrid1.Location = new System.Drawing.Point(739, 187); this.propertyGrid1.Name = "propertyGrid1"; this.propertyGrid1.SelectedObject = this.gridGroupingControl1; this.propertyGrid1.Size = new System.Drawing.Size(262, 454); this.propertyGrid1.TabIndex = 25; // // panel1 // this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel1.Controls.Add(this.checkBox8); this.panel1.Controls.Add(this.checkBox7); this.panel1.Controls.Add(this.checkBox6); this.panel1.Controls.Add(this.checkBox5); this.panel1.Controls.Add(this.checkBox4); this.panel1.Controls.Add(this.checkBox3); this.panel1.Controls.Add(this.checkBox2); this.panel1.Controls.Add(this.checkBox1); this.panel1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.panel1.Location = new System.Drawing.Point(740, 2); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(260, 178); this.panel1.TabIndex = 17; // // checkBox8 // this.checkBox8.BeforeTouchSize = new System.Drawing.Size(150, 21); this.checkBox8.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox8.ForeColor = System.Drawing.Color.DimGray; this.checkBox8.Location = new System.Drawing.Point(10, 128); this.checkBox8.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox8.Name = "checkBox8"; this.checkBox8.Size = new System.Drawing.Size(247, 17); this.checkBox8.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox8.DrawFocusRectangle = true; this.checkBox8.TabIndex = 23; this.checkBox8.Text = "Enable Localization in RecordNavigationBar"; this.checkBox8.ThemesEnabled = false; this.checkBox8.CheckStateChanged += new System.EventHandler(this.checkBox8_CheckedChanged); // // checkBox7 // this.checkBox7.BeforeTouchSize = new System.Drawing.Size(150, 21); this.checkBox7.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox7.ForeColor = System.Drawing.Color.DimGray; this.checkBox7.Location = new System.Drawing.Point(10, 108); this.checkBox7.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox7.Name = "checkBox7"; this.checkBox7.Size = new System.Drawing.Size(206, 17); this.checkBox7.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox7.DrawFocusRectangle = true; this.checkBox7.TabIndex = 22; this.checkBox7.Text = "Enable Localization in FieldChooser"; this.checkBox7.ThemesEnabled = false; this.checkBox7.CheckStateChanged += new System.EventHandler(this.checkBox7_CheckedChanged); // // checkBox6 // this.checkBox6.BeforeTouchSize = new System.Drawing.Size(150, 21); this.checkBox6.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox6.ForeColor = System.Drawing.Color.DimGray; this.checkBox6.Location = new System.Drawing.Point(10, 88); this.checkBox6.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox6.Name = "checkBox6"; this.checkBox6.Size = new System.Drawing.Size(222, 17); this.checkBox6.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox6.DrawFocusRectangle = true; this.checkBox6.TabIndex = 20; this.checkBox6.Text = "Enable Localization in Office2007 Filter"; this.checkBox6.ThemesEnabled = false; this.checkBox6.CheckStateChanged += new System.EventHandler(this.checkBox6_CheckedChanged); // // checkBox5 // this.checkBox5.BeforeTouchSize = new System.Drawing.Size(150, 21); this.checkBox5.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox5.ForeColor = System.Drawing.Color.DimGray; this.checkBox5.Location = new System.Drawing.Point(10, 148); this.checkBox5.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox5.Name = "checkBox5"; this.checkBox5.Size = new System.Drawing.Size(217, 17); this.checkBox5.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox5.DrawFocusRectangle = true; this.checkBox5.TabIndex = 24; this.checkBox5.Text = "Enable Localization in Filter Comparer"; this.checkBox5.ThemesEnabled = false; this.checkBox5.CheckStateChanged += new System.EventHandler(this.checkBox5_CheckedChanged); // // checkBox4 // this.checkBox4.BeforeTouchSize = new System.Drawing.Size(150, 21); this.checkBox4.Checked = true; this.checkBox4.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox4.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox4.ForeColor = System.Drawing.Color.DimGray; this.checkBox4.Location = new System.Drawing.Point(10, 8); this.checkBox4.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox4.Name = "checkBox4"; this.checkBox4.Size = new System.Drawing.Size(95, 17); this.checkBox4.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox4.DrawFocusRectangle = true; this.checkBox4.TabIndex = 16; this.checkBox4.Text = "Dynamic Filter"; this.checkBox4.ThemesEnabled = false; this.checkBox4.CheckStateChanged += new System.EventHandler(this.checkBox4_CheckedChanged); // // checkBox3 // this.checkBox3.BeforeTouchSize = new System.Drawing.Size(150, 21); this.checkBox3.Checked = true; this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox3.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox3.ForeColor = System.Drawing.Color.DimGray; this.checkBox3.Location = new System.Drawing.Point(10, 69); this.checkBox3.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox3.Name = "checkBox3"; this.checkBox3.Size = new System.Drawing.Size(172, 17); this.checkBox3.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox3.DrawFocusRectangle = true; this.checkBox3.TabIndex = 19; this.checkBox3.Text = "Add FilterBar to ChildGroups"; this.checkBox3.ThemesEnabled = false; this.checkBox3.CheckStateChanged += new System.EventHandler(this.checkBox3_CheckedChanged); // // checkBox2 // this.checkBox2.BeforeTouchSize = new System.Drawing.Size(150, 21); this.checkBox2.Checked = false; this.checkBox2.CheckState = System.Windows.Forms.CheckState.Unchecked; this.checkBox2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox2.ForeColor = System.Drawing.Color.DimGray; this.checkBox2.Location = new System.Drawing.Point(10, 29); this.checkBox2.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox2.Name = "checkBox2"; this.checkBox2.Size = new System.Drawing.Size(161, 17); this.checkBox2.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox2.DrawFocusRectangle = true; this.checkBox2.TabIndex = 17; this.checkBox2.Text = "Add FilterBar to ChildTable"; this.checkBox2.ThemesEnabled = false; this.checkBox2.CheckStateChanged += new System.EventHandler(this.checkBox2_CheckedChanged); // // checkBox1 // this.checkBox1.BeforeTouchSize = new System.Drawing.Size(150, 21); this.checkBox1.Checked = true; this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox1.ForeColor = System.Drawing.Color.DimGray; this.checkBox1.Location = new System.Drawing.Point(10, 49); this.checkBox1.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(167, 17); this.checkBox1.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox1.DrawFocusRectangle = true; this.checkBox1.TabIndex = 18; this.checkBox1.Text = "Add FilterBar to ParentTable"; this.checkBox1.ThemesEnabled = false; this.checkBox1.CheckStateChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.ClientSize = new System.Drawing.Size(1012, 653); this.Controls.Add(this.panel1); this.Controls.Add(this.propertyGrid1); this.Controls.Add(this.gridGroupingControl1); this.MinimumSize = new System.Drawing.Size(860, 335); this.Name = "Form1"; this.Text = "Localization"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); this.Load += new System.EventHandler(this.Form1_Load); ((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).EndInit(); this.panel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.checkBox8)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox7)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox6)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox5)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox1)).EndInit(); this.ResumeLayout(false); }
private void InitializeComponent() { this._schemaLabel = new System.Windows.Forms.Label(); this._bindingsLabel = new System.Windows.Forms.Label(); this._bindingsListView = new System.Windows.Forms.ListBox(); this._addBindingButton = new System.Windows.Forms.Button(); this._propertiesLabel = new System.Windows.Forms.Label(); this._cancelButton = new System.Windows.Forms.Button(); this._propertyGrid = new VsPropertyGrid(base.ServiceProvider); this._schemaTreeView = new System.Windows.Forms.TreeView(); this._moveBindingUpButton = new System.Windows.Forms.Button(); this._moveBindingDownButton = new System.Windows.Forms.Button(); this._deleteBindingButton = new System.Windows.Forms.Button(); this._autogenerateBindingsCheckBox = new System.Windows.Forms.CheckBox(); this._okButton = new System.Windows.Forms.Button(); this._applyButton = new System.Windows.Forms.Button(); base.SuspendLayout(); this._schemaLabel.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top; this._schemaLabel.Location = new Point(12, 12); this._schemaLabel.Name = "_schemaLabel"; this._schemaLabel.Size = new Size(0xc4, 14); this._schemaLabel.TabIndex = 10; this._bindingsLabel.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom; this._bindingsLabel.Location = new Point(12, 0xba); this._bindingsLabel.Name = "_bindingsLabel"; this._bindingsLabel.Size = new Size(0xc4, 14); this._bindingsLabel.TabIndex = 0x19; this._bindingsListView.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom; this._bindingsListView.Location = new Point(12, 0xca); this._bindingsListView.Name = "_bindingsListView"; this._bindingsListView.Size = new Size(0xa4, 0x70); this._bindingsListView.TabIndex = 30; this._bindingsListView.SelectedIndexChanged += new EventHandler(this.OnBindingsListViewSelectedIndexChanged); this._bindingsListView.GotFocus += new EventHandler(this.OnBindingsListViewGotFocus); this._addBindingButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this._addBindingButton.FlatStyle = FlatStyle.System; this._addBindingButton.Location = new Point(0x85, 0x9a); this._addBindingButton.Name = "_addBindingButton"; this._addBindingButton.Size = new Size(0x4b, 0x17); this._addBindingButton.TabIndex = 20; this._addBindingButton.Click += new EventHandler(this.OnAddBindingButtonClick); this._propertiesLabel.Anchor = AnchorStyles.Right | AnchorStyles.Top; this._propertiesLabel.Location = new Point(0xe5, 12); this._propertiesLabel.Name = "_propertiesLabel"; this._propertiesLabel.Size = new Size(0x10a, 14); this._propertiesLabel.TabIndex = 50; this._cancelButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this._cancelButton.FlatStyle = FlatStyle.System; this._cancelButton.Location = new Point(340, 0x15a); this._cancelButton.Name = "_cancelButton"; this._cancelButton.TabIndex = 0x41; this._cancelButton.Click += new EventHandler(this.OnCancelButtonClick); this._okButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this._okButton.FlatStyle = FlatStyle.System; this._okButton.Location = new Point(260, 0x15a); this._okButton.Name = "_okButton"; this._okButton.TabIndex = 60; this._okButton.Click += new EventHandler(this.OnOKButtonClick); this._applyButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this._applyButton.FlatStyle = FlatStyle.System; this._applyButton.Location = new Point(420, 0x15a); this._applyButton.Name = "_applyButton"; this._applyButton.TabIndex = 60; this._applyButton.Click += new EventHandler(this.OnApplyButtonClick); this._applyButton.Enabled = false; this._propertyGrid.Anchor = AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top; this._propertyGrid.CommandsVisibleIfAvailable = true; this._propertyGrid.Cursor = Cursors.HSplit; this._propertyGrid.LargeButtons = false; this._propertyGrid.LineColor = SystemColors.ScrollBar; this._propertyGrid.Location = new Point(0xe5, 0x1c); this._propertyGrid.Name = "_propertyGrid"; this._propertyGrid.Size = new Size(0x10a, 0x135); this._propertyGrid.TabIndex = 0x37; this._propertyGrid.Text = System.Design.SR.GetString("MenuItemCollectionEditor_PropertyGrid"); this._propertyGrid.ToolbarVisible = true; this._propertyGrid.ViewBackColor = SystemColors.Window; this._propertyGrid.ViewForeColor = SystemColors.WindowText; this._propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(this.OnPropertyGridPropertyValueChanged); this._propertyGrid.Site = this._treeView.Site; this._schemaTreeView.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top; this._schemaTreeView.HideSelection = false; this._schemaTreeView.ImageIndex = -1; this._schemaTreeView.Location = new Point(12, 0x1c); this._schemaTreeView.Name = "_schemaTreeView"; this._schemaTreeView.SelectedImageIndex = -1; this._schemaTreeView.Size = new Size(0xc4, 120); this._schemaTreeView.TabIndex = 15; this._schemaTreeView.AfterSelect += new TreeViewEventHandler(this.OnSchemaTreeViewAfterSelect); this._schemaTreeView.GotFocus += new EventHandler(this.OnSchemaTreeViewGotFocus); this._moveBindingUpButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this._moveBindingUpButton.Location = new Point(0xb6, 0xca); this._moveBindingUpButton.Name = "_moveBindingUpButton"; this._moveBindingUpButton.Size = new Size(0x1a, 0x17); this._moveBindingUpButton.TabIndex = 0x23; this._moveBindingUpButton.Click += new EventHandler(this.OnMoveBindingUpButtonClick); this._moveBindingDownButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this._moveBindingDownButton.Location = new Point(0xb6, 0xe2); this._moveBindingDownButton.Name = "_moveBindingDownButton"; this._moveBindingDownButton.Size = new Size(0x1a, 0x17); this._moveBindingDownButton.TabIndex = 40; this._moveBindingDownButton.Click += new EventHandler(this.OnMoveBindingDownButtonClick); this._deleteBindingButton.Anchor = AnchorStyles.Right | AnchorStyles.Bottom; this._deleteBindingButton.Location = new Point(0xb6, 0xff); this._deleteBindingButton.Name = "_deleteBindingButton"; this._deleteBindingButton.Size = new Size(0x1a, 0x17); this._deleteBindingButton.TabIndex = 0x2d; this._deleteBindingButton.Click += new EventHandler(this.OnDeleteBindingButtonClick); this._autogenerateBindingsCheckBox.Anchor = AnchorStyles.Left | AnchorStyles.Bottom; this._autogenerateBindingsCheckBox.Location = new Point(12, 320); this._autogenerateBindingsCheckBox.Name = "_autogenerateBindingsCheckBox"; this._autogenerateBindingsCheckBox.Size = new Size(0xc4, 0x12); this._autogenerateBindingsCheckBox.TabIndex = 5; this._autogenerateBindingsCheckBox.Text = System.Design.SR.GetString("TreeViewBindingsEditor_AutoGenerateBindings"); this._autogenerateBindingsCheckBox.CheckedChanged += new EventHandler(this.OnAutoGenerateChanged); this._autoBindInitialized = false; base.AcceptButton = this._okButton; base.CancelButton = this._cancelButton; base.ClientSize = new Size(0x1fb, 0x17d); base.Controls.AddRange(new System.Windows.Forms.Control[] { this._autogenerateBindingsCheckBox, this._deleteBindingButton, this._moveBindingDownButton, this._moveBindingUpButton, this._okButton, this._cancelButton, this._applyButton, this._propertiesLabel, this._addBindingButton, this._bindingsListView, this._bindingsLabel, this._schemaTreeView, this._schemaLabel, this._propertyGrid }); this.MinimumSize = new Size(0x1fb, 0x17d); base.Name = "TreeViewBindingsEditor"; base.FormBorderStyle = FormBorderStyle.FixedDialog; base.SizeGripStyle = SizeGripStyle.Hide; base.InitializeForm(); base.ResumeLayout(false); }
/// <summary> /// Initializes new instance of <see cref="CommandsPaneAccessibleObject"/>. /// </summary> /// <param name="owningCommandsPane">The owning <see cref="CommandsPane"/> control.</param> /// <param name="parentPropertyGrid">The parent <see cref="PropertyGrid"/> control.</param> public CommandsPaneAccessibleObject(CommandsPane owningCommandsPane, PropertyGrid parentPropertyGrid) : base(owningCommandsPane) { _parentPropertyGrid = parentPropertyGrid; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl(); this.dataset11 = new DynamicFormatting_GGC.Dataset1(); this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataset11)).BeginInit(); this.SuspendLayout(); // // gridGroupingControl1 // this.gridGroupingControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.gridGroupingControl1.BackColor = System.Drawing.SystemColors.Window; this.gridGroupingControl1.DataSource = this.dataset11.Orders; this.gridGroupingControl1.Font = new System.Drawing.Font("Segoe UI", 8.25F); this.gridGroupingControl1.FreezeCaption = false; this.gridGroupingControl1.GridOfficeScrollBars = Syncfusion.Windows.Forms.OfficeScrollBars.Metro; this.gridGroupingControl1.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Metro; this.gridGroupingControl1.Location = new System.Drawing.Point(12, 12); this.gridGroupingControl1.Name = "gridGroupingControl1"; this.gridGroupingControl1.Size = new System.Drawing.Size(774, 629); this.gridGroupingControl1.TabIndex = 0; this.gridGroupingControl1.TableDescriptor.AllowNew = false; this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Facename = "Segoe UI"; this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138))))); this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Borders.Bottom = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Borders.Right = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Interior = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))))); this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138))))); this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Borders.Bottom = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Borders.Right = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Borders.Right = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Borders.Top = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Interior = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))))); this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Font.Bold = true; this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell.CellType = "ColumnHeader"; this.gridGroupingControl1.TableDescriptor.TableOptions.ColumnHeaderRowHeight = 25; this.gridGroupingControl1.TableDescriptor.TableOptions.RecordRowHeight = 20; this.gridGroupingControl1.TableOptions.GridLineBorder = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))))); this.gridGroupingControl1.Text = "gridGroupingControl1"; this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false; this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false; this.gridGroupingControl1.VersionInfo = "4.201.0.60"; // // dataset11 // this.dataset11.DataSetName = "Dataset1"; this.dataset11.Locale = new System.Globalization.CultureInfo("en-US"); this.dataset11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // // propertyGrid1 // this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.propertyGrid1.BackColor = System.Drawing.Color.White; this.propertyGrid1.CommandsBackColor = System.Drawing.Color.White; this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.White; this.propertyGrid1.HelpBackColor = System.Drawing.Color.White; this.propertyGrid1.LineColor = System.Drawing.Color.White; this.propertyGrid1.Location = new System.Drawing.Point(796, 12); this.propertyGrid1.Name = "propertyGrid1"; this.propertyGrid1.SelectedObject = this.gridGroupingControl1; this.propertyGrid1.Size = new System.Drawing.Size(203, 629); this.propertyGrid1.TabIndex = 21; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1012, 653); this.Controls.Add(this.propertyGrid1); this.Controls.Add(this.gridGroupingControl1); this.MinimumSize = new System.Drawing.Size(800, 450); this.Name = "Form1"; this.Text = " Dynamic Formating"; ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataset11)).EndInit(); this.ResumeLayout(false); }
public bool FillProperties(PropertyGrid targetGrid) { // Fills given property grid (no properties for enviornment, yet) targetGrid.SelectedObject = this; return(true); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl(); this.panel1 = new System.Windows.Forms.Panel(); this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).BeginInit(); this.SuspendLayout(); // // gridGroupingControl1 // this.gridGroupingControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.gridGroupingControl1.BackColor = System.Drawing.Color.White; this.gridGroupingControl1.FreezeCaption = false; this.gridGroupingControl1.GridOfficeScrollBars = Syncfusion.Windows.Forms.OfficeScrollBars.Metro; this.gridGroupingControl1.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Metro; this.gridGroupingControl1.Location = new System.Drawing.Point(12, 6); this.gridGroupingControl1.Name = "gridGroupingControl1"; this.gridGroupingControl1.Size = new System.Drawing.Size(480, 396); this.gridGroupingControl1.TabIndex = 0; this.gridGroupingControl1.TableDescriptor.AllowNew = false; this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.Font.Facename = "Segoe UI"; this.gridGroupingControl1.TableDescriptor.Appearance.AnyCell.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138))))); this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Borders.Bottom = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Borders.Right = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.Interior = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))))); this.gridGroupingControl1.TableDescriptor.Appearance.AnyGroupCell.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(138)))), ((int)(((byte)(138)))), ((int)(((byte)(138))))); this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Borders.Bottom = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Borders.Right = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Borders.Right = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Borders.Top = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208))))), Syncfusion.Windows.Forms.Grid.GridBorderWeight.ExtraThin); this.gridGroupingControl1.TableDescriptor.Appearance.AnySummaryCell.Interior = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(208)))), ((int)(((byte)(208)))))); this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Font.Bold = true; this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell.CellType = "ColumnHeader"; this.gridGroupingControl1.TableDescriptor.TableOptions.ColumnHeaderRowHeight = 25; this.gridGroupingControl1.TableDescriptor.TableOptions.RecordRowHeight = 20; this.gridGroupingControl1.TableOptions.GridLineBorder = new Syncfusion.Windows.Forms.Grid.GridBorder(Syncfusion.Windows.Forms.Grid.GridBorderStyle.Solid, System.Drawing.Color.Silver); this.gridGroupingControl1.Text = "gridGroupingControl1"; this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false; this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false; this.gridGroupingControl1.VersionInfo = "3.201.1.0"; // // panel1 // this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.panel1.BackColor = System.Drawing.Color.DimGray; this.panel1.ForeColor = System.Drawing.Color.DimGray; this.panel1.Location = new System.Drawing.Point(497, 24); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(1, 370); this.panel1.TabIndex = 20; // // propertyGrid1 // this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.propertyGrid1.BackColor = System.Drawing.Color.White; this.propertyGrid1.CommandsBackColor = System.Drawing.Color.White; this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.White; this.propertyGrid1.HelpBackColor = System.Drawing.Color.White; this.propertyGrid1.LineColor = System.Drawing.Color.White; this.propertyGrid1.Location = new System.Drawing.Point(504, 6); this.propertyGrid1.Name = "propertyGrid1"; this.propertyGrid1.SelectedObject = this.gridGroupingControl1; this.propertyGrid1.Size = new System.Drawing.Size(203, 396); this.propertyGrid1.TabIndex = 19; // // Form1 // this.ClientSize = new System.Drawing.Size(718, 419); this.Controls.Add(this.panel1); this.Controls.Add(this.propertyGrid1); this.Controls.Add(this.gridGroupingControl1); this.MinimumSize = new System.Drawing.Size(530, 376); this.Name = "Form1"; this.Text = "Sort By Display Member "; ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).EndInit(); this.ResumeLayout(false); }
internal PropertyDescriptorGridEntry(PropertyGrid ownerGrid, GridEntry peParent, bool hide) : base(ownerGrid, peParent) { activeXHide = hide; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { var resources = new System.Resources.ResourceManager(typeof(QuickMobile)); this.pGrid = new System.Windows.Forms.PropertyGrid(); this.m_Preview = new TheBox.ArtViewer.ArtViewer(); this.bOk = new System.Windows.Forms.Button(); this.bCancel = new System.Windows.Forms.Button(); this.SuspendLayout(); // // pGrid // this.pGrid.CommandsVisibleIfAvailable = true; this.pGrid.LargeButtons = false; this.pGrid.LineColor = System.Drawing.SystemColors.ScrollBar; this.pGrid.Location = new System.Drawing.Point(8, 8); this.pGrid.Name = "pGrid"; this.pGrid.Size = new System.Drawing.Size(208, 248); this.pGrid.TabIndex = 0; this.pGrid.Text = "propertyGrid1"; this.pGrid.ViewBackColor = System.Drawing.SystemColors.Window; this.pGrid.ViewForeColor = System.Drawing.SystemColors.WindowText; this.pGrid.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.pGrid_PropertyValueChanged); // // m_Preview // this.m_Preview.Animate = true; this.m_Preview.Art = TheBox.ArtViewer.Art.NPCs; this.m_Preview.ArtIndex = 0; this.m_Preview.Hue = 0; this.m_Preview.Location = new System.Drawing.Point(224, 8); this.m_Preview.Name = "m_Preview"; this.m_Preview.ResizeTallItems = false; this.m_Preview.RoomView = true; this.m_Preview.ShowID = false; this.m_Preview.Size = new System.Drawing.Size(216, 216); this.m_Preview.TabIndex = 1; this.m_Preview.Text = "artViewer1"; // // bOk // this.bOk.FlatStyle = System.Windows.Forms.FlatStyle.System; this.bOk.Location = new System.Drawing.Point(360, 232); this.bOk.Name = "bOk"; this.bOk.TabIndex = 2; this.bOk.Text = "Common.Ok"; this.bOk.Click += new System.EventHandler(this.bOk_Click); // // bCancel // this.bCancel.FlatStyle = System.Windows.Forms.FlatStyle.System; this.bCancel.Location = new System.Drawing.Point(224, 232); this.bCancel.Name = "bCancel"; this.bCancel.TabIndex = 3; this.bCancel.Text = "Common.Cancel"; this.bCancel.Click += new System.EventHandler(this.bCancel_Click); // // QuickMobile // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(448, 261); this.Controls.Add(this.bCancel); this.Controls.Add(this.bOk); this.Controls.Add(this.m_Preview); this.Controls.Add(this.pGrid); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.Name = "QuickMobile"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "QuickMobile"; this.Load += new System.EventHandler(this.QuickMobile_Load); this.ResumeLayout(false); }
internal PropertyDescriptorGridEntry(PropertyGrid ownerGrid, GridEntry peParent, PropertyDescriptor propInfo, bool hide) : base(ownerGrid, peParent) { activeXHide = hide; Initialize(propInfo); }
private void InitializeComponent() { propertyOptions = new PropertyGrid(); buttonOk = new Button(); buttonCancel = new Button(); panelTopMain = new Panel(); panelBottomMain = new Panel(); panelTopMain.SuspendLayout(); panelBottomMain.SuspendLayout(); base.SuspendLayout(); propertyOptions.CommandsVisibleIfAvailable = true; propertyOptions.HelpVisible = false; propertyOptions.LargeButtons = false; propertyOptions.LineColor = SystemColors.ScrollBar; propertyOptions.Location = new Point(8, 8); propertyOptions.Name = "propertyOptions"; propertyOptions.PropertySort = PropertySort.Alphabetical; propertyOptions.Dock = DockStyle.Fill; propertyOptions.TabIndex = 0; propertyOptions.Text = "PropertyGrid"; propertyOptions.ToolbarVisible = false; propertyOptions.ViewBackColor = SystemColors.Window; propertyOptions.ViewForeColor = SystemColors.WindowText; propertyOptions.SelectedObject = Configuration.MasterConfig.Copy(); buttonOk.DialogResult = DialogResult.Cancel; buttonOk.FlatStyle = FlatStyle.Popup; buttonOk.Location = new Point(8, 5); buttonOk.Name = "buttonOk"; buttonOk.Size = new Size(50, 20); buttonOk.TabIndex = 1; buttonOk.Text = "OK"; buttonOk.Click += buttonOk_Click; buttonCancel.DialogResult = DialogResult.Cancel; buttonCancel.FlatStyle = FlatStyle.Popup; buttonCancel.Location = new Point(70, 5); buttonCancel.Name = "buttonCancel"; buttonCancel.Size = new Size(50, 20); buttonCancel.TabIndex = 1; buttonCancel.Text = "Cancel"; buttonCancel.Click += buttonCancel_Click; panelTopMain.BorderStyle = BorderStyle.None; panelTopMain.Controls.AddRange(new Control[] { propertyOptions }); panelTopMain.Dock = DockStyle.Fill; panelTopMain.Name = "panelTopMain"; panelTopMain.Size = new Size(0, 250); panelTopMain.TabIndex = 0; panelBottomMain.BorderStyle = BorderStyle.None; panelBottomMain.Controls.AddRange(new Control[] { buttonOk, buttonCancel }); panelBottomMain.Dock = DockStyle.Bottom; panelBottomMain.Size = new Size(0, 30); panelBottomMain.Name = "panelBottomMain"; panelBottomMain.TabIndex = 1; base.AcceptButton = buttonOk; base.CancelButton = buttonCancel; AutoScaleBaseSize = new Size(5, 13); base.ClientSize = new Size(0x110, 0x12b); base.Controls.AddRange(new Control[] { panelTopMain, panelBottomMain }); base.Name = "OptionDialog"; Text = "Options "; panelTopMain.ResumeLayout(false); panelBottomMain.ResumeLayout(false); base.ResumeLayout(false); propertyOptions.ExpandAllGridItems(); }
protected void OnContentLoaded(object sender, ContentLoadedEventArgs e) { switch (e.Metadata.LeftOf(",")) { case Constants.META_CANVAS: pnlFlowSharp = new Panel() { Dock = DockStyle.Fill, Tag = Constants.META_CANVAS }; e.DockContent.Controls.Add(pnlFlowSharp); e.DockContent.Text = "Canvas"; IFlowSharpCanvasService canvasService = ServiceManager.Get <IFlowSharpCanvasService>(); canvasService.CreateCanvas(pnlFlowSharp); BaseController baseController = ServiceManager.Get <IFlowSharpCanvasService>().ActiveController; if (e.Metadata.Contains(",")) { string filename = e.Metadata.Between(",", ","); string canvasName = e.Metadata.RightOfRightmostOf(","); canvasName = String.IsNullOrWhiteSpace(canvasName) ? "Canvas" : canvasName; e.DockContent.Text = canvasName; LoadFileIntoCanvas(filename, canvasName, baseController); } // ServiceManager.Get<IFlowSharpMouseControllerService>().Initialize(baseController); break; case Constants.META_TOOLBOX: pnlToolbox = new Panel() { Dock = DockStyle.Fill, Tag = Constants.META_TOOLBOX }; e.DockContent.Controls.Add(pnlToolbox); e.DockContent.Text = "Toolbox"; break; case Constants.META_PROPERTYGRID: propGrid = new PropertyGrid() { Dock = DockStyle.Fill, Tag = Constants.META_PROPERTYGRID }; e.DockContent.Controls.Add(propGrid); e.DockContent.Text = "Property Grid"; ServiceManager.Get <IFlowSharpPropertyGridService>().Initialize(propGrid); break; default: ContentResolver.Fire(this, e); break; } // Associate the toolbox with a canvas controller after both canvas and toolbox panels are created. // !!! This handles the defaultLayout configuration. !!! if ((e.Metadata == Constants.META_CANVAS || e.Metadata == Constants.META_TOOLBOX) && (pnlFlowSharp != null && pnlToolbox != null)) { IFlowSharpCanvasService canvasService = ServiceManager.Get <IFlowSharpCanvasService>(); BaseController canvasController = canvasService.ActiveController; IFlowSharpToolboxService toolboxService = ServiceManager.Get <IFlowSharpToolboxService>(); toolboxService.CreateToolbox(pnlToolbox); toolboxService.InitializeToolbox(); toolboxService.InitializePluginsInToolbox(); toolboxService.UpdateToolboxPaths(); } //if ((e.Metadata == Constants.META_CANVAS || e.Metadata == Constants.META_PROPERTYGRID) && (pnlFlowSharp != null && propGrid != null)) //{ // ServiceManager.Get<IFlowSharpPropertyGridService>().Initialize(propGrid); //} }
// Override this method in order to access the containing user controls // from the default Collection Editor form or to add new ones... protected override CollectionForm CreateCollectionForm() { // Getting the default layout of the Collection Editor... CollectionForm collectionForm = base.CreateCollectionForm(); bool allowAdd = false; bool allowRemove = false; Form frmCollectionEditorForm = collectionForm as Form; frmCollectionEditorForm.HelpButton = false; frmCollectionEditorForm.Text = "Collection Editor"; if (CollectionItemType == typeof(ReportRestriction)) { frmCollectionEditorForm.Text = "Restrictions Collection Editor"; } else if (CollectionItemType == typeof(Parameter)) { frmCollectionEditorForm.Text = "Template Parameters Collection Editor"; } else if (CollectionItemType == typeof(SecurityParameter)) { frmCollectionEditorForm.Text = "Security Parameters Collection Editor"; _useHandlerInterface = false; } else if (CollectionItemType == typeof(SecurityGroup)) { frmCollectionEditorForm.Text = "Security Groups Collection Editor"; allowAdd = true; allowRemove = true; _useHandlerInterface = false; } else if (CollectionItemType == typeof(SecurityFolder)) { frmCollectionEditorForm.Text = "Security Folders Collection Editor"; allowAdd = true; allowRemove = true; _useHandlerInterface = false; } else if (CollectionItemType == typeof(SecurityColumn)) { frmCollectionEditorForm.Text = "Security Columns Collection Editor"; allowAdd = true; allowRemove = true; _useHandlerInterface = false; } else if (CollectionItemType == typeof(SubReport)) { frmCollectionEditorForm.Text = "Sub-Reports Collection Editor"; allowRemove = true; _useHandlerInterface = true; } TableLayoutPanel tlpLayout = frmCollectionEditorForm.Controls[0] as TableLayoutPanel; if (tlpLayout != null) { // Get a reference to the inner PropertyGrid and hook // an event handler to it. if (tlpLayout.Controls[5] is PropertyGrid) { PropertyGrid propertyGrid = tlpLayout.Controls[5] as PropertyGrid; propertyGrid.HelpVisible = true; propertyGrid.ToolbarVisible = false; propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(propertyGrid_PropertyValueChanged); } } //Hide Add/Remove -> Get the forms type if (!allowRemove) { Type formType = frmCollectionEditorForm.GetType(); FieldInfo fieldInfo = formType.GetField("removeButton", BindingFlags.NonPublic | BindingFlags.Instance); if (fieldInfo != null) { System.Windows.Forms.Control removeButton = (System.Windows.Forms.Control)fieldInfo.GetValue(frmCollectionEditorForm); removeButton.Hide(); } } if (!allowAdd) { Type formType = frmCollectionEditorForm.GetType(); FieldInfo fieldInfo = formType.GetField("addButton", BindingFlags.NonPublic | BindingFlags.Instance); if (fieldInfo != null) { System.Windows.Forms.Control addButton = (System.Windows.Forms.Control)fieldInfo.GetValue(frmCollectionEditorForm); addButton.Hide(); } } return(collectionForm); }
public PropertyGridToolStrip(PropertyGrid parentPropertyGrid) { _parentPropertyGrid = parentPropertyGrid; }
public ItemsSet(DwgDocument dwgDocument, PropertyGrid propertyGrid) { this.dwgDocument = dwgDocument; this.propertyGrid = propertyGrid; }
private void InitializeDocking() { // // FPaletteGroupBar // /*FPaletteGroupBar = new GroupBar(); * FPaletteGroupBar.AllowDrop = true; * FPaletteGroupBar.BackColor = SystemColors.Control; * FPaletteGroupBar.BorderStyle = BorderStyle.FixedSingle; * FPaletteGroupBar.Dock = DockStyle.Fill; * FPaletteGroupBar.Location = new Point(0, 24); * FPaletteGroupBar.Name = "FPaletteGroupBar"; * FPaletteGroupBar.SelectedItem = 0; * FPaletteGroupBar.Size = new Size(163, 163); * FPaletteGroupBar.TabIndex = 1;*/ // // FPointerGroupView // /*FPointerGroupView = new GroupView * { * BorderStyle = BorderStyle.None, * ButtonView = true, * Dock = DockStyle.Top * }; * FPointerGroupView.GroupViewItems.AddRange(new[] * { * new GroupViewItem("Pointer", 0) * }); * FPointerGroupView.IntegratedScrolling = true; * FPointerGroupView.ItemYSpacing = 2; * FPointerGroupView.LargeImageList = null; * FPointerGroupView.Location = new Point(0, 0); * FPointerGroupView.Name = "FPointerGroupView"; * FPointerGroupView.SelectedItem = 0; * FPointerGroupView.Size = new Size(163, 24); * FPointerGroupView.SmallImageList = FPointerImageList; * FPointerGroupView.SmallImageView = true; * FPointerGroupView.TabIndex = 0; * FPointerGroupView.Text = "groupView2"; * FPointerGroupView.GroupViewItemSelected += FPointerGroupView_GroupViewItemSelected; */ // // FNodesTree // FNodesTree = new DesignerTree.DesignerTree(); FNodesTree.AllowDrop = true; FNodesTree.BorderStyle = BorderStyle.None; FNodesTree.CausesValidation = false; FNodesTree.Dock = DockStyle.Fill; FNodesTree.HideSelection = false; FNodesTree.ImageList = FNodesImageList; FNodesTree.Location = new Point(0, 0); FNodesTree.Name = "FNodesTree"; FNodesTree.ShowRootLines = false; FNodesTree.Size = new Size(283, 209); FNodesTree.TabIndex = 0; FNodesTree.AfterSelect += FNodesTree_AfterSelect; FNodesTree.Dock = DockStyle.Fill; _dockContentNodesTree = new DockContent(); _dockContentNodesTree.HideOnClose = true; _dockContentNodesTree.Controls.Add(FNodesTree); _dockContentNodesTree.TabText = "Nodes Tree"; _dockContentNodesTree.Text = "Nodes Tree - Dataphoria"; _dockContentNodesTree.ShowHint = DockState.Document; _dockContentNodesTree.Show(FDockPanel); // // FPalettePanel // _palettePanel = new ToolBox.ToolBox(); _palettePanel.NodesTree = this.FNodesTree; _palettePanel.Location = new Point(1, 21); _palettePanel.Name = "FPalettePanel"; _palettePanel.Size = new Size(163, 187); _palettePanel.TabIndex = 1; _palettePanel.Dock = DockStyle.Fill; _palettePanel.StatusChanged += FPalettePanel_StatusChanged; _dockContentPalettePanel = new DockContent(); _dockContentPalettePanel.HideOnClose = true; _dockContentPalettePanel.Controls.Add(_palettePanel); _dockContentPalettePanel.TabText = "Node Palette"; _dockContentPalettePanel.Text = "Node Palette - Dataphoria"; _dockContentPalettePanel.ShowHint = DockState.DockLeft; _dockContentPalettePanel.Show(FDockPanel); // // FFormPanel // FFormPanel = new FormPanel(); FFormPanel.BackColor = SystemColors.ControlDark; FFormPanel.Location = new Point(1, 21); FFormPanel.Name = "FFormPanel"; FFormPanel.Size = new Size(685, 283); FFormPanel.TabIndex = 3; FFormPanel.Dock = DockStyle.Fill; _dockContentFormPanel = new DockContent(); _dockContentFormPanel.HideOnClose = true; _dockContentFormPanel.Controls.Add(FFormPanel); _dockContentFormPanel.TabText = "Form - Dataphoria"; _dockContentFormPanel.Text = "Form"; _dockContentFormPanel.ShowHint = DockState.DockBottom; _dockContentFormPanel.Show(FDockPanel); // // FPropertyGrid // FPropertyGrid = new PropertyGrid(); FPropertyGrid.BackColor = SystemColors.Control; FPropertyGrid.CausesValidation = false; FPropertyGrid.CommandsVisibleIfAvailable = true; FPropertyGrid.Cursor = Cursors.HSplit; FPropertyGrid.LargeButtons = false; FPropertyGrid.LineColor = SystemColors.ScrollBar; FPropertyGrid.Location = new Point(1, 21); FPropertyGrid.Name = "FPropertyGrid"; FPropertyGrid.PropertySort = PropertySort.Alphabetical; FPropertyGrid.TabIndex = 2; FPropertyGrid.Text = "Properties of the Currently Selected Node"; FPropertyGrid.ToolbarVisible = false; FPropertyGrid.ViewBackColor = SystemColors.Window; FPropertyGrid.ViewForeColor = SystemColors.WindowText; FPropertyGrid.PropertyValueChanged += NodePropertyGrid_PropertyValueChanged; FPropertyGrid.Dock = DockStyle.Fill; _dockContentPropertyGrid = new DockContent(); _dockContentPropertyGrid.HideOnClose = true; _dockContentPropertyGrid.Controls.Add(FPropertyGrid); _dockContentPropertyGrid.TabText = "Properties"; _dockContentPropertyGrid.Text = "Properties - Dataphoria"; _dockContentPropertyGrid.ShowHint = DockState.DockRight; _dockContentPropertyGrid.Show(FDockPanel); }
void SaveNodeNetworkOk(Window callingWindow) { mNameOfNodeNetwork = ((FileWindow)callingWindow).Results[0]; PropertyGrid<AxisFlippingSettings> axisFlippingSettings = new PropertyGrid<AxisFlippingSettings>(GuiManager.Cursor); axisFlippingSettings.HasCloseButton = false; axisFlippingSettings.Name = "Save Options:"; GuiManager.AddDominantWindow(axisFlippingSettings); axisFlippingSettings.HasCloseButton = true; axisFlippingSettings.SelectedObject = new AxisFlippingSettings(); Button okButton = new Button(GuiManager.Cursor); okButton.Text = "Save"; okButton.ScaleX = 3f; okButton.ScaleY = 2; okButton.Click += SaveNodeNetworkSettingsOk; okButton.Click += RemoveParentWindow; axisFlippingSettings.Closing += GuiManager.RemoveWindow; axisFlippingSettings.AddWindow(okButton); }
public PropertyGridWrapper(PropertyGrid grid) : base(grid) { this.grid = grid; }
public ProviderContext(PropertyGrid grid, PropertyEditor editor = null) { this.parentEditor = editor; this.parentGrid = editor != null ? editor.ParentGrid : grid; }
public abstract Object StateChanged(string SelectedProperty, string newValue, Object ClassInstance, PropertyGrid SelectedPgrid);
/// <summary> /// Initializes new instance of DocCommentAccessibleObject. /// </summary> /// <param name="owningDocComment">The owning DocComment control.</param> /// <param name="parentPropertyGrid">The parent PropertyGrid control.</param> public DocCommentAccessibleObject(DocComment owningDocComment, PropertyGrid parentPropertyGrid) : base(owningDocComment) { _parentPropertyGrid = parentPropertyGrid; }
public override void LaunchDialogue () { //the Type in the collection IList collection = (IList) Value; string displayName = Property.DisplayName; //populate list with existing items ListStore itemStore = new ListStore (typeof (object), typeof (int), typeof (string)); for (int i=0; i<collection.Count; i++) itemStore.AppendValues(collection [i], i, collection [i].ToString ()); #region Building Dialogue TreeView itemTree; PropertyGrid grid; TreeIter previousIter = TreeIter.Zero; //dialogue and buttons Dialog dialog = new Dialog () { Title = displayName + " Editor", Modal = true, AllowGrow = true, AllowShrink = true, }; var toplevel = this.Container.Toplevel as Window; if (toplevel != null) dialog.TransientFor = toplevel; dialog.AddActionWidget (new Button (Stock.Cancel), ResponseType.Cancel); dialog.AddActionWidget (new Button (Stock.Ok), ResponseType.Ok); //three columns for items, sorting, PropGrid HBox hBox = new HBox (); dialog.VBox.PackStart (hBox, true, true, 5); //propGrid at end grid = new PropertyGrid (base.EditorManager) { CurrentObject = null, WidthRequest = 200, ShowHelp = false }; hBox.PackEnd (grid, true, true, 5); //followed by a ButtonBox VBox buttonBox = new VBox (); buttonBox.Spacing = 6; hBox.PackEnd (buttonBox, false, false, 5); //add/remove buttons Button addButton = new Button (new Image (Stock.Add, IconSize.Button)); buttonBox.PackStart (addButton, false, false, 0); if (types [0].IsAbstract) addButton.Sensitive = false; Button removeButton = new Button (new Gtk.Image (Stock.Remove, IconSize.Button)); buttonBox.PackStart (removeButton, false, false, 0); //sorting buttons Button upButton = new Button (new Image (Stock.GoUp, IconSize.Button)); buttonBox.PackStart (upButton, false, false, 0); Button downButton = new Button (new Image (Stock.GoDown, IconSize.Button)); buttonBox.PackStart (downButton, false, false, 0); //Third column has list (TreeView) in a ScrolledWindow ScrolledWindow listScroll = new ScrolledWindow (); listScroll.WidthRequest = 200; listScroll.HeightRequest = 320; hBox.PackStart (listScroll, false, false, 5); itemTree = new TreeView (itemStore); itemTree.Selection.Mode = SelectionMode.Single; itemTree.HeadersVisible = false; listScroll.AddWithViewport (itemTree); //renderers and attribs for TreeView CellRenderer rdr = new CellRendererText (); itemTree.AppendColumn (new TreeViewColumn ("Index", rdr, "text", 1)); rdr = new CellRendererText (); itemTree.AppendColumn (new TreeViewColumn ("Object", rdr, "text", 2)); #endregion #region Events addButton.Clicked += delegate { //create the object object instance = System.Activator.CreateInstance (types[0]); //get existing selection and insert after it TreeIter oldIter, newIter; if (itemTree.Selection.GetSelected (out oldIter)) newIter = itemStore.InsertAfter (oldIter); //or append if no previous selection else newIter = itemStore.Append (); itemStore.SetValue (newIter, 0, instance); //select, set name and update all the indices itemTree.Selection.SelectIter (newIter); UpdateName (itemStore, newIter); UpdateIndices (itemStore); }; removeButton.Clicked += delegate { //get selected iter and the replacement selection TreeIter iter, newSelection; if (!itemTree.Selection.GetSelected (out iter)) return; newSelection = iter; if (!IterPrev (itemStore, ref newSelection)) { newSelection = iter; if (!itemStore.IterNext (ref newSelection)) newSelection = TreeIter.Zero; } //new selection. Zeroing previousIter prevents trying to update name of deleted iter. previousIter = TreeIter.Zero; if (itemStore.IterIsValid (newSelection)) itemTree.Selection.SelectIter (newSelection); //and the removal and index update itemStore.Remove (ref iter); UpdateIndices (itemStore); }; upButton.Clicked += delegate { TreeIter iter, prev; if (!itemTree.Selection.GetSelected (out iter)) return; //get previous iter prev = iter; if (!IterPrev (itemStore, ref prev)) return; //swap the two itemStore.Swap (iter, prev); //swap indices too object prevVal = itemStore.GetValue (prev, 1); object iterVal = itemStore.GetValue (iter, 1); itemStore.SetValue (prev, 1, iterVal); itemStore.SetValue (iter, 1, prevVal); }; downButton.Clicked += delegate { TreeIter iter, next; if (!itemTree.Selection.GetSelected (out iter)) return; //get next iter next = iter; if (!itemStore.IterNext (ref next)) return; //swap the two itemStore.Swap (iter, next); //swap indices too object nextVal = itemStore.GetValue (next, 1); object iterVal = itemStore.GetValue (iter, 1); itemStore.SetValue (next, 1, iterVal); itemStore.SetValue (iter, 1, nextVal); }; itemTree.Selection.Changed += delegate { TreeIter iter; if (!itemTree.Selection.GetSelected (out iter)) { removeButton.Sensitive = false; return; } removeButton.Sensitive = true; //update grid object obj = itemStore.GetValue (iter, 0); grid.CurrentObject = obj; //update previously selected iter's name UpdateName (itemStore, previousIter); //update current selection so we can update //name next selection change previousIter = iter; }; grid.Changed += delegate { TreeIter iter; if (itemTree.Selection.GetSelected (out iter)) UpdateName (itemStore, iter); }; TreeIter selectionIter; removeButton.Sensitive = itemTree.Selection.GetSelected (out selectionIter); dialog.ShowAll (); grid.ShowToolbar = false; #endregion //if 'OK' put items back in collection //if (MonoDevelop.Ide.MessageService.ShowCustomDialog (dialog, toplevel) == (int)ResponseType.Ok) { DesignerTransaction tran = CreateTransaction (Instance); object old = collection; try { collection.Clear(); foreach (object[] o in itemStore) collection.Add (o[0]); EndTransaction (Instance, tran, old, collection, true); } catch { EndTransaction (Instance, tran, old, collection, false); throw; } } }
public abstract Object FillPropertyGridFromState(Object ClassInstance, PropertyGrid SelectedPgrid);
public PropertyUpDownFeel(PropertyGrid grid, bool editable) : base(grid) { _editable = editable; }
public abstract Object CreateInsertCommandScript(PropertyGrid SelectedPgrid, string ProjectName, string TransactionName, int ExtensionStateNumber);
public override void SetPropertyGrid(PropertyGrid pg) { _externalPropertyGrid = pg; }
/// <summary> /// Initialize a new instance of the KryptonBreadCrumbItemsForm class. /// </summary> public KryptonBreadCrumbItemsForm(KryptonBreadCrumbItemsEditor editor) : base(editor) { _editor = editor; this.buttonOK = new System.Windows.Forms.Button(); this.treeView1 = new System.Windows.Forms.TreeView(); this.buttonMoveUp = new System.Windows.Forms.Button(); this.buttonMoveDown = new System.Windows.Forms.Button(); this.buttonAddItem = new System.Windows.Forms.Button(); this.buttonDelete = new System.Windows.Forms.Button(); this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.buttonAddChild = new System.Windows.Forms.Button(); this.SuspendLayout(); // // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.buttonOK.Location = new System.Drawing.Point(547, 382); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(75, 23); this.buttonOK.TabIndex = 8; this.buttonOK.Text = "OK"; this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); // // treeView1 // this.treeView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.treeView1.Location = new System.Drawing.Point(12, 32); this.treeView1.Name = "treeView1"; this.treeView1.Size = new System.Drawing.Size(254, 339); this.treeView1.TabIndex = 1; this.treeView1.HideSelection = false; this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect); // // buttonMoveUp // this.buttonMoveUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonMoveUp.Image = ComponentFactory.Krypton.Design.Properties.Resources.arrow_up_blue; this.buttonMoveUp.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonMoveUp.Location = new System.Drawing.Point(272, 32); this.buttonMoveUp.Name = "buttonMoveUp"; this.buttonMoveUp.Size = new System.Drawing.Size(95, 28); this.buttonMoveUp.TabIndex = 2; this.buttonMoveUp.Text = "Move Up"; this.buttonMoveUp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonMoveUp.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.buttonMoveUp.UseVisualStyleBackColor = true; this.buttonMoveUp.Click += new System.EventHandler(this.buttonMoveUp_Click); // // buttonMoveDown // this.buttonMoveDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonMoveDown.Image = ComponentFactory.Krypton.Design.Properties.Resources.arrow_down_blue; this.buttonMoveDown.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonMoveDown.Location = new System.Drawing.Point(272, 66); this.buttonMoveDown.Name = "buttonMoveDown"; this.buttonMoveDown.Size = new System.Drawing.Size(95, 28); this.buttonMoveDown.TabIndex = 3; this.buttonMoveDown.Text = "Move Down"; this.buttonMoveDown.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonMoveDown.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.buttonMoveDown.UseVisualStyleBackColor = true; this.buttonMoveDown.Click += new System.EventHandler(this.buttonMoveDown_Click); // // buttonAddItem // this.buttonAddItem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonAddItem.Image = ComponentFactory.Krypton.Design.Properties.Resources.add; this.buttonAddItem.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonAddItem.Location = new System.Drawing.Point(272, 112); this.buttonAddItem.Name = "buttonAddItem"; this.buttonAddItem.Size = new System.Drawing.Size(95, 28); this.buttonAddItem.TabIndex = 4; this.buttonAddItem.Text = "Add Sibling"; this.buttonAddItem.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonAddItem.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.buttonAddItem.UseVisualStyleBackColor = true; this.buttonAddItem.Click += new System.EventHandler(this.buttonAddSibling_Click); // // buttonDelete // this.buttonDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonDelete.Image = ComponentFactory.Krypton.Design.Properties.Resources.delete2; this.buttonDelete.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonDelete.Location = new System.Drawing.Point(272, 190); this.buttonDelete.Name = "buttonDelete"; this.buttonDelete.Size = new System.Drawing.Size(95, 28); this.buttonDelete.TabIndex = 5; this.buttonDelete.Text = "Delete Item"; this.buttonDelete.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonDelete.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.buttonDelete.UseVisualStyleBackColor = true; this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click); // // propertyGrid1 // this.propertyGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.propertyGrid1.HelpVisible = false; this.propertyGrid1.Location = new System.Drawing.Point(373, 32); this.propertyGrid1.Name = "propertyGrid1"; this.propertyGrid1.Size = new System.Drawing.Size(249, 339); this.propertyGrid1.TabIndex = 7; this.propertyGrid1.ToolbarVisible = false; // // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(370, 13); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(81, 13); this.label1.TabIndex = 6; this.label1.Text = "Item Properties"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(12, 13); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(142, 13); this.label2.TabIndex = 0; this.label2.Text = "BreadCrumbItems Collection"; // // buttonAddChild // this.buttonAddChild.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonAddChild.Image = ComponentFactory.Krypton.Design.Properties.Resources.add; this.buttonAddChild.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonAddChild.Location = new System.Drawing.Point(272, 146); this.buttonAddChild.Name = "buttonAddChild"; this.buttonAddChild.Size = new System.Drawing.Size(95, 28); this.buttonAddChild.TabIndex = 9; this.buttonAddChild.Text = "Add Child"; this.buttonAddChild.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonAddChild.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.buttonAddChild.UseVisualStyleBackColor = true; this.buttonAddChild.Click += new System.EventHandler(this.buttonAddChild_Click); // // KryptonBreadCrumbCollectionForm // this.AcceptButton = this.buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(634, 414); this.ControlBox = false; this.Controls.Add(this.buttonAddChild); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Controls.Add(this.propertyGrid1); this.Controls.Add(this.buttonDelete); this.Controls.Add(this.buttonAddItem); this.Controls.Add(this.buttonMoveDown); this.Controls.Add(this.buttonMoveUp); this.Controls.Add(this.treeView1); this.Controls.Add(this.buttonOK); this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MinimumSize = new System.Drawing.Size(501, 296); this.Name = "KryptonBreadCrumbCollectionForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "BreadCrumbItem Collection Editor"; this.ResumeLayout(false); this.PerformLayout(); }
void button_Click(object sender, RoutedEventArgs e) { Button btn = (Button)sender; StateNumberSelection StateSelectionPopup = new StateNumberSelection(designerCanvas.avaliableStateNumberList, btn.Content.ToString(), designerCanvas.CurrentBrandId , designerCanvas.TransactionList); StateSelectionPopup.ShowDialog(); var Selection = designerCanvas.SelectionService.CurrentSelection; ViewModelDesignerItem Ditem = new ViewModelDesignerItem(); foreach (var slc in Selection) { Ditem = (ViewModelDesignerItem)slc; } DockPanel Sourcepnl = (DockPanel)Ditem.Content; //StateNumber deðiþmememiþ if (btn.Content.ToString() == StateSelectionPopup.StateNumber) { return; } //State number ve baðlantýlý yerlerde gerekli güncellemeler string ExStateId = btn.Content.ToString(); string NewStateId = StateSelectionPopup.StateNumber; PropertyGrid SelectedPgrid = designerCanvas.TransactionList.FindAll(x => x.TransactionName == designerCanvas.CurrentTransactionName).Find(x => x.Id == ExStateId).PropertyGrid; Object state = (Object)SelectedPgrid.SelectedObject; if (state != null) { btn.Content = NewStateId; string SelectedProperty = btn.Name.ToString(); string SelectedPropertyValue = NewStateId; //state güncellemesi SelectedPgrid.SelectedObject.GetType().GetProperty("StateNumber").SetValue(SelectedPgrid.SelectedObject, SelectedPropertyValue); SelectedPgrid.SelectedObjectName = SelectedPropertyValue; designerCanvas.TransactionList.FindAll(x => x.TransactionName == designerCanvas.CurrentTransactionName) .Find(x => x.Id == ExStateId).PropertyGrid = SelectedPgrid; designerCanvas.TransactionList.FindAll(x => x.TransactionName == designerCanvas.CurrentTransactionName) .Find(x => x.Id == ExStateId).Id = SelectedPropertyValue; Sourcepnl.Uid = SelectedPropertyValue; Ditem.Content = Sourcepnl; designerCanvas.avaliableStateNumberList.Remove(SelectedPropertyValue); //parent State Güncellemesi List <ModelParentStateObject> PStateList = new List <ModelParentStateObject>(); PStateList = designerCanvas.TransactionList.FindAll(x => x.TransactionName == designerCanvas.CurrentTransactionName).Find(x => x.Id == SelectedPropertyValue).ParentStateList; if (PStateList.Count != 0) { for (int i = 0; i < PStateList.Count; i++) { SelectedPgrid = designerCanvas.TransactionList.Find(x => x.Id == PStateList[i].ParentId).PropertyGrid; SelectedPgrid.SelectedObject.GetType().GetProperty(PStateList[i].PropertyName).SetValue(SelectedPgrid.SelectedObject, SelectedPropertyValue); designerCanvas.TransactionList.Find(x => x.Id == PStateList[i].ParentId).PropertyGrid.SelectedObject = SelectedPgrid.SelectedObject; } } } else { } }
public PropertyGridProvider(PropertyGrid propertyGrid) : base(propertyGrid) { }
public CategoryGridEntry (PropertyGrid owner, string category, GridEntry parent) : base (owner, parent) { label = category; }
private void InitializeComponent() { // Configure dialog Text = "Debug Rhubarb"; Size = new Size(600, 400); Font = new Font(Font.FontFamily, 10); // Add property grid PropertyGrid propertyGrid1 = new PropertyGrid(); propertyGrid1.SelectedObject = config; Controls.Add(propertyGrid1); propertyGrid1.Dock = DockStyle.Fill; // Add button panel FlowLayoutPanel buttonPanel = new FlowLayoutPanel(); buttonPanel.FlowDirection = FlowDirection.RightToLeft; buttonPanel.AutoSize = true; buttonPanel.Dock = DockStyle.Bottom; Controls.Add(buttonPanel); // Add Cancel button Button cancelButton1 = new Button(); cancelButton1.Text = "Cancel"; cancelButton1.DialogResult = DialogResult.Cancel; buttonPanel.Controls.Add(cancelButton1); CancelButton = cancelButton1; // Add OK button Button okButton1 = new Button(); okButton1.Text = "OK"; okButton1.Click += OkButtonClickedHandler; buttonPanel.Controls.Add(okButton1); AcceptButton = okButton1; }
public static void OnEditorSelectorSelectionChanged(PropertyGrid parentGrid, string childPropertyGridName, object sender, SelectionChangedEventArgs e) { if (childPropertyGridName == null) throw new ArgumentNullException("childPropertyGridName"); if (e.AddedItems.Count > 0) { FrameworkElement obj = sender as FrameworkElement; if (obj != null) { Window window = obj.GetSelfOrParent<Window>(); if (window != null) { PropertyGrid pg = LogicalTreeHelper.FindLogicalNode(window, childPropertyGridName) as PropertyGrid; if (pg != null) { if (parentGrid != null) { pg.DefaultCategoryName = parentGrid.DefaultCategoryName; //pg.IsReadOnly = parentGrid.IsReadOnly; } pg.SelectedObject = e.AddedItems[0]; } } } } }
public DescriptionControl(PropertyGrid propertyGrid) { m_propertyGrid = propertyGrid; m_textBrush = new SolidBrush(SystemColors.WindowText); CreateBoldFont(); ReadOnly = true; // The method of inserting hyperlinks below will not work if DetectUrls is true // because editing RichTextBox's text adjacent to the hyperlink will break the // hyperlink. DetectUrls = false; }
public RootGridEntry (PropertyGrid owner, object[] obj) : base (owner, null) { if (obj == null || obj.Length == 0) throw new ArgumentNullException ("obj"); val = obj; }