Ejemplo n.º 1
0
        public void Add()
        {
            using var dialog = new NewMappingDialog(Module, null, this);
            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            AddItem(dialog.Item);
        }
Ejemplo n.º 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);
        }