source: uKadecot/trunk/tools/EcnlControllerUI/EcnlControllerUI/jQueryMobile.cs@ 101

Last change on this file since 101 was 101, checked in by coas-nagasima, 9 years ago

TOPPERS/uKadecotのソースコードを追加

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/plain
File size: 8.6 KB
Line 
1/*
2 * TOPPERS ECHONET Lite Communication Middleware
3 *
4 * Copyright (C) 2015 Cores Co., Ltd. Japan
5 *
6 * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
7 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
8 * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する.
9 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
10 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
11 * スコード中に含まれていること.
12 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
13 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
14 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
15 * の無保証規定を掲載すること.
16 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
17 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
18 * と.
19 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
20 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
21 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
22 * 報告すること.
23 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
24 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
25 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
26 * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを
27 * 免責すること.
28 *
29 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
30 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
31 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
32 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
33 * の責任を負わない.
34 *
35 * @(#) $Id: jQueryMobile.cs 101 2015-06-02 15:37:23Z coas-nagasima $
36 */
37
38using System;
39using System.Collections;
40using System.Collections.Generic;
41using System.Html;
42using System.Text;
43using jQueryApi;
44
45public static class jQueryMobile
46{
47 [System.Runtime.CompilerServices.InlineCode("{obj}.collapsibleset({})")]
48 public static jQueryObject CollapsibleSet(this jQueryObject obj)
49 {
50 return ((dynamic)obj).collapsibleset();
51 }
52
53 [System.Runtime.CompilerServices.InlineCode("{obj}.collapsibleset({p})")]
54 public static void CollapsibleSet(this jQueryObject obj, string p)
55 {
56 ((dynamic)obj).collapsibleset(p);
57 }
58
59 [System.Runtime.CompilerServices.InlineCode("{obj}.popup({p1}, {p2})")]
60 public static void Popup(this jQueryObject obj, string p1, object p2)
61 {
62 ((dynamic)obj).popup(p1, p2);
63 }
64
65 [System.Runtime.CompilerServices.InlineCode("{obj}.listview()")]
66 public static jQueryObject ListView(this jQueryObject obj)
67 {
68 return ((dynamic)obj).listview();
69 }
70
71 [System.Runtime.CompilerServices.InlineCode("{obj}.listview({p})")]
72 public static void ListView(this jQueryObject obj, string p)
73 {
74 ((dynamic)obj).listview(p);
75 }
76
77 [System.Runtime.CompilerServices.InlineCode("{obj}.tabs({p1}, {p2})")]
78 public static void Tabs(this jQueryObject obj, string p1, int p2)
79 {
80 ((dynamic)obj).tabs(p1, p2);
81 }
82
83 [System.Runtime.CompilerServices.InlineCode("{obj}.tabs({p1}, {p2}, {p3})")]
84 public static void Tabs(this jQueryObject obj, string p1, string p2, int p3)
85 {
86 ((dynamic)obj).tabs(p1, p2, p3);
87 }
88
89 [System.Runtime.CompilerServices.InlineCode("{obj}.checkboxradio()")]
90 public static jQueryObject CheckboxRadio(this jQueryObject obj)
91 {
92 return ((dynamic)obj).checkboxradio();
93 }
94
95 [System.Runtime.CompilerServices.InlineCode("{obj}.checkboxradio({p})")]
96 public static void CheckboxRadio(this jQueryObject obj, string p)
97 {
98 ((dynamic)obj).checkboxradio(p);
99 }
100
101 [System.Runtime.CompilerServices.InlineCode("{obj}.collapsible({p})")]
102 public static void Collapsible(this jQueryObject obj, string p)
103 {
104 ((dynamic)obj).collapsible(p);
105 }
106
107 [System.Runtime.CompilerServices.InlineCode("{obj}.button({p1}, {p2}, {p3})")]
108 public static void Button(this jQueryObject obj, string p1, string p2, object p3)
109 {
110 ((dynamic)obj).button(p1, p2, p3);
111 }
112
113 [System.Runtime.CompilerServices.InlineCode("{obj}.controlgroup()")]
114 public static jQueryObject ControlGroup(this jQueryObject obj)
115 {
116 return ((dynamic)obj).controlgroup();
117 }
118
119 [System.Runtime.CompilerServices.InlineCode("{obj}.controlgroup({p})")]
120 public static void ControlGroup(this jQueryObject obj, string p)
121 {
122 ((dynamic)obj).controlgroup(p);
123 }
124
125 [System.Runtime.CompilerServices.InlineCode("{obj}.textinput()")]
126 public static jQueryObject TextInput(this jQueryObject obj)
127 {
128 return ((dynamic)obj).textinput();
129 }
130
131 [System.Runtime.CompilerServices.InlineCode("{obj}.textinput({p})")]
132 public static void TextInput(this jQueryObject obj, string p)
133 {
134 ((dynamic)obj).textinput(p);
135 }
136
137 [System.Runtime.CompilerServices.InlineCode("{obj}.slider()")]
138 public static jQueryObject Slider(this jQueryObject obj)
139 {
140 return ((dynamic)obj).slider();
141 }
142
143 [System.Runtime.CompilerServices.InlineCode("{obj}.slider({p})")]
144 public static void Slider(this jQueryObject obj, string p)
145 {
146 ((dynamic)obj).slider(p);
147 }
148
149 [System.Runtime.CompilerServices.InlineCode("{obj}.flipswitch()")]
150 public static jQueryObject FlipSwitch(this jQueryObject obj)
151 {
152 return ((dynamic)obj).flipswitch();
153 }
154
155 [System.Runtime.CompilerServices.InlineCode("{obj}.flipswitch({p})")]
156 public static void FlipSwitch(this jQueryObject obj, string p)
157 {
158 ((dynamic)obj).flipswitch(p);
159 }
160
161 [System.Runtime.CompilerServices.InlineCode("{obj}.flipswitch({p1},{p2},{p3})")]
162 public static void FlipSwitch(this jQueryObject obj, string p1, string p2, string p3)
163 {
164 ((dynamic)obj).flipswitch(p1, p2, p3);
165 }
166 [System.Runtime.CompilerServices.InlineCode("$.mobile.loading({p1})")]
167 public static void Loading(string p1)
168 {
169
170 }
171 [System.Runtime.CompilerServices.InlineCode("$.mobile.loading({p1},{p2})")]
172 public static void Loading(string p1, JsDictionary p2)
173 {
174
175 }
176 [System.Runtime.CompilerServices.InlineCode("$.mobile.loading({p1},{p2})")]
177 public static void Loading(string p1, LoadingOption p2)
178 {
179
180 }
181
182 [System.Runtime.CompilerServices.InlineCode("{obj}.prop({p1},{p2})")]
183 public static jQueryObject Prop(this jQueryObject obj, string p1, bool p2)
184 {
185 return ((dynamic)obj).prop(p1, p2);
186 }
187 [System.Runtime.CompilerServices.InlineCode("{obj}.prop({p})")]
188 public static bool Prop(this jQueryObject obj, string p)
189 {
190 return ((dynamic)obj).prop(p);
191 }
192}
193
194public static class ElementExtensions
195{
196 [System.Runtime.CompilerServices.InlineCode("{obj}.value")]
197 public static string GetValue(this Element obj)
198 {
199 return ((dynamic)obj).value;
200 }
201
202 [System.Runtime.CompilerServices.InlineCode("{obj}.value = {value}")]
203 public static void SetValue(this Element obj, string value)
204 {
205 ((dynamic)obj).value = value;
206 }
207
208 [System.Runtime.CompilerServices.InlineCode("{obj}.checked")]
209 public static bool GetChecked(this Element obj)
210 {
211 return ((dynamic)obj).@checked;
212 }
213
214 [System.Runtime.CompilerServices.InlineCode("{obj}.checked = {checked}")]
215 public static void SetChecked(this Element obj, bool @checked)
216 {
217 ((dynamic)obj).@checked = @checked;
218 }
219
220 [System.Runtime.CompilerServices.InlineCode("{obj}.disabled")]
221 public static bool GetDisabled(this Element obj)
222 {
223 return ((dynamic)obj).disabled;
224 }
225
226 [System.Runtime.CompilerServices.InlineCode("{obj}.disabled = {disabled}")]
227 public static void SetDisabled(this Element obj, bool disabled)
228 {
229 ((dynamic)obj).disabled = disabled;
230 }
231}
232public class LoadingOption
233{
234 public LoadingOption()
235 { }
236 public LoadingOption(string text , bool textVisible)
237 {
238 this.text = text;
239 this.textVisible = textVisible;
240 }
241 public string text;
242 public bool textVisible;
243}
Note: See TracBrowser for help on using the repository browser.