/
Methods.cs
109 lines (91 loc) · 3.41 KB
/
Methods.cs
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Fluqi.Extension;
using Fluqi.Extension.Helpers;
namespace Fluqi.Widget.jAccordion {
/// <summary>
/// The "Methods" are called after the control has been initialised. If for instance you want to change
/// the value of a property, or invoke "some" action on the control (e.g. "open" or "close") you
/// call the "Method" rather than through the "Options" (as Options is about the initialisation of the control).
/// </summary>
public partial class Methods: Core.Methods {
/// <summary>
/// Constructor
/// </summary>
/// <param name="ac">Accordion object to call</param>
public Methods(Accordion ac)
: base(ac)
{
}
/// <summary>
/// Activate a content part of the Accordion programmatically.
/// <param name="panelIndex">
/// zero-indexed number to match the position of the header to activate.
/// </param>
/// </summary>
/// <remarks>See http://api.jqueryui.com/accordion/#option-active for details</remarks>
public void Active(int panelIndex) {
this.RenderSetOptionCall("active", panelIndex);
}
/// <summary>
/// Remove the accordion functionality completely. This will return the element back to its pre-init state.
/// </summary>
/// <remarks>See http://api.jqueryui.com/accordion/#method-destroy for details</remarks>
public void Destroy() {
this.RenderMethodCall("destroy");
}
/// <summary>
/// Disable the accordion.
/// </summary>
/// <remarks>See http://api.jqueryui.com/accordion/#method-disable for details</remarks>
public void Disable() {
this.RenderMethodCall("disable");
}
/// <summary>
/// Enable the accordion.
/// </summary>
/// <remarks>See http://api.jqueryui.com/accordion/#method-enable for details</remarks>
public void Enable() {
this.RenderMethodCall("enable");
}
/// <summary>
/// Recompute heights of the accordion contents when using the heightStyle option and the
/// container height changed. For example, when the container is a resizable, this method
/// should be called by its resize-event.
/// </summary>
/// <remarks>
/// See http://api.jqueryui.com/accordion/#method-refresh for details.
/// Note previous to jQuery 1.9 this was called the "resize" method
/// </remarks>
public void Refresh() {
this.RenderMethodCall("refresh");
}
/// <summary>
/// Returns the .ui-accordion element.
/// </summary>
/// <remarks>See http://api.jqueryui.com/accordion/#method-widget for details</remarks>
public void Widget() {
this.RenderMethodCall("widget");
}
/// <summary>
/// Selects the given content part (the "Select" method is the same as "Activate"
/// and is here for ease of discover).
/// <param name="panelIndex">
/// zero-indexed number to match the position of the header to activate.
/// </param>
/// </summary>
/// <remarks>See http://jqueryui.com/demos/accordion/#method-activate for details.</remarks>
public void Select(int panelIndex) {
this.Active(panelIndex);
}
/// <summary>
/// Collapses all accordion panels (only possible when collapsible is true).
/// </summary>
/// <remarks>See http://jqueryui.com/demos/accordion/#method-activate for details.</remarks>
public void CollapseAll() {
this.RenderMethodCall("active", "false");
}
}
}