private void OnClickEditChoicesButton(Object source, EventArgs e) { AppliedDeviceFiltersDialog dialog = new AppliedDeviceFiltersDialog(this, _mergingContext); if (dialog.ShowDialog() == DialogResult.OK) { _designer.UpdateRendering(); FillChoicesComboBox(); FillSchemasComboBox(); SetSchemaValue(); UpdateControlEnabling(); } }
//////////////////////////////////////////////////////////////////////// // Begin Event Handling //////////////////////////////////////////////////////////////////////// private void OnEditFilters(Object sender, EventArgs e) { ISite componentSite = ((IComponent)(_designer.UnderlyingControl)).Site; Debug.Assert(componentSite != null, "Expected the runtime control to be sited."); IComponentChangeService changeService = (IComponentChangeService)componentSite.GetService(typeof(IComponentChangeService)); IMobileWebFormServices wfServices = (IMobileWebFormServices)componentSite.GetService(typeof(IMobileWebFormServices)); DialogResult result = DialogResult.Cancel; try { AppliedDeviceFiltersDialog dialog = new AppliedDeviceFiltersDialog( this, _mergingContext ); result = dialog.ShowDialog(); } finally { if (result != DialogResult.Cancel) { SaveChoices(); SetDirty(false); if (changeService != null) { changeService.OnComponentChanged(_designer.UnderlyingControl, null, null, null); } } } }