public override ICollection GetTaskItems() { var result = new ArrayList(); result.Add(new MethodTaskItem("Explore", "Explore", string.Empty, string.Empty, Resources.explore_16).SetUsage()); result.Add(new MethodTaskItem("Permissions", "Edit Permissions...", string.Empty).SetUsage()); if (_owner.SiteBindings.Any(item => item.CanBrowse)) { result.Add(MethodTaskItem.CreateSeparator().SetUsage()); var manageGroup = new GroupTaskItem(string.Empty, "Manage Folder", string.Empty, true); result.Add(manageGroup); manageGroup.Items.Add(new TextTaskItem("Browse Folder", string.Empty, true)); foreach (Binding binding in _owner.SiteBindings) { if (binding.CanBrowse) { var uri = binding.ToUri(); manageGroup.Items.Add( new MethodTaskItem("Browse", $"Browse {binding.ToShortString()}", string.Empty, string.Empty, Resources.browse_16, uri).SetUsage()); } } } return(result.ToArray(typeof(TaskItem)) as TaskItem[]); }
private TaskItem CreateSwitchAddressTask(ICollection <string> otherAddresses) { GroupTaskItem group = new GroupTaskItem("ShowingSwitchAddresses", Resources.SwitchAddressTask, ChangesCategory, true); foreach (string otherAddress in otherAddresses) { var task = new MethodTaskItem( "SwitchAddress", otherAddress, ChangesCategory, String.Format(Resources.SwitchAddressDescription, otherAddress), null, otherAddress ); group.Items.Add(task); } group.Items.Add(new MethodTaskItem( "SwitchAddressManual", Resources.SwitchBindingsAddressesToManualTask, ChangesCategory)); return(group); }
public override ICollection GetTaskItems() { var result = new ArrayList(); result.Add(new MethodTaskItem("Explore", "Explore", string.Empty, string.Empty, Resources.explore_16).SetUsage()); result.Add(new MethodTaskItem("Permissions", "Edit Permissions...", string.Empty).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add( new MethodTaskItem("Basic", "Basic Settings...", string.Empty, string.Empty, Resources.basic_settings_16).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add(new MethodTaskItem("VirtualDirectories", "View Virtual Directories", string.Empty).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); var manageGroup = new GroupTaskItem(string.Empty, "Manage Application", string.Empty, true); result.Add(manageGroup); manageGroup.Items.Add(new TextTaskItem("Browse Application", string.Empty, true)); foreach (Binding binding in _owner.SiteBindings) { manageGroup.Items.Add( new MethodTaskItem("Browse", string.Format("Browse {0}", binding.ToShortString()), string.Empty, string.Empty, Resources.browse_16, binding).SetUsage()); } manageGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); manageGroup.Items.Add(new MethodTaskItem("Advanced", "Advanced Settings...", string.Empty).SetUsage()); return(result.ToArray(typeof(TaskItem)) as TaskItem[]); }
public override ICollection GetTaskItems() { var result = new ArrayList(); result.Add(new MethodTaskItem("Explore", "Explore", string.Empty, string.Empty, Resources.explore_16).SetUsage()); result.Add(new MethodTaskItem("Permissions", "Edit Permissions...", string.Empty).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add(new TextTaskItem("Edit Site", string.Empty, true)); result.Add(new MethodTaskItem("Bindings", "Bindings...", string.Empty).SetUsage()); result.Add( new MethodTaskItem("Basic", "Basic Settings...", string.Empty, string.Empty, Resources.basic_settings_16).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add(new MethodTaskItem("Applications", "View Applications", string.Empty).SetUsage()); result.Add(new MethodTaskItem("VirtualDirectories", "View Virtual Directories", string.Empty).SetUsage()); if (_owner.SiteBindings.Any(item => item.CanBrowse)) { result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); var manageGroup = new GroupTaskItem(string.Empty, "Manage Website", string.Empty, true); result.Add(manageGroup); manageGroup.Items.Add( new MethodTaskItem("Restart", "Restart", string.Empty, string.Empty, Resources.restart_16).SetUsage(!_owner.IsBusy)); manageGroup.Items.Add( new MethodTaskItem("Start", "Start", string.Empty, string.Empty, Resources.start_16).SetUsage( !_owner.IsBusy && !_owner.IsStarted)); manageGroup.Items.Add(new MethodTaskItem("Stop", "Stop", string.Empty, string.Empty, Resources.stop_16) .SetUsage( !_owner.IsBusy && _owner.IsStarted)); manageGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); manageGroup.Items.Add(new TextTaskItem("Browse Website", string.Empty, true)); foreach (Binding binding in _owner.SiteBindings) { if (binding.CanBrowse) { manageGroup.Items.Add( new MethodTaskItem("Browse", string.Format("Browse {0}", binding.ToShortString()), string.Empty, string.Empty, Resources.browse_16, binding.ToUri()).SetUsage()); } } manageGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); manageGroup.Items.Add(new MethodTaskItem("Advanced", "Advanced Settings...", string.Empty).SetUsage()); manageGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); manageGroup.Items.Add(new TextTaskItem("Configure", string.Empty, true)); manageGroup.Items.Add(new MethodTaskItem("Tracing", "Failed Request Tracing...", string.Empty).SetUsage()); manageGroup.Items.Add(new MethodTaskItem("Limits", "Limits...", string.Empty).SetUsage()); if (_owner.HasProject) { manageGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); manageGroup.Items.Add(new TextTaskItem("Troubleshooting", string.Empty, true)); manageGroup.Items.Add(new MethodTaskItem("FixProject", "Project Diagnostics", string.Empty).SetUsage()); } } return(result.ToArray(typeof(TaskItem)) as TaskItem[]); }
public override ICollection GetTaskItems() { var result = new ArrayList(); result.Add(new MethodTaskItem("Explore", "Explore", string.Empty, string.Empty, Resources.explore_16).SetUsage()); result.Add(new MethodTaskItem("Permissions", "Edit Permissions...", string.Empty).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); var manageGroup = new GroupTaskItem(string.Empty, "Manage Folder", string.Empty, true); result.Add(manageGroup); manageGroup.Items.Add(new TextTaskItem("Browse Folder", string.Empty, true)); foreach (Binding binding in _owner.SiteBindings) { manageGroup.Items.Add( new MethodTaskItem("Browse", string.Format("Browse {0}", binding.ToShortString()), string.Empty, string.Empty, Resources.browse_16, binding).SetUsage()); } return(result.ToArray(typeof(TaskItem)) as TaskItem[]); }
public override ICollection GetTaskItems() { var result = new ArrayList(); result.Add(new MethodTaskItem("Explore", "Explore", string.Empty, string.Empty, Resources.explore_16).SetUsage()); result.Add(new MethodTaskItem("Permissions", "Edit Permissions...", string.Empty).SetUsage()); result.Add(MethodTaskItem.CreateSeparator().SetUsage()); result.Add( new MethodTaskItem("Basic", "Basic Settings...", string.Empty, string.Empty, Resources.basic_settings_16).SetUsage()); result.Add(MethodTaskItem.CreateSeparator().SetUsage()); result.Add(new MethodTaskItem("VirtualDirectories", "View Virtual Directories", string.Empty).SetUsage()); if (_owner.SiteBindings.Any(item => item.CanBrowse)) { result.Add(MethodTaskItem.CreateSeparator().SetUsage()); var manageGroup = new GroupTaskItem(string.Empty, "Manage Application", string.Empty, true); result.Add(manageGroup); manageGroup.Items.Add(new TextTaskItem("Browse Application", string.Empty, true)); foreach (Binding binding in _owner.SiteBindings) { if (binding.CanBrowse) { var uri = binding.ToUri(); manageGroup.Items.Add( new MethodTaskItem("Browse", $"Browse {binding.ToShortString()}", string.Empty, string.Empty, Resources.browse_16, uri).SetUsage()); } } manageGroup.Items.Add(MethodTaskItem.CreateSeparator().SetUsage()); manageGroup.Items.Add(new MethodTaskItem("Advanced", "Advanced Settings...", string.Empty).SetUsage()); manageGroup.Items.Add(MethodTaskItem.CreateSeparator().SetUsage()); manageGroup.Items.Add(new TextTaskItem("Troubleshooting", string.Empty, true)); manageGroup.Items.Add(new MethodTaskItem("FixKestrel", "ASP.NET Core Diagnostics", string.Empty).SetUsage()); manageGroup.Items.Add(new MethodTaskItem("FixPhp", "PHP Diagnostics", string.Empty).SetUsage()); } return(result.ToArray(typeof(TaskItem)) as TaskItem[]); }
private TaskItem CreateHostChangesGroup() { GroupTaskItem taskItem = new GroupTaskItem("Expanded", Resources.SiteTaskListHostFileTitle, HostsTaskCategory, true); string currentAddressValue = FormatCurrentAddress(this.enabledHostEntryAddresses); TextTaskItem item = new TextTaskItem(currentAddressValue, HostsTaskCategory, true); taskItem.Items.Add(item); if (this.alternateAddresses != null) { foreach (var alternateAddress in this.alternateAddresses) { taskItem.Items.Add(new MethodTaskItem("SwitchBindingsAddress", String.Format(Resources.SwitchBindingsAddressTask, alternateAddress), HostsTaskCategory, String.Format(Resources.SwitchBindingAddressDescription, alternateAddress), null, alternateAddress)); } } taskItem.Items.Add(new MethodTaskItem("SwitchBindingsAddressToManual", Resources.SwitchBindingsAddressesToManualTask, HostsTaskCategory)); if (this.hasEnabledBindingEntries) { taskItem.Items.Add(new MethodTaskItem("DisableAllBindingEntries", Resources.DisableBindingEntriesTask, HostsTaskCategory, Resources.DisableBindingEntriesDescription)); } taskItem.Items.Add(new MethodTaskItem("GoToHostsView", Resources.EditHostsTask, HostsTaskCategory)); return(taskItem); }
public override ICollection GetTaskItems() { var result = new ArrayList(); result.Add( new MethodTaskItem("Add", "Add Website...", string.Empty, string.Empty, Resources.site_new_16) .SetUsage()); result.Add(new MethodTaskItem("Set", "Set Website Defaults", string.Empty).SetUsage()); if (_owner.SelectedItem != null) { result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add(new TextTaskItem("Edit Site", string.Empty, true)); result.Add(new MethodTaskItem("Bindings", "Bindings...", string.Empty).SetUsage()); result.Add( new MethodTaskItem("Basic", "Basic Settings...", string.Empty, string.Empty, Resources.basic_settings_16).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add( new MethodTaskItem("Explore", "Explore", string.Empty, string.Empty, Resources.explore_16) .SetUsage()); result.Add(new MethodTaskItem("Permissions", "Edit Permissions...", string.Empty).SetUsage()); result.Add(RemoveTaskItem); result.Add(new MethodTaskItem("Rename", "Rename", string.Empty).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add(new MethodTaskItem("Applications", "View Applications", string.Empty).SetUsage()); result.Add( new MethodTaskItem("VirtualDirectories", "View Virtual Directories", string.Empty).SetUsage()); if (_owner.SelectedItem.Bindings.Any(item => item.CanBrowse)) { result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); var manageGroup = new GroupTaskItem(string.Empty, "Manage Website", string.Empty, true); result.Add(manageGroup); manageGroup.Items.Add( new MethodTaskItem("Restart", "Restart", string.Empty, string.Empty, Resources.restart_16) .SetUsage(!_owner.IsBusy)); manageGroup.Items.Add( new MethodTaskItem("Start", "Start", string.Empty, string.Empty, Resources.start_16).SetUsage( !_owner.IsBusy && _owner.SelectedItem.State != ObjectState.Started)); manageGroup.Items.Add(new MethodTaskItem("Stop", "Stop", string.Empty, string.Empty, Resources.stop_16) .SetUsage( !_owner.IsBusy && _owner.SelectedItem.State == ObjectState.Started)); manageGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); manageGroup.Items.Add(new TextTaskItem("Browse Website", string.Empty, true)); foreach (Binding binding in _owner.SelectedItem.Bindings) { if (binding.CanBrowse) { var uri = binding.ToUri(); manageGroup.Items.Add( new MethodTaskItem("Browse", $"Browse {uri}", string.Empty, string.Empty, Resources.browse_16, uri).SetUsage()); } } manageGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); manageGroup.Items.Add( new MethodTaskItem("Advanced", "Advanced Settings...", string.Empty).SetUsage()); manageGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); manageGroup.Items.Add(new TextTaskItem("Configure", string.Empty, true)); manageGroup.Items.Add( new MethodTaskItem("Tracing", "Failed Request Tracing...", string.Empty).SetUsage()); manageGroup.Items.Add(new MethodTaskItem("Limits", "Limits...", string.Empty).SetUsage()); } } return(result.ToArray(typeof(TaskItem)) as TaskItem[]); }
public override ICollection GetTaskItems() { var result = new ArrayList(); result.Add(new MethodTaskItem("Add", "Add Rule(s)...", string.Empty).SetUsage()); if (_owner.Inbound.CanRevert) { result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add(new MethodTaskItem("Revert", "Revert to Parent", string.Empty).SetUsage()); } result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add(new TextTaskItem("Manage Server Variables", string.Empty, true)); result.Add(new MethodTaskItem("ViewServerVariables", "View Server Variables...", string.Empty).SetUsage()); result.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); result.Add(new TextTaskItem("Manage Providers", string.Empty, true)); result.Add(new MethodTaskItem("ViewMaps", "View Rewrite Maps...", string.Empty).SetUsage()); result.Add(new MethodTaskItem("ViewProviders", "View Providers...", string.Empty).SetUsage()); if (_owner.Inbound.SelectedItem != null) { var groupTaskItem = new GroupTaskItem("Conditions", "Conditions", string.Empty, true); groupTaskItem.Items.Add(new MethodTaskItem("AddConditions", "Add...", string.Empty).SetUsage()); result.Add(groupTaskItem); } var inboundGroup = new GroupTaskItem("InboundRules", "Inbound Rules", string.Empty, true); result.Add(inboundGroup); if (_owner.Inbound.SelectedItem != null) { inboundGroup.Items.Add(new MethodTaskItem("Edit", "Edit...", string.Empty).SetUsage()); inboundGroup.Items.Add(new MethodTaskItem("Rename", "Rename", string.Empty).SetUsage()); inboundGroup.Items.Add(RemoveTaskItem); if (!_owner.Inbound.SelectedItem.Enabled) { inboundGroup.Items.Add(new MethodTaskItem("Enable", "Enable Rule", string.Empty).SetUsage()); } if (_owner.Inbound.SelectedItem.Enabled) { inboundGroup.Items.Add(new MethodTaskItem("Disable", "Disable Rule", string.Empty).SetUsage()); } inboundGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); inboundGroup.Items.Add(GetMoveUpTaskItem(_owner.Inbound.CanMoveUp)); inboundGroup.Items.Add(GetMoveDownTaskItem(_owner.Inbound.CanMoveDown)); inboundGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); } inboundGroup.Items.Add(new MethodTaskItem("Import", "Import Rules...", string.Empty).SetUsage()); var outboundGroup = new GroupTaskItem("OutboundRules", "Outbound Rules", string.Empty, true); result.Add(outboundGroup); if (_owner.Outbound.SelectedItem != null) { outboundGroup.Items.Add(new MethodTaskItem("EditOut", "Edit...", string.Empty).SetUsage()); outboundGroup.Items.Add(new MethodTaskItem("RenameOut", "Rename", string.Empty).SetUsage()); outboundGroup.Items.Add(GetRemoveTaskItem("Remove2")); if (!_owner.Outbound.SelectedItem.Enabled) { outboundGroup.Items.Add(new MethodTaskItem("EnableOut", "Enable Rule", string.Empty).SetUsage()); } if (_owner.Outbound.SelectedItem.Enabled) { outboundGroup.Items.Add(new MethodTaskItem("DisableOut", "Disable Rule", string.Empty).SetUsage()); } outboundGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); outboundGroup.Items.Add(GetMoveUpTaskItem("MoveUpOut", _owner.Outbound.CanMoveUp)); outboundGroup.Items.Add(GetMoveDownTaskItem("MoveDownOut", _owner.Outbound.CanMoveDown)); outboundGroup.Items.Add(new MethodTaskItem(string.Empty, "-", string.Empty).SetUsage()); } outboundGroup.Items.Add(new MethodTaskItem("ViewPreconditions", "View Preconditions...", string.Empty).SetUsage()); outboundGroup.Items.Add(new MethodTaskItem("ViewTags", "View Custom Tags...", string.Empty).SetUsage()); return(result.ToArray(typeof(TaskItem)) as TaskItem[]); }