public override void Initialize(IComponent component) { this._mobileControl = (MobileControl) component; base.Initialize(component); IDesignerHost service = (IDesignerHost) this.GetService(typeof(IDesignerHost)); if (service != null) { service.LoadComplete += new EventHandler(this.OnLoadComplete); } this._deviceSpecificSelectionProvider = (IDeviceSpecificSelectionProvider) this.GetService(typeof(IDeviceSpecificSelectionProvider)); }
public override void Initialize(IComponent component) { base.Initialize(component); this._mobileControl = (MobileControl) component; this._defaultValues = new Hashtable(); this._overridenValues = new Hashtable(); this._deviceSpecificSelectionProvider = (IDeviceSpecificSelectionProvider) this.GetService(typeof(IDeviceSpecificSelectionProvider)); this.InitializeDefaultProperties(); this.InitializeOverridenProperties(); if (this._deviceSpecificSelectionProvider != null) { this._deviceSpecificSelectionProvider.SelectionChanged += new EventHandler(this.OnHostDeviceSpecificChanged); this.ActiveDeviceFilter = this._deviceSpecificSelectionProvider.CurrentFilter; if (this._mobileControl.get_DeviceSpecific() != null) { foreach (DeviceSpecificChoice choice in this._mobileControl.get_DeviceSpecific().get_Choices()) { string filterName = Utils.CreateUniqueChoiceName(choice); if (!this._deviceSpecificSelectionProvider.FilterExists(filterName)) { this._deviceSpecificSelectionProvider.AddFilter(filterName); } } } } this.PrepareProperties(); IDesignerHost service = (IDesignerHost) this.GetService(typeof(IDesignerHost)); if (service != null) { service.LoadComplete += new EventHandler(this.OnLoadComplete); } }
public override void Initialize(IComponent component) { base.Initialize(component); this._deviceSpecific = (DeviceSpecific) component; IDesignerHost service = (IDesignerHost) this.GetService(typeof(IDesignerHost)); if (service != null) { service.LoadComplete += new EventHandler(this.OnLoadComplete); } this._deviceSpecificSelectionProvider = (IDeviceSpecificSelectionProvider) this.GetService(typeof(IDeviceSpecificSelectionProvider)); if (this._deviceSpecificSelectionProvider != null) { foreach (DeviceSpecificChoice choice in this._deviceSpecific.get_Choices()) { string filterName = Utils.CreateUniqueChoiceName(choice); if (!this._deviceSpecificSelectionProvider.FilterExists(filterName)) { this._deviceSpecificSelectionProvider.AddFilter(filterName); } } } }