protected override void Initialize(object navigationData) { base.Initialize(navigationData); var service = (IConfigurationService)GetService(typeof(IConfigurationService)); pictureBox1.Image = service.Scope.GetImage(); var ip = new IpMappingFeature(Module); ip.HttpApiSettingsUpdate = RefreshIp; ip.Load(); tpIP.Tag = ip; RefreshIp(); var sni = new SniMappingFeature(Module); sni.HttpApiSettingsUpdate = RefreshSni; sni.Load(); tpSNI.Tag = sni; var url = new ReservedUrlsFeature(Module); url.HttpApiSettingsUpdate = RefreshUrl; url.Load(); tpURL.Tag = url; }
public NewReservedUrlDialog(IServiceProvider serviceProvider, ReservedUrlsFeature feature) : base(serviceProvider) { InitializeComponent(); var container = new CompositeDisposable(); FormClosed += (sender, args) => container.Dispose(); container.Add( Observable.FromEventPattern <EventArgs>(txtAddress, "TextChanged") .Sample(TimeSpan.FromSeconds(0.5)) .ObserveOn(System.Threading.SynchronizationContext.Current) .Subscribe(evt => { btnOK.Enabled = txtAddress.Text.Length > 0; })); container.Add( Observable.FromEventPattern <EventArgs>(btnOK, "Click") .ObserveOn(System.Threading.SynchronizationContext.Current) .Subscribe(evt => { Item = new ReservedUrlsItem(txtAddress.Text, "D:(A;;GX;;;WD)", feature); if (feature.Items.Any(item => item.Match(Item))) { ShowMessage( "A URL reservation already exists.", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); return; } DialogResult = DialogResult.OK; })); container.Add( Observable.FromEventPattern <CancelEventArgs>(this, "HelpButtonClicked") .ObserveOn(System.Threading.SynchronizationContext.Current) .Subscribe(EnvironmentVariableTarget => { feature.ShowHelp(); })); }
public FeatureTaskList(ReservedUrlsFeature owner) { _owner = owner; }
public ReservedUrlsItem(string urlPrefix, string securityDescriptor, ReservedUrlsFeature feature) { SecurityDescriptor = securityDescriptor; UrlPrefix = urlPrefix; Feature = feature; }