forked from extnet/Ext.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindow.cs
More file actions
155 lines (138 loc) · 5.19 KB
/
Window.cs
File metadata and controls
155 lines (138 loc) · 5.19 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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/********
* @version : 2.1.1 - Ext.NET Pro License
* @author : Ext.NET, Inc. http://www.ext.net/
* @date : 2012-12-10
* @copyright : Copyright (c) 2007-2012, Ext.NET, Inc. (http://www.ext.net/). All rights reserved.
* @license : See license.txt and http://www.ext.net/license/.
********/
using System.ComponentModel;
using System.Drawing;
using System.Web.UI;
using Ext.Net.Utilities;
namespace Ext.Net
{
/// <summary>
/// A specialized panel intended for use as an application window. Windows are floated, resizable, and draggable by default. Windows can be maximized to fill the viewport, restored to their prior size, and can be minimized.
///
/// Windows can also be linked to a Ext.ZIndexManager or managed by the Ext.WindowMgr to provide grouping, activation, to front, to back and other application-specific behavior.
///
/// By default, Windows will be rendered to document.body. To constrain a Window to another element specify renderTo.
///
/// As with all Containers, it is important to consider how you want the Window to size and arrange any child Components. Choose an appropriate layout configuration which lays out child Components in the required manner.
/// </summary>
[Meta]
[ToolboxData("<{0}:Window runat=\"server\" Title=\"Title\" Collapsible=\"true\" Icon=\"Application\" Height=\"185\" Width=\"350\"><Items></Items></{0}:Window>")]
[ToolboxBitmap(typeof(Window), "Build.ToolboxIcons.Window.bmp")]
[Description("A specialized panel intended for use as an application window. Windows are floated, resizable, and draggable by default. Windows can be maximized to fill the viewport, restored to their prior size, and can be minimized.")]
public partial class Window : AbstractWindow
{
/// <summary>
///
/// </summary>
[Category("0. About")]
[Description("")]
public override string InstanceOf
{
get
{
return "Ext.window.Window";
}
}
/// <summary>
///
/// </summary>
[Category("0. About")]
[Description("")]
public override string XType
{
get
{
return "window";
}
}
/* Ctor
-----------------------------------------------------------------------------------------------*/
/// <summary>
///
/// </summary>
[Description("")]
public Window() { }
/// <summary>
///
/// </summary>
/// <param name="title"></param>
[Description("")]
public Window(string title) : this(title, Icon.None) { }
/// <summary>
///
/// </summary>
/// <param name="title"></param>
/// <param name="icon"></param>
[Description("")]
public Window(string title, Icon icon)
{
this.Title = title;
this.Icon = icon;
}
/// <summary>
///
/// </summary>
/// <param name="title"></param>
/// <param name="icon"></param>
/// <param name="html"></param>
[Description("")]
public Window(string title, Icon icon, string html)
{
this.Title = title;
this.Icon = icon;
this.Html = html;
this.Padding = 5;
}
/* Client Events
-----------------------------------------------------------------------------------------------*/
private WindowListeners listeners;
/// <summary>
/// Client-side JavaScript Event Handlers
/// </summary>
[Meta]
[ConfigOption("listeners", JsonMode.Object)]
[Category("2. Observable")]
[NotifyParentProperty(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[Description("Client-side JavaScript Event Handlers")]
public WindowListeners Listeners
{
get
{
if (this.listeners == null)
{
this.listeners = new WindowListeners();
}
return this.listeners;
}
}
private WindowDirectEvents directEvents;
/// <summary>
/// Server-side Ajax Event Handlers
/// </summary>
[Meta]
[Category("2. Observable")]
[NotifyParentProperty(true)]
[PersistenceMode(PersistenceMode.InnerProperty)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
[ConfigOption("directEvents", JsonMode.Object)]
[Description("Server-side Ajax Event Handlers")]
public WindowDirectEvents DirectEvents
{
get
{
if (this.directEvents == null)
{
this.directEvents = new WindowDirectEvents(this);
}
return this.directEvents;
}
}
}
}