-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathAddExceptionRuleTaskList.cs
More file actions
76 lines (66 loc) · 2.68 KB
/
AddExceptionRuleTaskList.cs
File metadata and controls
76 lines (66 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#nullable disable
/* AddExceptionRuleTaskList.cs
*
* Copyright (C) 2009 Triple IT. All Rights Reserved.
* Author: Frank Lippes, Modified for IIS 10 (.Net 4.6) by RvdH
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*/
using System.Collections;
using Microsoft.Web.Management.Client;
using Microsoft.Web.Management.Client.Win32;
namespace IISGeoIP2blockModule
{
/// <summary>
/// Provides a task list for the geoblock module page
/// </summary>
public sealed class AddExceptionRuleTaskList : TaskList
{
private GeoblockModuleDialogPage owner = null;
private MethodTaskItem addAllowExceptionRuleTaskItem = null;
private MethodTaskItem addDenyExceptionRuleTaskItem = null;
/// <summary>
/// Creates a new tasklist instance
/// </summary>
/// <param name="owner">The page for which the tasklist is created</param>
public AddExceptionRuleTaskList(GeoblockModuleDialogPage owner)
{
this.owner = owner;
}
/// <summary>
/// Returns a collection of task items to show next to the module page
/// </summary>
/// <returns>A collection of task items</returns>
public override System.Collections.ICollection GetTaskItems()
{
ArrayList items = new ArrayList();
addAllowExceptionRuleTaskItem = new MethodTaskItem("AddAllowExceptionRule", "Add Allow Exception Rule...", "Actions", "Add a new allow exception rule");
items.Add(addAllowExceptionRuleTaskItem);
addDenyExceptionRuleTaskItem = new MethodTaskItem("AddDenyExceptionRule", "Add Deny Exception Rule...", "Actions", "Add a new deny exception rule");
items.Add(addDenyExceptionRuleTaskItem);
return items;
}
/// <summary>
/// Fires when the add allow exception rule task is selected
/// </summary>
public void AddAllowExceptionRule()
{
owner.AddAllowExceptionRule();
}
/// <summary>
/// Fires when the add deny exception rule task is selected
/// </summary>
public void AddDenyExceptionRule()
{
owner.AddDenyExceptionRule();
}
}
}