本文整理汇总了C#中System.Windows.Forms.PropertyGrid类的典型用法代码示例。如果您正苦于以下问题:C# PropertyGrid类的具体用法?C# PropertyGrid怎么用?C# PropertyGrid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyGrid类属于System.Windows.Forms命名空间,在下文中一共展示了PropertyGrid类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: PropertyValueChanged
public void PropertyValueChanged(PropertyValueChangedEventArgs e, PropertyGrid mPropertyGrid)
{
UnreferencedFilesManager.Self.ProcessRefreshOfUnreferencedFiles();
#region Check for Errors
if (mPropertyGrid == null)
{
System.Windows.Forms.MessageBox.Show("There has been an internal error in Glue related to updating the PropertyGrid. This likely happens if there has been an earlier error in Glue. You should probably restart Glue.");
MainGlueWindow.Self.HasErrorOccurred = true;
}
#endregion
string changedMember = e.ChangedItem.PropertyDescriptor.Name;
object oldValue = e.OldValue;
string variableName = e.ChangedItem.Label;
string parentGridItemName = null;
if (e.ChangedItem != null && e.ChangedItem.Parent != null)
{
parentGridItemName = e.ChangedItem.Parent.Label;
}
ReactToPropertyChanged(changedMember, oldValue, variableName, parentGridItemName);
}
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:25,代码来源:SetVariableLogic.cs
示例2: AttachRefresherEventHandler
/// <summary>
/// Attaches the <see cref="RefresherEventHandler"/> to a <see cref="PropertyGrid"/>.
/// </summary>
/// <param name="pg">The <see cref="PropertyGrid"/> to attach the event to.</param>
public static void AttachRefresherEventHandler(PropertyGrid pg)
{
if (pg == null)
return;
pg.SelectedGridItemChanged += RefresherEventHandler;
}
开发者ID:mateuscezar,项目名称:netgore,代码行数:11,代码来源:PropertyGridHelper.cs
示例3: DashboardGroupNameDialog
public DashboardGroupNameDialog(PropertyGrid sourceGrid, DashboardPropertyGroup group)
{
m_sourceGrid = sourceGrid;
m_group = @group;
InitializeComponent();
groupNameText.Text = group.PropertyName;
}
开发者ID:Soucha,项目名称:BrainSimulator,代码行数:7,代码来源:DashboardGroupNameDialog.cs
示例4: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.grid = new System.Windows.Forms.PropertyGrid();
this.splitter1 = new System.Windows.Forms.Splitter();
this.tboxElementHtml = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// grid
//
this.grid.BackColor = System.Drawing.SystemColors.Control;
this.grid.CommandsVisibleIfAvailable = true;
this.grid.Dock = System.Windows.Forms.DockStyle.Right;
this.grid.HelpVisible = false;
this.grid.LargeButtons = false;
this.grid.LineColor = System.Drawing.SystemColors.ScrollBar;
this.grid.Location = new System.Drawing.Point(376, 0);
this.grid.Name = "grid";
this.grid.PropertySort = System.Windows.Forms.PropertySort.Categorized;
this.grid.Size = new System.Drawing.Size(232, 310);
this.grid.TabIndex = 0;
this.grid.Text = "propertyGrid1";
this.grid.ViewBackColor = System.Drawing.Color.White;
this.grid.ViewForeColor = System.Drawing.SystemColors.WindowText;
//
// splitter1
//
this.splitter1.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter1.Location = new System.Drawing.Point(373, 0);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(3, 310);
this.splitter1.TabIndex = 1;
this.splitter1.TabStop = false;
//
// tboxElementHtml
//
this.tboxElementHtml.BackColor = System.Drawing.Color.White;
this.tboxElementHtml.Dock = System.Windows.Forms.DockStyle.Fill;
this.tboxElementHtml.Location = new System.Drawing.Point(0, 0);
this.tboxElementHtml.Multiline = true;
this.tboxElementHtml.Name = "tboxElementHtml";
this.tboxElementHtml.ReadOnly = true;
this.tboxElementHtml.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tboxElementHtml.Size = new System.Drawing.Size(373, 310);
this.tboxElementHtml.TabIndex = 2;
this.tboxElementHtml.Text = "";
//
// ElementProperties
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(608, 310);
this.Controls.Add(this.tboxElementHtml);
this.Controls.Add(this.splitter1);
this.Controls.Add(this.grid);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Name = "ElementProperties";
this.Text = "Element Properties";
this.Resize += new System.EventHandler(this.ElementProperties_Resize);
this.ResumeLayout(false);
}
开发者ID:ctsyolin,项目名称:ieunit,代码行数:64,代码来源:ElementProperties.cs
示例5: InitializeComponent
private void InitializeComponent()
{
this.groupBox1 = new GroupBox();
this.propertyGrid = new PropertyGrid();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
this.groupBox1.Controls.Add((Control) this.propertyGrid);
this.groupBox1.Location = new Point(16, 16);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new Size(368, 328);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Settings";
this.propertyGrid.Dock = DockStyle.Fill;
this.propertyGrid.HelpVisible = false;
this.propertyGrid.Location = new Point(3, 16);
this.propertyGrid.Name = "propertyGrid";
this.propertyGrid.Size = new Size(362, 309);
this.propertyGrid.TabIndex = 0;
this.propertyGrid.ToolbarVisible = false;
this.propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(this.propertyGrid_PropertyValueChanged);
this.AutoScaleDimensions = new SizeF(6f, 13f);
this.Controls.Add((Control) this.groupBox1);
this.Name = "EditorOptionsPanel";
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
开发者ID:smther,项目名称:FreeOQ,代码行数:27,代码来源:EditorOptionsPanel.cs
示例6: Show
/// <summary>
/// Shows a dialog box with a property grid.
/// </summary>
/// <param name="title"></param>
/// <param name="value"></param>
/// <returns></returns>
public static DialogResult Show(string title, ref Entity_cl value)
{
Form mForm = new Form();
PropertyGrid mPropertyGrid = new PropertyGrid();
Button mOKButton = new Button();
mForm.Text = title + " Properties";
mPropertyGrid.SelectedObject = value;
mOKButton.Text = "OK";
mOKButton.DialogResult = DialogResult.OK;
mForm.ClientSize = new Size(320, 320);
mPropertyGrid.SetBounds(4, 4, mForm.ClientSize.Width - 4, mForm.ClientSize.Height - 40);
mOKButton.SetBounds(mForm.ClientSize.Width / 2 - 32, mForm.ClientSize.Height - 36, 64, 22);
mPropertyGrid.Anchor = AnchorStyles.Top;
mOKButton.Anchor = AnchorStyles.Bottom;
mForm.Controls.AddRange(new Control[] { mPropertyGrid, mOKButton });
mForm.FormBorderStyle = FormBorderStyle.FixedSingle;
mForm.StartPosition = FormStartPosition.CenterScreen;
mForm.MinimizeBox = false;
mForm.MaximizeBox = false;
mForm.AcceptButton = mOKButton;
DialogResult dialogResult = mForm.ShowDialog();
return dialogResult;
}
开发者ID:dogmahtagram,项目名称:Finale,代码行数:34,代码来源:PropertyDialog.cs
示例7: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.SuspendLayout();
//
// propertyGrid1
//
this.propertyGrid1.CommandsVisibleIfAvailable = true;
this.propertyGrid1.LargeButtons = false;
this.propertyGrid1.LineColor = System.Drawing.SystemColors.ScrollBar;
this.propertyGrid1.Location = new System.Drawing.Point(8, 12);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.Size = new System.Drawing.Size(384, 200);
this.propertyGrid1.TabIndex = 0;
this.propertyGrid1.Text = "propertyGrid1";
this.propertyGrid1.ViewBackColor = System.Drawing.SystemColors.Window;
this.propertyGrid1.ViewForeColor = System.Drawing.SystemColors.WindowText;
//
// frmSample31
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(400, 241);
this.Controls.Add(this.propertyGrid1);
this.Name = "frmSample31";
this.Text = "Application settings";
this.ResumeLayout(false);
}
开发者ID:wsrf2009,项目名称:KnxUiEditor,代码行数:32,代码来源:frmSample31.cs
示例8: GridEntry
// Cannot use one PropertyDescriptor for all owners, because the
// propertydescriptors might have different Invokees. Check
// ReflectionPropertyDescriptor.GetInvokee and how it's used.
//
public GridEntry (PropertyGrid propertyGrid, PropertyDescriptor[] properties,
GridEntry parent) : this (propertyGrid, parent)
{
if (properties == null || properties.Length == 0)
throw new ArgumentNullException ("prop_desc");
property_descriptors = properties;
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:11,代码来源:GridEntry.cs
示例9: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.prpg = new System.Windows.Forms.PropertyGrid();
this.SuspendLayout();
//
// prpg
//
this.prpg.CommandsVisibleIfAvailable = true;
this.prpg.Dock = System.Windows.Forms.DockStyle.Fill;
this.prpg.LargeButtons = false;
this.prpg.LineColor = System.Drawing.SystemColors.ScrollBar;
this.prpg.Name = "prpg";
this.prpg.Size = new System.Drawing.Size(280, 429);
this.prpg.TabIndex = 0;
this.prpg.Text = "propertyGrid1";
this.prpg.ViewBackColor = System.Drawing.SystemColors.Window;
this.prpg.ViewForeColor = System.Drawing.SystemColors.WindowText;
//
// PropertyInspector
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(280, 429);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.prpg});
this.Name = "PropertyInspector";
this.Text = "Property Inspector";
this.ResumeLayout(false);
}
开发者ID:RusselRains,项目名称:hostile-takeover,代码行数:32,代码来源:PropertyInspector.cs
示例10: Main
public static void Main(string[] args)
{
var win = new OpenTK.GameWindow (200, 200, GraphicsMode.Default, "", OpenTK.GameWindowFlags.Default);
var form1 = new Form ();
form1.Size = new Size(400, 1000);
PropertyGrid propertyGrid1 = new PropertyGrid ();
propertyGrid1.CommandsVisibleIfAvailable = true;
propertyGrid1.Location = new Point (10, 20);
propertyGrid1.TabIndex = 1;
propertyGrid1.Text = "Property Grid";
propertyGrid1.Dock = DockStyle.Fill;
propertyGrid1.Font = new Font("URW Gothic L", 10.25f, GraphicsUnit.Point);
propertyGrid1.CategoryForeColor = SystemColors.ControlLight;
propertyGrid1.ViewForeColor = SystemColors.ControlText;
propertyGrid1.ViewBackColor = SystemColors.Control;
propertyGrid1.LineColor = SystemColors.ControlLight;
form1.Controls.Add (propertyGrid1);
form1.Show ();
win.RenderFrame += (sender, aaa) => { Application.DoEvents (); };
using(var system = (new System6.System6()).GetInstance (win))
{
//system.PropertyChanged += (sender, e) => propertyGrid1.Refresh();
propertyGrid1.SelectedObject = system;
win.Run ();
}
}
开发者ID:smalld,项目名称:particle_system,代码行数:29,代码来源:Main.cs
示例11: doQuery
public bool doQuery(PropertyGrid grid)
{
input = (Input)grid.SelectedObject; ;
this.res = amz.searchArtistList("anything","anything", input.Query, input.Field);
grid.SelectedObject = this.res;
return (this.res != null);
}
开发者ID:berak,项目名称:cs,代码行数:7,代码来源:ServiceImpl.cs
示例12: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pgSettings = new System.Windows.Forms.PropertyGrid();
this.SuspendLayout();
//
// pgSettings
//
this.pgSettings.Dock = System.Windows.Forms.DockStyle.Fill;
this.pgSettings.LineColor = System.Drawing.SystemColors.ScrollBar;
this.pgSettings.Location = new System.Drawing.Point(0, 0);
this.pgSettings.Name = "pgSettings";
this.pgSettings.Size = new System.Drawing.Size(300, 237);
this.pgSettings.TabIndex = 0;
this.pgSettings.ToolbarVisible = false;
//
// EditSettings
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(300, 237);
this.Controls.Add(this.pgSettings);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.Name = "EditSettings";
this.Opacity = 0.97D;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Edit Settings";
this.ResumeLayout(false);
}
开发者ID:Farouq,项目名称:semclone,代码行数:33,代码来源:EditSettings.cs
示例13: AttachShrinkerEventHandler
/// <summary>
/// Attaches the <see cref="ShrinkerEventHandler"/> to a <see cref="PropertyGrid"/>.
/// </summary>
/// <param name="pg">The <see cref="PropertyGrid"/> to attach the event to.</param>
public static void AttachShrinkerEventHandler(PropertyGrid pg)
{
if (pg == null)
return;
pg.SelectedObjectsChanged += ShrinkerEventHandler;
}
开发者ID:mateuscezar,项目名称:netgore,代码行数:11,代码来源:PropertyGridHelper.cs
示例14: CategoryGridEntry
public CategoryGridEntry(PropertyGrid ownerGrid, GridEntry peParent,string name, GridEntry[] childGridEntries)
: base(ownerGrid, peParent) {
this.name = name;
#if DEBUG
for (int n = 0;n < childGridEntries.Length; n++) {
Debug.Assert(childGridEntries[n] != null, "Null item in category subproperty list");
}
#endif
if (categoryStates == null) {
categoryStates = new Hashtable();
}
lock (categoryStates) {
if (!categoryStates.ContainsKey(name)) {
categoryStates.Add(name, true);
}
}
this.IsExpandable = true;
for (int i = 0; i < childGridEntries.Length; i++) {
childGridEntries[i].ParentGridEntry = this;
}
this.ChildCollection = new GridEntryCollection(this, childGridEntries);
lock (categoryStates) {
this.InternalExpanded = (bool)categoryStates[name];
}
this.SetFlag(GridEntry.FLAG_LABEL_BOLD,true);
}
开发者ID:JianwenSun,项目名称:cc,代码行数:33,代码来源:CategoryGridEntry.cs
示例15: PropertyGridManager
public PropertyGridManager(PropertyGrid propertyGrid, RuntimeOptions runtimeOptions)
{
mRuntimeOptions = runtimeOptions;
propertyGrid.PropertyValueChanged += new PropertyValueChangedEventHandler(OnPropertyValueChanged);
mNosDisplayer.DisplayMode = NamedObjectPropertyGridDisplayer.DisplayModes.VariablesOnly;
mPropertyGrid = propertyGrid;
}
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:PropertyGridManager.cs
示例16: editEngineconf_Click
private void editEngineconf_Click(object sender, EventArgs e)
{
// Neues Fenster öffnen
Form newWindow = new Form();
newWindow.Size = new System.Drawing.Size(800, 600);
// Property Grid erstellen
PropertyGrid newWin = new PropertyGrid();
newWin.Top = 25;
newWin.Size = new System.Drawing.Size(800, 600);
Button saveButton = new Button();
saveButton.Select();
saveButton.Text = "Speichern";
saveButton.Click += new System.EventHandler(saveButton_Click);
// Füge Property Grid in neues Fenster ein
newWindow.Controls.Add(newWin);
newWindow.Controls.Add(saveButton);
// Wir lesen zuerst die Config Datei ein
// Dateipfad
string path = "../Common/engine.conf";
// Alles in einen string packen
string text = File.ReadAllText(path);
dynamic stuff = JsonConvert.DeserializeObject(text);
Settings conf = new Settings(stuff);
newWin.SelectedObject = conf;
newWindow.Show();
}
开发者ID:gbarnes12,项目名称:skyengine,代码行数:35,代码来源:Form1.cs
示例17: InitializeComponent
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
this.SuspendLayout();
//
// propertyGrid1
//
this.propertyGrid1.CommandsVisibleIfAvailable = true;
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.propertyGrid1.HelpVisible = false;
this.propertyGrid1.LargeButtons = false;
this.propertyGrid1.LineColor = System.Drawing.SystemColors.ScrollBar;
this.propertyGrid1.Location = new System.Drawing.Point(0, 0);
this.propertyGrid1.Name = "propertyGrid1";
this.propertyGrid1.Size = new System.Drawing.Size(168, 104);
this.propertyGrid1.TabIndex = 0;
this.propertyGrid1.Text = "propertyGrid1";
this.propertyGrid1.ViewBackColor = System.Drawing.SystemColors.Window;
this.propertyGrid1.ViewForeColor = System.Drawing.SystemColors.WindowText;
//
// PropertyWindow
//
this.Controls.Add(this.propertyGrid1);
this.Name = "PropertyWindow";
this.Size = new System.Drawing.Size(168, 104);
this.ResumeLayout(false);
}
开发者ID:jeffdik,项目名称:tachy,代码行数:31,代码来源:PropertyWindow.cs
示例18: monitor
public monitor(DynamicNode n)
{
//MessageBox.Show(n.Owner.ToString());
props = n.GetType().GetProperties();
this.Text = "Resource monitor - " + n.ToString();
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
this.ClientSize = new System.Drawing.Size(480, 640);
this.StartPosition = FormStartPosition.Manual;
//this.Location = new Point(this.Parent
// TABS
tc = new TabControl();
tc.Dock = DockStyle.Fill;
tp_props = new TabPage();
tc.Controls.AddRange(new Control[] { tp_props });
// Datagrid for properties
pg_props = new PropertyGrid();
pg_props.SelectedObject = n;
pg_props.Dock = DockStyle.Fill;
tp_props.Controls.Add(pg_props);
t = new Timer();
t.Interval = 100;
t.Tick += delegate(object sender, EventArgs e) { pg_props.Refresh(); };
t.Start();
this.Controls.Add(tc);
}
开发者ID:r-bel,项目名称:glorg2,代码行数:31,代码来源:ResourceMonitor.cs
示例19: InitializeComponent
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.c_DebugPropertyGrid = new System.Windows.Forms.PropertyGrid();
this.c_AutoRefreshProperties = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// c_DebugPropertyGrid
//
this.c_DebugPropertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;
this.c_DebugPropertyGrid.Location = new System.Drawing.Point(0, 0);
this.c_DebugPropertyGrid.Name = "c_DebugPropertyGrid";
this.c_DebugPropertyGrid.Size = new System.Drawing.Size(284, 262);
this.c_DebugPropertyGrid.TabIndex = 0;
//
// c_AutoRefreshProperties
//
this.c_AutoRefreshProperties.Enabled = true;
this.c_AutoRefreshProperties.Tick += new System.EventHandler(this.c_AutoRefreshProperties_Tick);
//
// DebugWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.ClientSize = new System.Drawing.Size(284, 262);
this.Controls.Add(this.c_DebugPropertyGrid);
this.Name = "DebugWindow";
this.ResumeLayout(false);
}
开发者ID:hach-que,项目名称:OgmoEditor,代码行数:28,代码来源:DebugWindow.cs
示例20: PrepProperties
internal PrepProperties(PropertyGrid prpGrd)
{
_gh3 = true;
_tierSongs = null;
SetPreset(Presets.FullPrep);
_prpGrd = prpGrd;
}
开发者ID:Nanook,项目名称:TheGHOST,代码行数:7,代码来源:PrepProperties.cs
注:本文中的System.Windows.Forms.PropertyGrid类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论