private void propertyGrid1_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { bool enable = propertyGrid1.SelectedGridItem != null && propertyGrid1.SelectedGridItem.GridItemType == GridItemType.Property; this.MakeAbsoluteButton.Enabled = enable; this.MakeRelativeToProjectButton.Enabled = enable; }
private void OnSelectedGridItemChanged(object o, SWF.SelectedGridItemChangedEventArgs args) { if (provider.PropertyGridViewProvider.IsItemSelected(provider)) { RaiseAutomationEvent(); } }
private void OnSelectedGridItemChanged(object o, SWF.SelectedGridItemChangedEventArgs args) { bool selected = provider.PropertyGridViewProvider.IsItemSelected(provider); if (selected != isSelected) { RaiseAutomationPropertyChangedEvent(); } }
private void propertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { _selectedGridItem = e.NewSelection; if (SelectedGridItemChanged != null) { PropertyGrid propertyGrid = sender as PropertyGrid; SelectedGridItemChanged(sender, e); } }
protected override void OnSelectedGridItemChanged(SelectedGridItemChangedEventArgs e) { #region Sanity checks if (e == null) throw new ArgumentNullException(nameof(e)); #endregion _menuReset.Enabled = (e.NewSelection?.PropertyDescriptor != null) && (e.NewSelection.Parent != null) && e.NewSelection.PropertyDescriptor.CanResetValue(e.NewSelection.Parent.Value ?? SelectedObject); base.OnSelectedGridItemChanged(e); }
void _pg_config_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { if (_current != null) { _current.ReleaseInteraction(); _current = null; } Type r = e.NewSelection.PropertyDescriptor.PropertyType; Core.Addins.AddinInfo suitable = _interactors.FirstOrDefault( ai => ai.Attribute<UI.InteractionResultTypeAttribute>().ResultType == r); if (suitable != null) { _current = Core.Addins.AddinStore.CreateInstance(suitable) as UI.I2DInteractor; _current.InteractionCompleted += new EventHandler<Parsley.UI.InteractionEventArgs>(_current_InteractionCompleted); _current.UnscaledSize = _context.Setup.Camera.FrameSize; _current.InteractOn(_context.EmbeddableStream.PictureBox); } }
/// <summary> /// Reacts to any focus change in the <see cref="PropertyGrid"/> and creates backups of the current values before the user can change them. /// </summary> private void SelectionChanged(object sender, SelectedGridItemChangedEventArgs e) { // Only handle property selections if (e.NewSelection == null || e.NewSelection.GridItemType != GridItemType.Property) { _oldValues = null; return; } // Don't handle re-selections triggered by validation failures if (e.OldSelection != null && e.NewSelection.Label == e.OldSelection.Label) return; // Create a new array to hold old values before the user changes them _oldValues = new object[_propertyGrid.SelectedObjects.Length]; string property = MoveOutOfNested(e.NewSelection).PropertyDescriptor.Name; for (int i = 0; i < _propertyGrid.SelectedObjects.Length; i++) { // Use reflection to get the specific property for each object and backup the corresponding old value for each var item = _propertyGrid.SelectedObjects[i]; _oldValues[i] = item.GetType().GetProperty(property).GetValue(item, null); } }
protected internal virtual void OnSelectedGridItemChanged(SelectedGridItemChangedEventArgs e) { if (onSelectedGridItemChanged != null) { onSelectedGridItemChanged(m_ActiveEditObject, e); } }
private void actorPropertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { actorStatisticsViewerControl.Statistics = actor.BaseStatistics; }
protected virtual void OnSelectedGridItemChanged(SelectedGridItemChangedEventArgs e) { throw null; }
private void propertyGrid1_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { string szItemName = e.NewSelection.PropertyDescriptor.Name; if (szItemName.Equals(@"SSH")) { m_btnSSHConfig.Visible = true; } else { m_btnSSHConfig.Visible = false; } }
//Trigger when the player changes a grid item (i.e. a property of the selected item). private void selectedObject_pg_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { PropertyGrid pg = sender as PropertyGrid; if (pg == null) { RefreshAll(); return; } if (pg.SelectedObject == null) { RefreshAll(); return; } Type t = pg.SelectedGridItem.Value.GetType(); if (t != typeof(CustomPropertyDictionary)) { editPropName_txt.Text = pg.SelectedGridItem.Label; String type = pg.SelectedGridItem.Value.GetType().ToString(); String tout = ""; editPropType_cmb.Text = AliasTypes.TryGetValue(type, out tout) ? tout : type; } else { editPropName_txt.Text = ""; editPropType_cmb.Text = ""; } RefreshAll(); }
private void propertyGrid1_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { if (e.NewSelection.Value == null) return; if (e.NewSelection.Value.GetType() == typeof(RenderModelMarkerBlock) && activeObject.HasValue) { manager[activeObject.Value].Select(new[] { e.NewSelection.Value }); } else if (e.NewSelection.Value.GetType() == typeof(RenderModelMarkerGroupBlock) && activeObject.HasValue) { var markerGroup = e.NewSelection.Value as RenderModelMarkerGroupBlock; manager[activeObject.Value].Select(markerGroup.Markers); } }
private void propertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { Patch patch = GetSelectedPatch(); String label = e.NewSelection.Label; int index = label.Length - label.Trim().Length - 1; Unit[] array = label.Trim() != Patch.Keys[Patch.Key.Original] ? label.Trim() != Patch.Keys[Patch.Key.Attach] ? label.Trim() != Patch.Keys[Patch.Key.Patch] ? null : patch.Patched : patch.Attach : patch.Original; if (label.Trim() == Patch.Keys[Patch.Key.Description]) { array = patch.Description; String language = ((String)e.NewSelection.Value).Trim(); if (language != "") for (int i = 0; i < array.Length; i++) if (array[i].Name == language) { index = i; break; } } if ((array != null) && (index >= 0)) { if (array == patch.Original || array == patch.Patched) { splitContainerEditor.Panel1Collapsed = false; String name = GetSelectedPatch().Parent.Split(new Char[] { '\\' })[0].ToLower(); richTextBoxView.Clear(); richTextBoxView.Tag = HexViewerAddress = array[index].Address; if (bAsm.Checked) FillAsmViewer(HexViewerAddress); else FillHexViewer(HexViewerAddress); } else splitContainerEditor.Panel1Collapsed = true; if (label.Trim() == Patch.Keys[Patch.Key.Description]) bHex_Click(null, null); else if (richTextBoxEditor.Tag != array[index]) { if (array[index].Asm.Trim().Length > 0 || array[index].Hex.Trim().Length == 0) bAsm_Click(null, null); else bHex_Click(null, null); } richTextBoxEditor.Tag = null; // before editing richTextBoxEditor.Text = bAsm.Checked ? array[index].Asm : array[index].Hex; richTextBoxEditor.Tag = array[index]; richTextBoxEditor.Enabled = true; if (richTextBoxView.Tag != null) { if (bAsm.Checked) { } else ColourSelect((uint)richTextBoxView.Tag, GetHexLength(richTextBoxEditor.Text)); } return; } DisableEditor(); EnableCutCopyPaste(false); }
private void OnColumnPropertyGridSelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { GridItem newSelection = e.NewSelection; if ((newSelection != null) && (newSelection.PropertyDescriptor != null)) { DescriptionAttribute attribute = (DescriptionAttribute) newSelection.PropertyDescriptor.Attributes[typeof(DescriptionAttribute)]; if (attribute != null) { this._columnPropertyHelpLabel.Text = attribute.Description; } else { this._columnPropertyHelpLabel.Text = string.Empty; } } else { this._columnPropertyHelpLabel.Text = string.Empty; } }
private void propertyGrid1_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { this.textBox1.Text = ConfigTet.Instance.ToString(); }
private void fieldGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { List<CustomizableField> list = new List<CustomizableField>(); list.AddRange(_fieldList); if (!_isAddMode) list.AddRange(_editFieldList); foreach (CustomizableField field in list) { if (field.Name.Equals(fieldGrid.SelectedGridItem.Label)) { checkBoxMandatory.Checked = field.IsMandatory; checkBoxUnique.Checked = field.IsUnique; } } }
private void propertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { if (myProperties.GetPropertyTypeByName(propertyGrid.SelectedGridItem.Label) == typeof(Person)) { groupBoxOwnerDetails.Enabled = true; //MessageBox.Show(myProperties.GetPropertyValueByName(propertyGrid.SelectedGridItem.Label).ToString()); //if (myProperties.GetPropertyValueByName(propertyGrid.SelectedGridItem.Label) != null) //textBoxOwner.Text = ((Person) myProperties.GetPropertyValueByName(propertyGrid.SelectedGridItem.Label)).Name; } else if (myProperties.GetPropertyTypeByName(propertyGrid.SelectedGridItem.Label) == typeof(CollectionType)) { foreach (CollateralProperty property in product.Properties) { if (property.Name == propertyGrid.SelectedGridItem.Label) Collection.Items = property.Collection; } } else { //textBoxOwner.Text = string.Empty; groupBoxOwnerDetails.Enabled = false; } }
private void OnSelectedGridItemChanged(object o, SWF.SelectedGridItemChangedEventArgs args) { RaiseAutomationPropertyChangedEvent(); }
private void propertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { PropertyGridItemSelected(e.NewSelection); }
// SECREVIEW: This seems safe, but could anything dangerous occur here? protected virtual void OnSelectedGridItemChanged(SelectedGridItemChangedEventArgs e) { SelectedGridItemChangedEventHandler handler = (SelectedGridItemChangedEventHandler)Events[EventSelectedGridItemChanged]; if (handler != null) { handler(this, e); } }
protected override void OnSelectedGridItemChanged(SelectedGridItemChangedEventArgs e) { base.OnSelectedGridItemChanged(e); MakeAllTextBoxesReadOnly(this); }
/// <summary> /// Event that is triggered when the selected grid item changed. /// We use this event to change to display a special help text for categories. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void propertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { UpdateHelpPanel(); }
private void propertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { RefreshDashboardButton(); }
private void ObjectGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { this.ContainerPanel.OnSelectedGridItemChanged(e); }
private void propertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { if (propertyController != null && e.NewSelection != null && e.OldSelection != null) { if (e.OldSelection.Equals(e.NewSelection)) return; else { propertyController.CancelSetProperty(); TypeDescriptionProviderDg.PropertyController = propertyController; } } }
private void propertyGrid1_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { if (e.OldSelection != null) { PropertyGrid pg = (PropertyGrid)sender; System.Windows.Forms.Clipboard.SetText(pg.SelectedGridItem.Value.ToString()); } }
private void propertyGrid_Config_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { bHighlightTiles = false; bShowSectorSizeX = bShowSectorSizeY = false; bShowBaseTexture = false; if (e.NewSelection == null) { pictureBox1.Invalidate(); return; } if (e.NewSelection.Label == "TilesPerSectorX" || e.NewSelection.Label == "TilesPerSectorY") bHighlightTiles = true; else if (e.NewSelection.Label == "SectorSizeX") bShowSectorSizeX = true; else if (e.NewSelection.Label == "SectorSizeY") bShowSectorSizeY = true; else if (e.NewSelection.Label == "BaseTextureFile" || e.NewSelection.Label == "BaseTextureTilingX" || e.NewSelection.Label == "BaseTextureTilingY") bShowBaseTexture = true; pictureBox1.Invalidate(); }
private void LayerPropertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { LayersController.Self.UpdatePropertyGridContextMenu(e); }
private void BasePg_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { PropertyGrid pg = (PropertyGrid)sender; if (pg == this.tabControl1.SelectedTab.Tag) { DBCustomClass dbClass = (DBCustomClass)pg.SelectedObject; if (dbClass.ExistLuaFunction("beforeselectpropertychanged")) // 增加获取选择前的GridItem的方法 { GridItem item = e.OldSelection; CustomPropertyDescriptor desc = item == null ? null : (CustomPropertyDescriptor)item.PropertyDescriptor; if (desc != null) { dbClass.CallLuaFunction(desc.Property, "beforeselectpropertychanged", new object[] { desc.Property }); } } if (dbClass.ExistLuaFunction("onselectpropertychanged")) { GridItem item = e.NewSelection; CustomPropertyDescriptor desc = item == null ? null : (CustomPropertyDescriptor)item.PropertyDescriptor; if (desc != null) { dbClass.CallLuaFunction(desc.Property, "onselectpropertychanged", new object[] { desc.Property }); } } //纠正有时onselectrecordchanged事件有时不能收到的问题 //if (pg.SelectedObject != null && e.OldSelection == null)// && pg == tabControl1.SelectedTab.Tag) //{ // dbClass = (DBCustomClass)pg.SelectedObject; // if (dbClass != null)// && dbClass.ExistLuaFunction("onselectrecordchanged")) // { // dbClass.CallLuaFunction("onselectrecordchanged", new object[] { dbClass, tabControl1.SelectedTabIndex }); // } //} } }
private void PropertiesStyle_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { //RaiseChanged(); }
private void myPropertyGrid_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { if (m_collectionEditor != null) { m_collectionEditor.CollectionChanged -= new CustomCollectionEditor.CollectionChangedEventHandler(ValChanged); m_collectionEditor = null; } if (e.NewSelection.Value is IList) { m_collectionEditor = (CustomCollectionEditor)e.NewSelection.PropertyDescriptor.GetEditor(typeof(System.Drawing.Design.UITypeEditor)) as CustomCollectionEditor; if (m_collectionEditor != null) { m_collectionEditor.CollectionChanged += new CustomCollectionEditor.CollectionChangedEventHandler(ValChanged); } } }
private void propertyGrid1_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e) { selectedProperty = GetPropertyGridSelectionName(); if (SelectionChanged != null) SelectionChanged(this, EventArgs.Empty); }
private void pgActionArguments_SelectedGridItemChanged( object sender, SelectedGridItemChangedEventArgs e) { ddlName.SelectedItem = e.NewSelection.Label; }