本文整理汇总了C#中System.ComponentModel.Design.ComponentChangedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ComponentChangedEventArgs类的具体用法?C# ComponentChangedEventArgs怎么用?C# ComponentChangedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ComponentChangedEventArgs类属于System.ComponentModel.Design命名空间,在下文中一共展示了ComponentChangedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ComponentChangeSvc_ComponentChanged
private void ComponentChangeSvc_ComponentChanged(object sender, ComponentChangedEventArgs e)
{
if (this.containerSelectorGlyph != null)
{
this.containerSelectorGlyph.UpdateGlyph();
}
}
示例2: ComponentChangeSvc_ComponentChanged
private void ComponentChangeSvc_ComponentChanged(object sender, ComponentChangedEventArgs e)
{
BindingNavigator component = (BindingNavigator) base.Component;
if (((e.Component != null) && (e.Component == component.CountItem)) && ((e.Member != null) && (e.Member.Name == "Text")))
{
component.CountItemFormat = component.CountItem.Text;
}
}
示例3: ComponentChanged
private void ComponentChanged(object sender, ComponentChangedEventArgs e)
{
BindingNavigatorEx component = (BindingNavigatorEx)base.Component;
if (((e.Component != null) && (e.Component == component.CountLabel)) && ((e.Member != null) && (e.Member.Name == "Text")))
{
component.CountLabelFormat = component.CountLabel.Text;
}
}
示例4: OnComponentChanged
private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
{
if (((e.Component == base.Component) && (e.Member != null)) && (e.Member.Name == "Items"))
{
PropertyDescriptor descriptor = TypeDescriptor.GetProperties(base.Component)["Name"];
if (descriptor != null)
{
this.UpdateControlName(descriptor.GetValue(base.Component).ToString());
}
}
}
示例5: OnComponentChanged
private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
{
if (((this.bindingUpdatedByUser && (e.Component == base.Component)) && (e.Member != null)) && ((e.Member.Name == "DataSource") || (e.Member.Name == "DataMember")))
{
this.bindingUpdatedByUser = false;
DataSourceProviderService service = (DataSourceProviderService) this.GetService(typeof(DataSourceProviderService));
if (service != null)
{
service.NotifyDataSourceComponentAdded(base.Component);
}
}
}
示例6: OnComponentChanged
public override void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
{
base.OnComponentChanged(sender, new ComponentChangedEventArgs(ce.Component, null, null, null));
}
示例7: OnComponentChanged
void OnComponentChanged (object sender, ComponentChangedEventArgs e)
{
// BaseImageItem item = e.Component as BaseImageItem;
//
// if (item != null) {
// item.ReportFileName = this.loader.ReportModel.ReportSettings.FileName;
// }
bool loading = this.loader != null && this.loader.Loading;
LoggingService.Debug("ReportDesignerView: ComponentChanged: " + (e.Component == null ? "<null>" : e.Component.ToString()) + ", Member=" + (e.Member == null ? "<null>" : e.Member.Name) + ", OldValue=" + (e.OldValue == null ? "<null>" : e.OldValue.ToString()) + ", NewValue=" + (e.NewValue == null ? "<null>" : e.NewValue.ToString()) + "; Loading=" + loading + "; Unloading=" + this.unloading);
if (!loading && !unloading) {
this.MakeDirty();
}
// MergeFormChanges();
}
示例8: OnComponentChanged
private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
{
if (e.Component != null && (e.OldValue is ActivityBind && !(e.NewValue is ActivityBind)) ||
(!(e.OldValue is ActivityBind) && e.NewValue is ActivityBind))
TypeDescriptor.Refresh(e.Component);
IReferenceService referenceService = GetService(typeof(IReferenceService)) as IReferenceService;
Activity changedActivity = (referenceService != null) ? referenceService.GetComponent(e.Component) as Activity : e.Component as Activity;
if (changedActivity != null)
{
ActivityDesigner designer = ActivityDesigner.GetDesigner(changedActivity);
if (designer != null)
designer.OnActivityChanged(new ActivityChangedEventArgs(changedActivity, e.Member, e.OldValue, e.NewValue));
}
}
示例9: OnComponentChanged
public override void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
{
base.OnComponentChanged(sender, ce);
MemberDescriptor member = ce.Member;
if ((member != null) && member.GetType().FullName.Equals("System.ComponentModel.ReflectPropertyDescriptor"))
{
PropertyDescriptor descriptor2 = (PropertyDescriptor) member;
if (descriptor2.Name.Equals("Text"))
{
this._textControl.Controls.Clear();
}
}
}
示例10: OnComponentChanged
public void OnComponentChanged(object component, MemberDescriptor member, object oldValue, object newValue)
{
if (ComponentChanged != null)
{
ComponentChangedEventArgs ce = new ComponentChangedEventArgs(component, member, oldValue, newValue);
try
{
ComponentChanged(this, ce);
}
catch{}
}
}
示例11: OnComponentChanged
private void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
{
this.dirty = true;
this.unsaved = true;
}
示例12: OnComponentChanged
private void OnComponentChanged(object sender, ComponentChangedEventArgs e)
{
Control component = e.Component as Control;
if ((component != null) && component.IsHandleCreated)
{
System.Design.UnsafeNativeMethods.NotifyWinEvent(0x800b, new HandleRef(component, component.Handle), -4, 0);
if (this.frame.Focused)
{
System.Design.UnsafeNativeMethods.NotifyWinEvent(0x8005, new HandleRef(component, component.Handle), -4, 0);
}
}
}
示例13: OnComponentChanged
public override void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
{
PropertyDescriptor member = ce.Member as PropertyDescriptor;
string key = null;
object propertyValue = null;
object component = ce.Component;
base.OnComponentChanged(sender, ce);
if ((this.ActiveDeviceFilter != null) && (this._overridenValues[this.ActiveDeviceFilter] == null))
{
this._overridenValues[this.ActiveDeviceFilter] = new Hashtable();
}
if (member != null)
{
if (member.Converter is ExpandableObjectConverter)
{
Utils.ChangedSubProperty property = Utils.FindChangedSubProperty(string.Empty, this._mobileControl, member, (this.ActiveDeviceFilter != null) ? ((Hashtable) this._overridenValues[this.ActiveDeviceFilter]) : null, this._defaultValues);
component = property.parentObject;
member = property.propertyDescriptor;
key = property.propertyName;
propertyValue = property.propertyValue;
}
else
{
key = ce.Member.Name;
propertyValue = ce.NewValue;
}
if (!this._isResetting)
{
if ((this.ActiveDeviceFilter != null) && this._deviceSpecificSelectionProvider.DeviceSpecificSelectionProviderEnabled)
{
IAttributeAccessor currentChoice = this.CurrentChoice;
base.IsDirty = true;
if (currentChoice != null)
{
currentChoice.SetAttribute(key, member.Converter.ConvertToInvariantString(propertyValue));
((Hashtable) this._overridenValues[this.ActiveDeviceFilter])[key] = propertyValue;
}
if (propertyValue.Equals(Utils.GetDefaultAttributeValue(member)))
{
IDictionary dictionary = this.CurrentChoice.get_Contents();
dictionary.Remove(key);
((Hashtable) this._overridenValues[this.ActiveDeviceFilter]).Remove(key);
if (((Hashtable) this._overridenValues[this.ActiveDeviceFilter]).Count == 0)
{
this._overridenValues.Remove(this.ActiveDeviceFilter);
}
if (dictionary.Count == 0)
{
this._mobileControl.get_DeviceSpecific().get_Choices().Remove(this.CurrentChoice);
if (this._mobileControl.get_DeviceSpecific().get_Choices().get_Count() == 0)
{
this._mobileControl.set_DeviceSpecific(null);
}
else
{
Utils.SetDeviceSpecificChoice(this._mobileControl, null);
}
}
this._isResetting = true;
member.SetValue(component, this._defaultValues[key]);
this._isResetting = false;
}
}
else
{
this._defaultValues[key] = propertyValue;
}
}
}
}
示例14: componentChanged
private void componentChanged(object sender, ComponentChangedEventArgs e)
{
if ((e.Component is ListBoxItem) && this.selectedColumns.Items.Contains(e.Component))
{
this.formIsDirty = true;
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:DataGridViewColumnCollectionDialog.cs
示例15: OnComponentRemoving
/*
private void OnComponentRemoving (object sender, ComponentEventArgs ce)
// System.Console.WriteLine("RootDesigner:OnComponentRemoving {0}",ce.Component.ToString());
}
private void OnComponentRemoved (object sender, ComponentEventArgs ce)
{
// System.Console.WriteLine("RootDesigner:OnComponentRemoved {0}",ce.Component.ToString());
}
*/
private void OnComponentChanged(object sender, ComponentChangedEventArgs ce)
{
System.Console.WriteLine("RootDesigner:OnComponentChanged {0} from {1} to {2}",ce.Component.ToString(),ce.OldValue,ce.NewValue);
// MemberDescriptor m = ce.Member;
if (ce.Member.Name == "Name") {
AbstractItem item = ce.Component as AbstractItem;
if (item != null) {
item.Name = ce.NewValue.ToString();
}
}
BaseSection section = ce.Component as BaseSection;
if (section != null) {
foreach (BaseSection s in sections)
{
if (s.Name == section.Name) {
s.Size = section.Size;
}
}
RecalculateSections();
}
}