private void linkLabel_LeftClicked(object sender, LabelClickedEventArgs e) { foreach (PropertyDescriptor propertyDescriptor in PropertyGridUtilities.GetPropertyDescriptors(this._propertyItem.Instance)) { if (propertyDescriptor.Name == this._displayName) { using (CompositeTask.Run(this._propertyItem.DiaplayName)) propertyDescriptor.ResetValue(this._propertyItem.Instance); this.ScenceSetValue(); IPlayControl instance = this._propertyItem.Instance as IPlayControl; if (instance == null) { break; } instance.Start(); break; } } }
private void linkLabel_LeftClicked(object sender, LabelClickedEventArgs e) { PropertyDescriptorCollection propertyDescriptors = PropertyGridUtilities.GetPropertyDescriptors(this._propertyItem.Instance); foreach (PropertyDescriptor propertyDescriptor in propertyDescriptors) { if (propertyDescriptor.Name == this._displayName) { using (CompositeTask.Run(this._propertyItem.DiaplayName)) { propertyDescriptor.ResetValue(this._propertyItem.Instance); } this.ScenceSetValue(); IPlayControl playControl = this._propertyItem.Instance as IPlayControl; if (playControl != null) { playControl.Start(); } break; } } }