コード例 #1
0
        public void Dynamic()
        {
            var service = (IConfigurationService)GetService(typeof(IConfigurationService));
            var section = service.GetSection("system.webServer/security/dynamicIpSecurity", null, false);

            using (var dialog = new DynamicDialog(Module, section, this))
            {
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
            }

            service.ServerManager.CommitChanges();
        }
コード例 #2
0
        public void Dynamic()
        {
            var service = (IConfigurationService)GetService(typeof(IConfigurationService));
            var section = service.GetSection("system.webServer/security/dynamicIpSecurity", null, false);

            if (section == null)
            {
                // TODO: display a friendly error message.
                return;
            }

            var dialog = new DynamicDialog(Module, section);

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            service.ServerManager.CommitChanges();
        }