public void AddManaged()
        {
            using var dialog = new NewHandlerDialog(Module, null, this);
            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            AddItem(dialog.Item);
        }
Exemple #2
0
        public void Edit()
        {
            HandlersItem newItem;

            if (!string.IsNullOrWhiteSpace(SelectedItem.Type))
            {
                var dialog = new NewHandlerDialog(this.Module, this.SelectedItem, this);
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                newItem = dialog.Item;
            }
            else if (SelectedItem.Modules == "IsapiModule" && !string.IsNullOrWhiteSpace(SelectedItem.ScriptProcessor))
            {
                var dialog = new NewScriptMapDialog(this.Module, this.SelectedItem, this);
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                newItem = dialog.Item;
            }
            else
            {
                var dialog = new NewMappingDialog(this.Module, this.SelectedItem, this);
                if (dialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                newItem = dialog.Item;
            }

            this.EditItem(newItem);
        }