Init.
This commit is contained in:
parent
44f12aac2e
commit
ee37950092
894
FineUI.Examples/Code/PageBase.cs
Normal file
894
FineUI.Examples/Code/PageBase.cs
Normal file
File diff suppressed because one or more lines are too long
2289
FineUI.Examples/FineUI.Examples.csproj
Normal file
2289
FineUI.Examples/FineUI.Examples.csproj
Normal file
File diff suppressed because it is too large
Load Diff
35
FineUI.Examples/Properties/AssemblyInfo.cs
Normal file
35
FineUI.Examples/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("FineUI.Examples")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("FineUI")]
|
||||||
|
[assembly: AssemblyProduct("FineUI.Examples")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright (C) 2008-2009 sanshi.ustc@gmail.com")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
58
FineUI.Examples/Web.config
Normal file
58
FineUI.Examples/Web.config
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<section name="FineUI" type="FineUI.ConfigSection, FineUI" requirePermission="false"/>
|
||||||
|
</configSections>
|
||||||
|
<!-- 可用的配置项(这里列的都是默认值): Language="zh_CN" AjaxTimeout="60" EnableAjax="true" Theme="Blue" FormMessageTarget="Qtip" FormOffsetRight="20" FormLabelWidth="100" FormLabelSeparator=":" FormLabelAlign="Left" IconBasePath="~/icon" EnableAjaxLoading="true" AjaxLoadingType="Default" CustomTheme="" CustomThemeBasePath="~/theme" ExtjsBasePath="~/extjs" -->
|
||||||
|
<FineUI DebugMode="true" />
|
||||||
|
<appSettings/>
|
||||||
|
<connectionStrings/>
|
||||||
|
<system.web>
|
||||||
|
<!-- Net3.5以上的项目,一定要为pages节点加上这两个属性:controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" -->
|
||||||
|
<pages>
|
||||||
|
<controls>
|
||||||
|
<add assembly="FineUI" namespace="FineUI" tagPrefix="x"/>
|
||||||
|
</controls>
|
||||||
|
</pages>
|
||||||
|
<httpModules>
|
||||||
|
<add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
|
||||||
|
</httpModules>
|
||||||
|
<httpHandlers>
|
||||||
|
<add verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI" validate="false"/>
|
||||||
|
</httpHandlers>
|
||||||
|
<httpRuntime maxRequestLength="102400 "/>
|
||||||
|
<customErrors mode="Off"/>
|
||||||
|
<compilation debug="true"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<authentication mode="Forms">
|
||||||
|
<forms name=".ASPXFORMSAUTH" loginUrl="~/default.aspx" timeout="120" defaultUrl="~/main.aspx" protection="All" path="/"/>
|
||||||
|
</authentication>
|
||||||
|
<authorization>
|
||||||
|
<deny users="?"/>
|
||||||
|
</authorization>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</system.web>
|
||||||
|
<!--
|
||||||
|
<location path="res.axd">
|
||||||
|
<system.web>
|
||||||
|
<authorization>
|
||||||
|
<allow users ="*" />
|
||||||
|
</authorization>
|
||||||
|
</system.web>
|
||||||
|
</location>
|
||||||
|
-->
|
||||||
|
<!-- IIS7 Integrated Mode
|
||||||
|
<system.webServer>
|
||||||
|
<modules>
|
||||||
|
<add name="FineUIScriptModule" type="FineUI.ScriptModule, FineUI"/>
|
||||||
|
</modules>
|
||||||
|
<handlers>
|
||||||
|
<add name="FineUIResourceHandler" verb="GET" path="res.axd" type="FineUI.ResourceHandler, FineUI" validate="false"/>
|
||||||
|
</handlers>
|
||||||
|
<httpErrors errorMode="Detailed"/>
|
||||||
|
<asp scriptErrorSentToBrowser="true"/>
|
||||||
|
</system.webServer>
|
||||||
|
-->
|
||||||
|
</configuration>
|
43
FineUI.Examples/accordion/accordion.aspx
Normal file
43
FineUI.Examples/accordion/accordion.aspx
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="accordion.aspx.cs" Inherits="FineUI.Examples.accordion.accordion2" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:Accordion ID="Accordion1" Title="手风琴控件" runat="server" Width="300px" Height="450px"
|
||||||
|
EnableFill="true" ShowBorder="True" ActiveIndex="1" EnableFrame="true" EnableCollapse="true">
|
||||||
|
<Panes>
|
||||||
|
<x:AccordionPane ID="AccordionPane1" runat="server" Title="面板一" IconUrl="../images/16/1.png"
|
||||||
|
BodyPadding="2px 5px" ShowBorder="false">
|
||||||
|
<Items>
|
||||||
|
<x:Label ID="Label1" Text="面板一中的文本" runat="server">
|
||||||
|
</x:Label>
|
||||||
|
</Items>
|
||||||
|
</x:AccordionPane>
|
||||||
|
<x:AccordionPane ID="AccordionPane2" runat="server" Title="面板二" IconUrl="../images/16/4.png"
|
||||||
|
BodyPadding="2px 5px" ShowBorder="false">
|
||||||
|
<Items>
|
||||||
|
<x:Label ID="Label2" Text="面板二中的文本" runat="server">
|
||||||
|
</x:Label>
|
||||||
|
</Items>
|
||||||
|
</x:AccordionPane>
|
||||||
|
<x:AccordionPane ID="AccordionPane3" runat="server" Title="面板三" IconUrl="../images/16/7.png"
|
||||||
|
BodyPadding="2px 5px" ShowBorder="false">
|
||||||
|
<Items>
|
||||||
|
<x:Label ID="Label3" Text="面板三中的文本" runat="server">
|
||||||
|
</x:Label>
|
||||||
|
</Items>
|
||||||
|
</x:AccordionPane>
|
||||||
|
</Panes>
|
||||||
|
</x:Accordion>
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button1" Text="获取当前展开的面板" runat="server" OnClick="Button1_Click">
|
||||||
|
</x:Button>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
23
FineUI.Examples/accordion/accordion.aspx.cs
Normal file
23
FineUI.Examples/accordion/accordion.aspx.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.accordion
|
||||||
|
{
|
||||||
|
public partial class accordion2 : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop(String.Format("当前展开的是第 {0} 个面板", Accordion1.ActiveIndex + 1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
105
FineUI.Examples/accordion/accordion.aspx.designer.cs
generated
Normal file
105
FineUI.Examples/accordion/accordion.aspx.designer.cs
generated
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.accordion {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class accordion2 {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Accordion1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Accordion Accordion1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AccordionPane1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.AccordionPane AccordionPane1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Label Label1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AccordionPane2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.AccordionPane AccordionPane2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Label Label2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AccordionPane3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.AccordionPane AccordionPane3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Label Label3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
}
|
||||||
|
}
|
71
FineUI.Examples/accordion/accordion_links.aspx
Normal file
71
FineUI.Examples/accordion/accordion_links.aspx
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="accordion_links.aspx.cs"
|
||||||
|
Inherits="ExtAspNet.Examples.accordion.accordion_links" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<ext:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<ext:Accordion ID="accordionMenu" Width="250px" Height="450px" runat="server" ShowBorder="true"
|
||||||
|
ShowHeader="false" ShowCollapseTool="false">
|
||||||
|
<Panes>
|
||||||
|
<ext:AccordionPane ID="AccordionPane1" runat="server" Title="AccordionPane 1" IconUrl="../images/16/1.png"
|
||||||
|
BodyPadding="2px 5px" ShowBorder="false">
|
||||||
|
<Links>
|
||||||
|
<ext:AccordionLink OnClientClick="return false;" NavigateUrl="http://www.google.com"
|
||||||
|
Selected="true" Target="_blank" Text="Link 1" IconUrl="../images/16/2.png" runat="server" />
|
||||||
|
<ext:AccordionLink OnClientClick="return false;" NavigateUrl="http://www.google.com"
|
||||||
|
Target="_blank" Text="Link 2" IconUrl="../images/16/3.png" runat="server" />
|
||||||
|
</Links>
|
||||||
|
</ext:AccordionPane>
|
||||||
|
<ext:AccordionPane ID="AccordionPane2" runat="server" Title="AccordionPane 2" IconUrl="../images/16/4.png"
|
||||||
|
BodyPadding="2px 5px" ShowBorder="false">
|
||||||
|
<Links>
|
||||||
|
<ext:AccordionLink NavigateUrl="http://www.google.com" Target="_blank" Text="Link 1"
|
||||||
|
IconUrl="../images/16/5.png" runat="server" />
|
||||||
|
<ext:AccordionLink ID="linkFYBX" NavigateUrl="http://www.google.com" Target="_blank"
|
||||||
|
Text="Link 2" IconUrl="../images/16/6.png" runat="server" />
|
||||||
|
</Links>
|
||||||
|
</ext:AccordionPane>
|
||||||
|
<ext:AccordionPane ID="AccordionPane3" runat="server" Title="AccordionPane 3" IconUrl="../images/16/7.png"
|
||||||
|
BodyPadding="2px 5px" ShowBorder="false">
|
||||||
|
<Links>
|
||||||
|
<ext:AccordionLink ID="linkDSP" NavigateUrl="http://www.google.com" Target="_blank"
|
||||||
|
Text="Link 1" IconUrl="../images/16/8.png" runat="server" />
|
||||||
|
<ext:AccordionLink NavigateUrl="http://www.google.com" Target="_blank" Text="Link 2"
|
||||||
|
IconUrl="../images/16/9.png" runat="server" />
|
||||||
|
</Links>
|
||||||
|
</ext:AccordionPane>
|
||||||
|
</Panes>
|
||||||
|
</ext:Accordion>
|
||||||
|
<br />
|
||||||
|
<a href="#" onclick="activelinks('dsp');">Select Link 1 in Panel 3</a>
|
||||||
|
<br />
|
||||||
|
<iframe width="300px" height="100px" src="./accordion_links_iframe.htm"></iframe>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function activelinks(type) {
|
||||||
|
|
||||||
|
var menu = Ext.getCmp('<%= accordionMenu.ClientID %>');
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case 'dsp':
|
||||||
|
menu.box_active('<%= linkDSP.ClientID %>');
|
||||||
|
break;
|
||||||
|
case 'fybx':
|
||||||
|
menu.box_active('<%= linkFYBX.ClientID %>');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
25
FineUI.Examples/accordion/accordion_links.aspx.cs
Normal file
25
FineUI.Examples/accordion/accordion_links.aspx.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace ExtAspNet.Examples.accordion
|
||||||
|
{
|
||||||
|
public partial class accordion_links : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
88
FineUI.Examples/accordion/accordion_links.aspx.designer.cs
generated
Normal file
88
FineUI.Examples/accordion/accordion_links.aspx.designer.cs
generated
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
// 运行时版本:2.0.50727.3603
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace ExtAspNet.Examples.accordion {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class accordion_links {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::ExtAspNet.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// accordionMenu 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::ExtAspNet.Accordion accordionMenu;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AccordionPane1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::ExtAspNet.AccordionPane AccordionPane1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AccordionPane2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::ExtAspNet.AccordionPane AccordionPane2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// linkFYBX 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::ExtAspNet.AccordionLink linkFYBX;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// AccordionPane3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::ExtAspNet.AccordionPane AccordionPane3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// linkDSP 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::ExtAspNet.AccordionLink linkDSP;
|
||||||
|
}
|
||||||
|
}
|
17
FineUI.Examples/accordion/accordion_links_iframe.htm
Normal file
17
FineUI.Examples/accordion/accordion_links_iframe.htm
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
<style type="text/css">
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
This is a page in iframe.
|
||||||
|
<br />
|
||||||
|
<a href="#" onclick="parent.window.activelinks('fybx');">Select Link 2 in Panel 2</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
51
FineUI.Examples/accordion/accordion_tree.aspx
Normal file
51
FineUI.Examples/accordion/accordion_tree.aspx
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="accordion_tree.aspx.cs"
|
||||||
|
Inherits="FineUI.Examples.accordion.accordion_tree" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<style>
|
||||||
|
body.x-body {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" AutoSizePanelID="RegionPanel1" runat="server"></x:PageManager>
|
||||||
|
<x:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server">
|
||||||
|
<Regions>
|
||||||
|
<x:Region ID="Region2" Split="true" Width="200px" Margins="0 0 0 0" ShowHeader="false"
|
||||||
|
Title="目录" EnableCollapse="true" Layout="Fit" Position="Left" runat="server">
|
||||||
|
<Items>
|
||||||
|
<x:Accordion runat="server" ShowBorder="false" ShowHeader="false" ShowCollapseTool="true">
|
||||||
|
<Panes>
|
||||||
|
<x:AccordionPane runat="server" Title="面板一" IconUrl="~/images/16/1.png" BodyPadding="2px 5px"
|
||||||
|
Layout="Fit" ShowBorder="false">
|
||||||
|
<Items>
|
||||||
|
<x:Tree runat="server" EnableArrows="true" ShowBorder="false" ShowHeader="false" ID="treeMenu">
|
||||||
|
</x:Tree>
|
||||||
|
</Items>
|
||||||
|
</x:AccordionPane>
|
||||||
|
<x:AccordionPane runat="server" Title="面板二" IconUrl="~/images/16/4.png" BodyPadding="2px 5px"
|
||||||
|
ShowBorder="false">
|
||||||
|
<Items>
|
||||||
|
<x:Label Text="面板二中的文本" runat="server">
|
||||||
|
</x:Label>
|
||||||
|
</Items>
|
||||||
|
</x:AccordionPane>
|
||||||
|
</Panes>
|
||||||
|
</x:Accordion>
|
||||||
|
</Items>
|
||||||
|
</x:Region>
|
||||||
|
<x:Region ID="Region3" ShowHeader="false" EnableIFrame="true" IFrameUrl="~/accordion/accordion_tree_index.htm"
|
||||||
|
IFrameName="main" Margins="0 0 0 0" Position="Center" runat="server">
|
||||||
|
</x:Region>
|
||||||
|
</Regions>
|
||||||
|
</x:RegionPanel>
|
||||||
|
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/common/menu.xml"></asp:XmlDataSource>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
46
FineUI.Examples/accordion/accordion_tree.aspx.cs
Normal file
46
FineUI.Examples/accordion/accordion_tree.aspx.cs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.accordion
|
||||||
|
{
|
||||||
|
public partial class accordion_tree : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
// 绑定 XML 数据源到树控件
|
||||||
|
treeMenu.DataSource = XmlDataSource1;
|
||||||
|
treeMenu.DataBind();
|
||||||
|
|
||||||
|
ResolveTreeNode(treeMenu.Nodes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ResolveTreeNode(TreeNodeCollection nodes)
|
||||||
|
{
|
||||||
|
foreach (TreeNode node in nodes)
|
||||||
|
{
|
||||||
|
if (node.Nodes.Count == 0)
|
||||||
|
{
|
||||||
|
if (!String.IsNullOrEmpty(node.NavigateUrl))
|
||||||
|
{
|
||||||
|
node.Target = "main";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ResolveTreeNode(node.Nodes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
78
FineUI.Examples/accordion/accordion_tree.aspx.designer.cs
generated
Normal file
78
FineUI.Examples/accordion/accordion_tree.aspx.designer.cs
generated
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.accordion {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class accordion_tree {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// RegionPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.RegionPanel RegionPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Region2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Region Region2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// treeMenu 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Tree treeMenu;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Region3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Region Region3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// XmlDataSource1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.XmlDataSource XmlDataSource1;
|
||||||
|
}
|
||||||
|
}
|
15
FineUI.Examples/accordion/accordion_tree_index.htm
Normal file
15
FineUI.Examples/accordion/accordion_tree_index.htm
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
请注意,本示例如何做到如下几点:
|
||||||
|
<ul>
|
||||||
|
<li>如何将树控件放在Accordion控件中; </li>
|
||||||
|
<li>如何从XML文件加载树控件; </li>
|
||||||
|
<li>如何在后台通过递归改变每个树节点的Target属性; </li>
|
||||||
|
<li>树节点的Target属性是如何影响链接的打开位置。 </li>
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
24
FineUI.Examples/aspnet/TestWindow.aspx
Normal file
24
FineUI.Examples/aspnet/TestWindow.aspx
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestWindow.aspx.cs" Inherits="FineUI.Examples.aspnet.TestWindow" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<style>
|
||||||
|
form
|
||||||
|
{
|
||||||
|
height:800px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:Button ID="btnTest" Text="点击此按钮查看alert是否报错" runat="server" OnClick="btnTest_Click">
|
||||||
|
</x:Button>
|
||||||
|
<input type="button" onclick="document.getElementById('ok').innerHTML = 'OK';" value="PPP" />
|
||||||
|
<div id="ok"></div>
|
||||||
|
<div id="container1"></div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
22
FineUI.Examples/aspnet/TestWindow.aspx.cs
Normal file
22
FineUI.Examples/aspnet/TestWindow.aspx.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class TestWindow : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnTest_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
FineUI.Alert.Show("出现滚动条后,出错了吗?");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
42
FineUI.Examples/aspnet/TestWindow.aspx.designer.cs
generated
Normal file
42
FineUI.Examples/aspnet/TestWindow.aspx.designer.cs
generated
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class TestWindow {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnTest 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnTest;
|
||||||
|
}
|
||||||
|
}
|
34
FineUI.Examples/aspnet/aspnet.aspx
Normal file
34
FineUI.Examples/aspnet/aspnet.aspx
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="aspnet.aspx.cs" Inherits="FineUI.Examples.aspnet.aspnet" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" AjaxAspnetControls="aspBox,aspButton" runat="server" />
|
||||||
|
<x:ContentPanel ID="ContentPanel1" runat="server" Width="650px" BodyPadding="5px"
|
||||||
|
ShowBorder="true" ShowHeader="true" Title="内容面板">
|
||||||
|
<x:TextBox runat="server" Width="300px" ID="extBox">
|
||||||
|
</x:TextBox>
|
||||||
|
<br />
|
||||||
|
<asp:TextBox runat="server" Width="300px" ID="aspBox"></asp:TextBox>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button1" runat="server" CssClass="inline" Text="1. FineUI 按钮(AJAX)"
|
||||||
|
OnClick="Button1_Click">
|
||||||
|
</x:Button>
|
||||||
|
<x:Button ID="Button2" runat="server" Text="2. FineUI 按钮" EnableAjax="false" OnClick="Button2_Click">
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
<asp:Button ID="Button3" Text="3. ASP.NET 按钮(AJAX)" runat="server" OnClick="Button3_Click"
|
||||||
|
UseSubmitBehavior="false" />
|
||||||
|
<asp:Button ID="Button4" Text="4. ASP.NET 按钮" runat="server" OnClick="Button4_Click" />
|
||||||
|
</x:ContentPanel>
|
||||||
|
<br />
|
||||||
|
注意:只有设置ASP.NET按钮的属性UseSubmitBehavior=false,点击事件才是AJAX;否则点击ASP.NET按钮会导致整个页面回发。
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
48
FineUI.Examples/aspnet/aspnet.aspx.cs
Normal file
48
FineUI.Examples/aspnet/aspnet.aspx.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class aspnet : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
aspBox.Text = "1. ASP.NET 输入框 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
extBox.Text = "1. FineUI 输入框 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
aspBox.Text = "2. ASP.NET 输入框 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
extBox.Text = "2. FineUI 输入框 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
aspBox.Text = "3. ASP.NET 输入框 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
extBox.Text = "3. FineUI 输入框 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void Button4_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
aspBox.Text = "4. ASP.NET 输入框 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
extBox.Text = "4. FineUI 输入框 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
96
FineUI.Examples/aspnet/aspnet.aspx.designer.cs
generated
Normal file
96
FineUI.Examples/aspnet/aspnet.aspx.designer.cs
generated
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class aspnet {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// extBox 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox extBox;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// aspBox 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.TextBox aspBox;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Button Button3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button4 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Button Button4;
|
||||||
|
}
|
||||||
|
}
|
27
FineUI.Examples/aspnet/aspnet_literal.aspx
Normal file
27
FineUI.Examples/aspnet/aspnet_literal.aspx
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="aspnet_literal.aspx.cs"
|
||||||
|
Inherits="FineUI.Examples.aspnet.aspnet_literal" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" AjaxAspnetControls="Label1,Literal1,Literal2_Container" runat="server" />
|
||||||
|
<asp:Label ID="Label1" Text="Label1" runat="server"></asp:Label>
|
||||||
|
<br />
|
||||||
|
<asp:Literal ID="Literal1" Text="Literal1" runat="server"></asp:Literal>
|
||||||
|
<br />
|
||||||
|
<div id="Literal2_Container">
|
||||||
|
<asp:Literal ID="Literal2" Text="Literal2" runat="server"></asp:Literal>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button1" runat="server" Text="更新上面几个文本值" OnClick="Button1_Click">
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
注意:只有Label1和Literal2的值更新了。
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
30
FineUI.Examples/aspnet/aspnet_literal.aspx.cs
Normal file
30
FineUI.Examples/aspnet/aspnet_literal.aspx.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class aspnet_literal : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Label1.Text = "Label1 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
Literal1.Text = "Literal1 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
Literal2.Text = "Literal2 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
69
FineUI.Examples/aspnet/aspnet_literal.aspx.designer.cs
generated
Normal file
69
FineUI.Examples/aspnet/aspnet_literal.aspx.designer.cs
generated
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class aspnet_literal {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label Label1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Literal1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Literal Literal1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Literal2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Literal Literal2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
}
|
||||||
|
}
|
44
FineUI.Examples/aspnet/ckeditor.aspx
Normal file
44
FineUI.Examples/aspnet/ckeditor.aspx
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ckeditor.aspx.cs" ValidateRequest="false"
|
||||||
|
Inherits="FineUI.Examples.aspnet.ckeditor" %>
|
||||||
|
|
||||||
|
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:ContentPanel ID="ContentPanel1" runat="server" BodyPadding="5px" Width="850px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
ShowBorder="true" ShowHeader="true" Title="内容面板">
|
||||||
|
<CKEditor:CKEditorControl ID="CKEditor1" runat="server" Height="300px" BasePath="~/ckeditor">
|
||||||
|
<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>
|
||||||
|
</CKEditor:CKEditorControl>
|
||||||
|
</x:ContentPanel>
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button2" runat="server" CssClass="inline" Text="设置 CKEditor 的值" OnClick="Button2_Click">
|
||||||
|
</x:Button>
|
||||||
|
<x:Button ID="Button1" runat="server" Text="获取 CKEditor 的值" OnClick="Button1_Click">
|
||||||
|
</x:Button>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var editorClientID = '<%= CKEditor1.ClientID %>';
|
||||||
|
var containerClientID = '<%= ContentPanel1.ClientID %>';
|
||||||
|
function onReady() {
|
||||||
|
|
||||||
|
window.setTimeout(function () {
|
||||||
|
X(containerClientID).updateLayout();
|
||||||
|
}, 500);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新编辑器内容
|
||||||
|
function updateCKEditor(content) {
|
||||||
|
var editor = CKEDITOR.instances[editorClientID];
|
||||||
|
editor.setData(content);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
62
FineUI.Examples/aspnet/ckeditor.aspx.cs
Normal file
62
FineUI.Examples/aspnet/ckeditor.aspx.cs
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class ckeditor : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
//CKEditor1.config.toolbar = new object[]
|
||||||
|
// {
|
||||||
|
// new object[] { "Source", "-", "Save", "NewPage", "Preview", "-", "Templates" },
|
||||||
|
// new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" },
|
||||||
|
// new object[] { "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", "RemoveFormat" },
|
||||||
|
// new object[] { "Form", "Checkbox", "Radio", "TextField", "Textarea", "Select", "Button", "ImageButton", "HiddenField" },
|
||||||
|
// "/",
|
||||||
|
// new object[] { "Bold", "Italic", "Underline", "Strike", "-", "Subscript", "Superscript" },
|
||||||
|
// new object[] { "NumberedList", "BulletedList", "-", "Outdent", "Indent", "Blockquote", "CreateDiv" },
|
||||||
|
// new object[] { "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock" },
|
||||||
|
// new object[] { "BidiLtr", "BidiRtl" },
|
||||||
|
// new object[] { "Link", "Unlink", "Anchor" },
|
||||||
|
// new object[] { "Image", "Flash", "Table", "HorizontalRule", "Smiley", "SpecialChar", "PageBreak", "Iframe" },
|
||||||
|
// "/",
|
||||||
|
// new object[] { "Styles", "Format", "Font", "FontSize" },
|
||||||
|
// new object[] { "TextColor", "BGColor" },
|
||||||
|
// new object[] { "Maximize", "ShowBlocks", "-", "About" }
|
||||||
|
// };
|
||||||
|
|
||||||
|
//CKEditor1.config.toolbar = new object[]
|
||||||
|
// {
|
||||||
|
// new object[] { "Bold", "Italic", "-", "NumberedList", "BulletedList", "-", "Link", "Unlink", "-", "About" },
|
||||||
|
// new object[] { "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Print", "SpellChecker", "Scayt" },
|
||||||
|
// };
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop(HttpUtility.HtmlEncode(CKEditor1.Text));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string content = "<p><strong>FineUI</strong> - 基于 ExtJS 的专业 ASP.NET 2.0 控件库,拥有完善的 AJAX 支持和丰富的界面效果。</p>";
|
||||||
|
|
||||||
|
PageContext.RegisterStartupScript(String.Format("updateCKEditor({0});", JsHelper.Enquote(content)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
69
FineUI.Examples/aspnet/ckeditor.aspx.designer.cs
generated
Normal file
69
FineUI.Examples/aspnet/ckeditor.aspx.designer.cs
generated
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class ckeditor {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CKEditor1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::CKEditor.NET.CKEditorControl CKEditor1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
}
|
||||||
|
}
|
34
FineUI.Examples/aspnet/fckeditor.aspx
Normal file
34
FineUI.Examples/aspnet/fckeditor.aspx
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="fckeditor.aspx.cs" ValidateRequest="false"
|
||||||
|
Inherits="FineUI.Examples.aspnet.fckeditor2" %>
|
||||||
|
|
||||||
|
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:ContentPanel ID="ContentPanel1" runat="server" BodyPadding="5px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
ShowBorder="true" ShowHeader="true" Width="850px" Title="内容面板">
|
||||||
|
<FCKeditorV2:FCKeditor ID="FCKeditor1" BasePath="~/fckeditor/" Height="300px" Value="" runat="server">
|
||||||
|
</FCKeditorV2:FCKeditor>
|
||||||
|
</x:ContentPanel>
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button2" runat="server" CssClass="inline" Text="设置 FCKEditor 的值"
|
||||||
|
OnClick="Button2_Click">
|
||||||
|
</x:Button>
|
||||||
|
<x:Button ID="Button1" runat="server" Text="获取 FCKEditor 的值" OnClick="Button1_Click">
|
||||||
|
</x:Button>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
// 更新编辑器内容
|
||||||
|
function updateFCKEditor(content) {
|
||||||
|
var editor = FCKeditorAPI.GetInstance('<%= FCKeditor1.UniqueID %>');
|
||||||
|
editor.SetData(content);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
38
FineUI.Examples/aspnet/fckeditor.aspx.cs
Normal file
38
FineUI.Examples/aspnet/fckeditor.aspx.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class fckeditor2 : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
FCKeditor1.Value = "<p>This is some <strong>sample text</strong>. You are using <a href=\"http://www.fckeditor.net/\">FCKEditor</a>.</p>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop(HttpUtility.HtmlEncode(FCKeditor1.Value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string content = "<p><strong>FineUI</strong> - 基于 ExtJS 的专业 ASP.NET 2.0 控件库,拥有完善的 AJAX 支持和丰富的界面效果。</p>";
|
||||||
|
|
||||||
|
PageContext.RegisterStartupScript(String.Format("updateFCKEditor({0});", JsHelper.Enquote(content)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
69
FineUI.Examples/aspnet/fckeditor.aspx.designer.cs
generated
Normal file
69
FineUI.Examples/aspnet/fckeditor.aspx.designer.cs
generated
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class fckeditor2 {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// FCKeditor1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FredCK.FCKeditorV2.FCKeditor FCKeditor1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
}
|
||||||
|
}
|
36
FineUI.Examples/aspnet/fileupload.aspx
Normal file
36
FineUI.Examples/aspnet/fileupload.aspx
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="fileupload.aspx.cs"
|
||||||
|
Inherits="FineUI.Examples.aspnet.fileupload2" %>
|
||||||
|
|
||||||
|
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" EnableAjax="false" />
|
||||||
|
<x:ContentPanel ID="ContentPanel1" runat="server" Width="800px" BodyPadding="5px"
|
||||||
|
ShowHeader="true" Title="内容面板">
|
||||||
|
Asp.Net上传控件:
|
||||||
|
<asp:FileUpload ID="FileUpload1" runat="server"></asp:FileUpload>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server" BasePath="~/fckeditor/" Height="300px">
|
||||||
|
</FCKeditorV2:FCKeditor>
|
||||||
|
<br />
|
||||||
|
<asp:Button ID="btnCloseWindow2" runat="server" Text="上传文件并获取 FCKEditor 的值"
|
||||||
|
OnClick="btnCloseWindow2_Click"></asp:Button>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
注意:在页面上使用 asp:FileUpload 控件时,必须设置 PageManager 的 EnableAjax 为 false。
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<div style="color:Red; font-weight: bold;">
|
||||||
|
推荐使用 FineUI 提供的 FileUpload 控件,这样就不需要设置 EnableAjax 为 false 了。
|
||||||
|
</div>
|
||||||
|
</x:ContentPanel>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
29
FineUI.Examples/aspnet/fileupload.aspx.cs
Normal file
29
FineUI.Examples/aspnet/fileupload.aspx.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class fileupload2 : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void btnCloseWindow2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (FileUpload1.HasFile)
|
||||||
|
{
|
||||||
|
FileUpload1.SaveAs(Server.MapPath("~/upload/" + FileUpload1.FileName));
|
||||||
|
}
|
||||||
|
Alert.ShowInTop("FCKEditor的值:" + HttpUtility.HtmlEncode(FCKeditor1.Value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
69
FineUI.Examples/aspnet/fileupload.aspx.designer.cs
generated
Normal file
69
FineUI.Examples/aspnet/fileupload.aspx.designer.cs
generated
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class fileupload2 {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// FileUpload1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.FileUpload FileUpload1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// FCKeditor1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FredCK.FCKeditorV2.FCKeditor FCKeditor1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnCloseWindow2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Button btnCloseWindow2;
|
||||||
|
}
|
||||||
|
}
|
35
FineUI.Examples/aspnet/test.aspx
Normal file
35
FineUI.Examples/aspnet/test.aspx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="FineUI.Examples.aspnet.test" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" AjaxAspnetControls="Label1,Literal1,Literal2_Container"
|
||||||
|
runat="server" />
|
||||||
|
<asp:Label ID="Label1" Text="Label1" runat="server"></asp:Label>
|
||||||
|
<br />
|
||||||
|
<asp:Literal ID="Literal1" Text="Literal1" runat="server"></asp:Literal>
|
||||||
|
<br />
|
||||||
|
<div id="Literal2_Container">
|
||||||
|
<asp:Literal ID="Literal2" Text="Literal2" runat="server"></asp:Literal>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button1" runat="server" Text="点击此按钮弹出一个带滚动条的window" OnClick="Button1_Click">
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
<x:Window ID="EditTaskWin" Title="测试window里滚动条" Hidden="true" EnableIFrame="true"
|
||||||
|
runat="server" IsModal="true" Width="650px" Height="300px" EnableClose="true"
|
||||||
|
EnableMaximize="true" Target="Parent" WindowPosition="Center">
|
||||||
|
</x:Window>
|
||||||
|
<div style="width: 486px; height: 566px; border: solid 1px red;">
|
||||||
|
<iframe frameborder="0" src="./TestWindow.htm" name="x1_3337cc1b7b50416b883681252a6dd644"
|
||||||
|
style="overflow:auto;height:100%;width:100%; border: solid 1px green;">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
32
FineUI.Examples/aspnet/test.aspx.cs
Normal file
32
FineUI.Examples/aspnet/test.aspx.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class test : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Label1.Text = "Label1 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
//Literal1.Text = "Literal1 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
//Literal2.Text = "Literal2 - " + DateTime.Now.ToLongTimeString();
|
||||||
|
EditTaskWin.IFrameUrl = "TestWindow.aspx";
|
||||||
|
EditTaskWin.Hidden = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
78
FineUI.Examples/aspnet/test.aspx.designer.cs
generated
Normal file
78
FineUI.Examples/aspnet/test.aspx.designer.cs
generated
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class test {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label Label1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Literal1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Literal Literal1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Literal2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Literal Literal2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// EditTaskWin 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Window EditTaskWin;
|
||||||
|
}
|
||||||
|
}
|
83
FineUI.Examples/aspnet/ueditor.aspx
Normal file
83
FineUI.Examples/aspnet/ueditor.aspx
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ueditor.aspx.cs" ValidateRequest="false"
|
||||||
|
Inherits="FineUI.Examples.aspnet.ueditor" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../ueditor/themes/default/ueditor.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:ContentPanel ID="ContentPanel1" runat="server" BodyPadding="5px" Width="900px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
ShowBorder="true" ShowHeader="true" Title="内容面板">
|
||||||
|
<textarea name="UEditor1" id="UEditor1">
|
||||||
|
</textarea>
|
||||||
|
</x:ContentPanel>
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button2" runat="server" CssClass="inline" Text="设置 CKEditor 的值" OnClick="Button2_Click">
|
||||||
|
</x:Button>
|
||||||
|
<x:Button ID="Button1" runat="server" Text="获取 CKEditor 的值" OnClick="Button1_Click">
|
||||||
|
</x:Button>
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.UEDITOR_HOME_URL = '<%= ResolveUrl("~/ueditor/") %>';
|
||||||
|
</script>
|
||||||
|
<script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript" src="../ueditor/ueditor.config.js"></script>
|
||||||
|
<script type="text/javascript" src="../ueditor/ueditor.all.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var editor;
|
||||||
|
var containerClientID = '<%= ContentPanel1.ClientID %>';
|
||||||
|
function onReady() {
|
||||||
|
editor = new UE.ui.Editor({
|
||||||
|
initialFrameWidth: '100%',
|
||||||
|
initialFrameHeight: 300,
|
||||||
|
initialContent: '<p>关于FineUI<br>基于 ExtJS 的专业 ASP.NET 2.0 控件库。<br><br>FineUI的使命<br>创建 No JavaScript,No CSS,No UpdatePanel,No ViewState,No WebServices 的网站应用程序。<br><br>支持的浏览器<br>IE 7.0+、Firefox 3.6+、Chrome 3.0+、Opera 10.5+、Safari 3.0+<br><br>授权协议<br>Apache License 2.0 (Apache)<br><br>相关链接<br>论坛:http://fineui.com/bbs/<br>示例:http://fineui.com/demo/<br>文档:http://fineui.com/doc/<br>下载:http://fineui.codeplex.com/</p>',
|
||||||
|
focus: true
|
||||||
|
});
|
||||||
|
editor.render("UEditor1");
|
||||||
|
|
||||||
|
updateLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新外部容器的布局
|
||||||
|
function updateLayout() {
|
||||||
|
editorPromise(editor).then(function () {
|
||||||
|
window.setTimeout(function () {
|
||||||
|
X(containerClientID).updateLayout();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function editorPromise(editor) {
|
||||||
|
var dfd = $.Deferred();
|
||||||
|
|
||||||
|
if (editor.isReady) {
|
||||||
|
dfd.resolve();
|
||||||
|
} else {
|
||||||
|
editor.ready(function () {
|
||||||
|
dfd.resolve();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return dfd.promise();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 提交数据之前同步到表单隐藏字段
|
||||||
|
X.util.beforeAjaxPostBackScript = function () {
|
||||||
|
editor.sync();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 更新编辑器内容
|
||||||
|
function updateUEditor(content) {
|
||||||
|
editorPromise(editor).then(function () {
|
||||||
|
editor.setContent(content);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
41
FineUI.Examples/aspnet/ueditor.aspx.cs
Normal file
41
FineUI.Examples/aspnet/ueditor.aspx.cs
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class ueditor : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
//string content = "初始化内容";
|
||||||
|
//PageContext.RegisterStartupScript(String.Format("updateUEditor({0});", JsHelper.Enquote(content)));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string ueditorContent = Request.Form["UEditor1"].ToString();
|
||||||
|
Alert.ShowInTop(HttpUtility.HtmlEncode(ueditorContent));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string content = "<p><strong>FineUI</strong> - 基于 ExtJS 的专业 ASP.NET 控件库,拥有完善的 AJAX 支持和丰富的界面效果。</p>";
|
||||||
|
|
||||||
|
PageContext.RegisterStartupScript(String.Format("updateUEditor({0});", JsHelper.Enquote(content)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
60
FineUI.Examples/aspnet/ueditor.aspx.designer.cs
generated
Normal file
60
FineUI.Examples/aspnet/ueditor.aspx.designer.cs
generated
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class ueditor {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
}
|
||||||
|
}
|
151
FineUI.Examples/aspnet/ueditor_two.aspx
Normal file
151
FineUI.Examples/aspnet/ueditor_two.aspx
Normal file
@ -0,0 +1,151 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ueditor_two.aspx.cs" ValidateRequest="false"
|
||||||
|
Inherits="FineUI.Examples.aspnet.ueditor_two" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../ueditor/themes/default/ueditor.css" />
|
||||||
|
<style>
|
||||||
|
table.mytable {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.mytable td {
|
||||||
|
padding: 0;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.mytable td.first {
|
||||||
|
width: 85px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.mytable td.second {
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:SimpleForm ID="SimpleForm1" BodyPadding="5px" LabelWidth="80px" Width="900px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
Title="添加文章" runat="server">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="tbxTitle" Label="文章标题" Required="true" runat="server">
|
||||||
|
</x:TextBox>
|
||||||
|
<x:ContentPanel ID="ContentPanel1" runat="server" ShowBorder="false" ShowHeader="false">
|
||||||
|
<table class="mytable">
|
||||||
|
<tr>
|
||||||
|
<td class="first">文章正文: </td>
|
||||||
|
<td class="second">
|
||||||
|
<textarea name="UEditor1" id="UEditor1">
|
||||||
|
</textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="first" style="padding-top: 5px;">文章摘要:</td>
|
||||||
|
<td class="second" style="padding-top: 5px;">
|
||||||
|
<textarea name="UEditor2" id="UEditor2">
|
||||||
|
</textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</x:ContentPanel>
|
||||||
|
|
||||||
|
</Items>
|
||||||
|
<Toolbars>
|
||||||
|
<x:Toolbar runat="server" Position="Footer">
|
||||||
|
<Items>
|
||||||
|
<x:Button ID="Button1" runat="server" ValidateForms="SimpleForm1"
|
||||||
|
Text="获取文章内容" OnClick="Button1_Click">
|
||||||
|
</x:Button>
|
||||||
|
<x:Button ID="Button2" runat="server" Text="更新文章摘要" OnClick="Button2_Click">
|
||||||
|
</x:Button>
|
||||||
|
</Items>
|
||||||
|
</x:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
</x:SimpleForm>
|
||||||
|
<x:Label runat="server" ID="labResult" EncodeText="false">
|
||||||
|
</x:Label>
|
||||||
|
<br />
|
||||||
|
</form>
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.UEDITOR_HOME_URL = '<%= ResolveUrl("~/ueditor/") %>';
|
||||||
|
</script>
|
||||||
|
<script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript" src="../ueditor/ueditor.config.js"></script>
|
||||||
|
<script type="text/javascript" src="../ueditor/ueditor.all.min.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var editor1, editor2;
|
||||||
|
var formClientID = '<%= SimpleForm1.ClientID %>';
|
||||||
|
|
||||||
|
function onReady() {
|
||||||
|
editor1 = new UE.ui.Editor({
|
||||||
|
initialFrameWidth: '100%',
|
||||||
|
initialFrameHeight: 100,
|
||||||
|
initialContent: '<p>关于FineUI<br>基于 ExtJS 的专业 ASP.NET 2.0 控件库。<br><br>FineUI的使命<br>创建 No JavaScript,No CSS,No UpdatePanel,No ViewState,No WebServices 的网站应用程序。<br><br>支持的浏览器<br>IE 7.0+、Firefox 3.6+、Chrome 3.0+、Opera 10.5+、Safari 3.0+<br><br>授权协议<br>Apache License 2.0 (Apache)<br><br>相关链接<br>论坛:http://fineui.com/bbs/<br>示例:http://fineui.com/demo/<br>文档:http://fineui.com/doc/<br>下载:http://fineui.codeplex.com/</p>'
|
||||||
|
});
|
||||||
|
editor1.render("UEditor1");
|
||||||
|
|
||||||
|
editor2 = new UE.ui.Editor({
|
||||||
|
initialFrameWidth: '100%',
|
||||||
|
initialFrameHeight: 80,
|
||||||
|
initialContent: '',
|
||||||
|
toolbars: [['fullscreen', 'source', '|', 'undo', 'redo', '|',
|
||||||
|
'bold', 'italic', 'underline', 'strikethrough', 'superscript', 'subscript',
|
||||||
|
'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain']]
|
||||||
|
});
|
||||||
|
editor2.render("UEditor2");
|
||||||
|
|
||||||
|
updateLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function editorPromise(editor) {
|
||||||
|
var dfd = $.Deferred();
|
||||||
|
|
||||||
|
if (editor.isReady) {
|
||||||
|
dfd.resolve();
|
||||||
|
} else {
|
||||||
|
editor.ready(function () {
|
||||||
|
dfd.resolve();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return dfd.promise();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 提交数据之前同步到表单隐藏字段
|
||||||
|
X.util.beforeAjaxPostBackScript = function () {
|
||||||
|
editor1.sync();
|
||||||
|
editor2.sync();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 更新外部容器的布局
|
||||||
|
function updateLayout() {
|
||||||
|
$.when(editorPromise(editor1), editorPromise(editor2)).then(function () {
|
||||||
|
window.setTimeout(function () {
|
||||||
|
X(formClientID).updateLayout();
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新编辑器内容
|
||||||
|
function updateUEditor1(content) {
|
||||||
|
editorPromise(editor1).then(function () {
|
||||||
|
editor1.setContent(content);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateUEditor2(content) {
|
||||||
|
editorPromise(editor2).then(function () {
|
||||||
|
editor2.setContent(content);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
56
FineUI.Examples/aspnet/ueditor_two.aspx.cs
Normal file
56
FineUI.Examples/aspnet/ueditor_two.aspx.cs
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet
|
||||||
|
{
|
||||||
|
public partial class ueditor_two : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string editor1Content = Request.Form["UEditor1"].ToString();
|
||||||
|
string editor2Content = Request.Form["UEditor2"].ToString();
|
||||||
|
if (String.IsNullOrEmpty(editor1Content))
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("文章正文不能为空!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Alert.ShowInTop("文章标题:" + tbxTitle.Text +
|
||||||
|
"<br/>" + "文章正文:" + HttpUtility.HtmlEncode(editor1Content) +
|
||||||
|
"<br/>" + "文章摘要:" + HttpUtility.HtmlEncode(editor2Content));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
string content = Request.Form["UEditor1"].ToString();
|
||||||
|
Regex regex = new Regex(@"<[^>]+>|</[^>]+>");
|
||||||
|
content = regex.Replace(content, "");
|
||||||
|
if (content.Length > 100)
|
||||||
|
{
|
||||||
|
content = content.Substring(0, 97) + "...";
|
||||||
|
}
|
||||||
|
|
||||||
|
PageContext.RegisterStartupScript(String.Format("updateUEditor2({0});", JsHelper.Enquote(content)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
87
FineUI.Examples/aspnet/ueditor_two.aspx.designer.cs
generated
Normal file
87
FineUI.Examples/aspnet/ueditor_two.aspx.designer.cs
generated
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.aspnet {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class ueditor_two {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxTitle 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox tbxTitle;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ContentPanel1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.ContentPanel ContentPanel1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// labResult 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Label labResult;
|
||||||
|
}
|
||||||
|
}
|
79
FineUI.Examples/autocomplete/custom_display.aspx
Normal file
79
FineUI.Examples/autocomplete/custom_display.aspx
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="custom_display.aspx.cs"
|
||||||
|
Inherits="FineUI.Examples.autocomplete.custom_display" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../jqueryui/css/ui-lightness/jquery-ui-1.9.2.custom.min.css" />
|
||||||
|
<style>
|
||||||
|
.autocomplete-item-title
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:SimpleForm ID="SimpleForm1" runat="server" LabelWidth="60px" Width="600px" BodyPadding="5px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
Title="简单表单">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="TextBox1" runat="server" Label="标题" EmptyText="输入字母 j 试试">
|
||||||
|
</x:TextBox>
|
||||||
|
<x:TextBox ID="TextBox2" Label="值" runat="server">
|
||||||
|
</x:TextBox>
|
||||||
|
<x:TextBox ID="TextBox3" Label="描述" runat="server">
|
||||||
|
</x:TextBox>
|
||||||
|
</Items>
|
||||||
|
</x:SimpleForm>
|
||||||
|
</form>
|
||||||
|
<script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||||
|
<script src="../jqueryui/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function onReady() {
|
||||||
|
var textbox1ID = '<%= TextBox1.ClientID %>';
|
||||||
|
var textbox2ID = '<%= TextBox2.ClientID %>';
|
||||||
|
var textbox3ID = '<%= TextBox3.ClientID %>';
|
||||||
|
|
||||||
|
var projects = [
|
||||||
|
{
|
||||||
|
value: "jquery",
|
||||||
|
label: "jQuery",
|
||||||
|
desc: "the write less, do more, JavaScript library"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "jquery-ui",
|
||||||
|
label: "jQuery UI",
|
||||||
|
desc: "the official user interface library for jQuery"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "sizzlejs",
|
||||||
|
label: "Sizzle JS",
|
||||||
|
desc: "a pure-JavaScript CSS selector engine"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
$('#' + textbox1ID + ' input').autocomplete({
|
||||||
|
minLength: 0,
|
||||||
|
source: projects,
|
||||||
|
select: function (event, ui) {
|
||||||
|
var $this = $(this);
|
||||||
|
$this.val(ui.item.label);
|
||||||
|
$('#' + textbox2ID).val(ui.item.value);
|
||||||
|
$('#' + textbox3ID).val(ui.item.desc);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}).data("autocomplete")._renderItem = function (ul, item) {
|
||||||
|
return $("<li>").data("item.autocomplete", item)
|
||||||
|
.append("<a><span class='autocomplete-item-title'>" + item.label + "</span><br/>" + item.desc + "</a>")
|
||||||
|
.appendTo(ul);
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
24
FineUI.Examples/autocomplete/custom_display.aspx.cs
Normal file
24
FineUI.Examples/autocomplete/custom_display.aspx.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete
|
||||||
|
{
|
||||||
|
public partial class custom_display : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
69
FineUI.Examples/autocomplete/custom_display.aspx.designer.cs
generated
Normal file
69
FineUI.Examples/autocomplete/custom_display.aspx.designer.cs
generated
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class custom_display {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox TextBox1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox TextBox2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox TextBox3;
|
||||||
|
}
|
||||||
|
}
|
62
FineUI.Examples/autocomplete/email.aspx
Normal file
62
FineUI.Examples/autocomplete/email.aspx
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="email.aspx.cs" Inherits="FineUI.Examples.autocomplete.email" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../jqueryui/css/ui-lightness/jquery-ui-1.9.2.custom.min.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:SimpleForm ID="SimpleForm1" runat="server" Width="600px" BodyPadding="5px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
Title="简单表单">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="TextBox1" runat="server" ShowLabel="false" EmptyText="随便输入个字母试试">
|
||||||
|
</x:TextBox>
|
||||||
|
</Items>
|
||||||
|
</x:SimpleForm>
|
||||||
|
</form>
|
||||||
|
<script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||||
|
<script src="../jqueryui/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function onReady() {
|
||||||
|
var textbox1ID = '<%= TextBox1.ClientID %>';
|
||||||
|
|
||||||
|
var availableTags = [
|
||||||
|
"qq.com",
|
||||||
|
"163.com",
|
||||||
|
"gmail.com",
|
||||||
|
"outlook.com",
|
||||||
|
"126.com",
|
||||||
|
"sina.com",
|
||||||
|
"yahoo.com",
|
||||||
|
"sohu.com",
|
||||||
|
"foxmail.com",
|
||||||
|
"live.com",
|
||||||
|
"mail.ustc.edu.cn"];
|
||||||
|
|
||||||
|
|
||||||
|
function getFullEmails(name) {
|
||||||
|
var emails = [];
|
||||||
|
for (var i = 0, count = availableTags.length; i < count; i++) {
|
||||||
|
emails.push(name + "@" + availableTags[i]);
|
||||||
|
}
|
||||||
|
return emails;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#' + textbox1ID + ' input').autocomplete({
|
||||||
|
source: function (request, response) {
|
||||||
|
if (request.term.indexOf('@') === -1) {
|
||||||
|
response(getFullEmails(request.term));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
24
FineUI.Examples/autocomplete/email.aspx.cs
Normal file
24
FineUI.Examples/autocomplete/email.aspx.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete
|
||||||
|
{
|
||||||
|
public partial class email : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
51
FineUI.Examples/autocomplete/email.aspx.designer.cs
generated
Normal file
51
FineUI.Examples/autocomplete/email.aspx.designer.cs
generated
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class email {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox TextBox1;
|
||||||
|
}
|
||||||
|
}
|
60
FineUI.Examples/autocomplete/inline.aspx
Normal file
60
FineUI.Examples/autocomplete/inline.aspx
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="inline.aspx.cs" Inherits="FineUI.Examples.autocomplete.inline" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../jqueryui/css/ui-lightness/jquery-ui-1.9.2.custom.min.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:SimpleForm ID="SimpleForm1" runat="server" Width="600px" BodyPadding="5px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
Title="简单表单">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="TextBox1" runat="server" ShowLabel="false" EmptyText="输入字母 a 试试">
|
||||||
|
</x:TextBox>
|
||||||
|
</Items>
|
||||||
|
</x:SimpleForm>
|
||||||
|
</form>
|
||||||
|
<script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||||
|
<script src="../jqueryui/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function onReady() {
|
||||||
|
var textbox1ID = '<%= TextBox1.ClientID %>';
|
||||||
|
|
||||||
|
var availableTags = [
|
||||||
|
"ActionScript",
|
||||||
|
"AppleScript",
|
||||||
|
"Asp",
|
||||||
|
"BASIC",
|
||||||
|
"C",
|
||||||
|
"C++",
|
||||||
|
"Clojure",
|
||||||
|
"COBOL",
|
||||||
|
"ColdFusion",
|
||||||
|
"Erlang",
|
||||||
|
"Fortran",
|
||||||
|
"Groovy",
|
||||||
|
"Haskell",
|
||||||
|
"Java",
|
||||||
|
"JavaScript",
|
||||||
|
"Lisp",
|
||||||
|
"Perl",
|
||||||
|
"PHP",
|
||||||
|
"Python",
|
||||||
|
"Ruby",
|
||||||
|
"Scala",
|
||||||
|
"Scheme"];
|
||||||
|
|
||||||
|
$('#' + textbox1ID + ' input').autocomplete({
|
||||||
|
source: availableTags
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
24
FineUI.Examples/autocomplete/inline.aspx.cs
Normal file
24
FineUI.Examples/autocomplete/inline.aspx.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete
|
||||||
|
{
|
||||||
|
public partial class inline : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
51
FineUI.Examples/autocomplete/inline.aspx.designer.cs
generated
Normal file
51
FineUI.Examples/autocomplete/inline.aspx.designer.cs
generated
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class inline {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox TextBox1;
|
||||||
|
}
|
||||||
|
}
|
98
FineUI.Examples/autocomplete/multi_values.aspx
Normal file
98
FineUI.Examples/autocomplete/multi_values.aspx
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="multi_values.aspx.cs" Inherits="FineUI.Examples.autocomplete.multi_values" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../jqueryui/css/ui-lightness/jquery-ui-1.9.2.custom.min.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:SimpleForm ID="SimpleForm1" runat="server" LabelWidth="60px" Width="600px" BodyPadding="5px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
Title="简单表单">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="TextBox1" runat="server" Label="标题" EmptyText="输入字母 a 试试,可以输入多个值">
|
||||||
|
</x:TextBox>
|
||||||
|
</Items>
|
||||||
|
</x:SimpleForm>
|
||||||
|
</form>
|
||||||
|
<script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||||
|
<script src="../jqueryui/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function onReady() {
|
||||||
|
var textbox1ID = '<%= TextBox1.ClientID %>';
|
||||||
|
|
||||||
|
var availableTags = [
|
||||||
|
"ActionScript",
|
||||||
|
"AppleScript",
|
||||||
|
"Asp",
|
||||||
|
"BASIC",
|
||||||
|
"C",
|
||||||
|
"C++",
|
||||||
|
"Clojure",
|
||||||
|
"COBOL",
|
||||||
|
"ColdFusion",
|
||||||
|
"Erlang",
|
||||||
|
"Fortran",
|
||||||
|
"Groovy",
|
||||||
|
"Haskell",
|
||||||
|
"Java",
|
||||||
|
"JavaScript",
|
||||||
|
"Lisp",
|
||||||
|
"Perl",
|
||||||
|
"PHP",
|
||||||
|
"Python",
|
||||||
|
"Ruby",
|
||||||
|
"Scala",
|
||||||
|
"Scheme"
|
||||||
|
];
|
||||||
|
|
||||||
|
// 将字符串 val 以逗号空格作为分隔符,分隔成数组
|
||||||
|
function split(val) {
|
||||||
|
return val.split(/,\s*/);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取得以逗号空格为分隔符的最后一个单词
|
||||||
|
// 比如,输入为 "C++, C#, JavaScript" 则输入出 "JavaScript"
|
||||||
|
function extractLast(term) {
|
||||||
|
return split(term).pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#' + textbox1ID + ' input').bind("keydown", function (event) {
|
||||||
|
// 通过 Tab 选择一项时,不会使当前文本框失去焦点
|
||||||
|
if (event.keyCode === $.ui.keyCode.TAB &&
|
||||||
|
$(this).data("autocomplete").menu.active) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}).autocomplete({
|
||||||
|
minLength: 0,
|
||||||
|
source: function (request, response) {
|
||||||
|
// 将最后一个单词作为输入值,从列表中过滤出备选项
|
||||||
|
response($.ui.autocomplete.filter(
|
||||||
|
availableTags, extractLast(request.term)));
|
||||||
|
},
|
||||||
|
focus: function () {
|
||||||
|
// 阻止某一项获得焦点时,更新文本框的值
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
select: function (event, ui) {
|
||||||
|
var terms = split(this.value);
|
||||||
|
// 移除用户正在输入项
|
||||||
|
terms.pop();
|
||||||
|
// 添加用户选择的项
|
||||||
|
terms.push(ui.item.value);
|
||||||
|
// 添加占位符,确保字符串的最后以逗号空格结束
|
||||||
|
terms.push("");
|
||||||
|
this.value = terms.join(", ");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
24
FineUI.Examples/autocomplete/multi_values.aspx.cs
Normal file
24
FineUI.Examples/autocomplete/multi_values.aspx.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete
|
||||||
|
{
|
||||||
|
public partial class multi_values : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
51
FineUI.Examples/autocomplete/multi_values.aspx.designer.cs
generated
Normal file
51
FineUI.Examples/autocomplete/multi_values.aspx.designer.cs
generated
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class multi_values {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox TextBox1;
|
||||||
|
}
|
||||||
|
}
|
87
FineUI.Examples/autocomplete/multi_values_remote.aspx
Normal file
87
FineUI.Examples/autocomplete/multi_values_remote.aspx
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="multi_values_remote.aspx.cs"
|
||||||
|
Inherits="FineUI.Examples.autocomplete.multi_values_remote" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../jqueryui/css/ui-lightness/jquery-ui-1.9.2.custom.min.css" />
|
||||||
|
<style>
|
||||||
|
.ui-autocomplete-loading {
|
||||||
|
background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:SimpleForm ID="SimpleForm1" runat="server" LabelWidth="60px" Width="600px" BodyPadding="5px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
Title="简单表单">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="TextBox1" runat="server" Label="标题" EmptyText="输入字母 a 试试,可以输入多个值">
|
||||||
|
</x:TextBox>
|
||||||
|
</Items>
|
||||||
|
</x:SimpleForm>
|
||||||
|
</form>
|
||||||
|
<script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||||
|
<script src="../jqueryui/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function onReady() {
|
||||||
|
var textbox1ID = '<%= TextBox1.ClientID %>';
|
||||||
|
|
||||||
|
|
||||||
|
// 将字符串 val 以逗号空格作为分隔符,分隔成数组
|
||||||
|
function split(val) {
|
||||||
|
return val.split(/,\s*/);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 取得以逗号空格为分隔符的最后一个单词
|
||||||
|
// 比如,输入为 "C++, C#, JavaScript" 则输入出 "JavaScript"
|
||||||
|
function extractLast(term) {
|
||||||
|
return split(term).pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#' + textbox1ID + ' input').bind("keydown", function (event) {
|
||||||
|
// 通过 Tab 选择一项时,不会使当前文本框失去焦点
|
||||||
|
if (event.keyCode === $.ui.keyCode.TAB &&
|
||||||
|
$(this).data("autocomplete").menu.active) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
}).autocomplete({
|
||||||
|
minLength: 0,
|
||||||
|
source: function (request, response) {
|
||||||
|
$.getJSON("./search.ashx", {
|
||||||
|
term: extractLast(request.term)
|
||||||
|
}, response);
|
||||||
|
},
|
||||||
|
search: function () {
|
||||||
|
// 自定义的minLength(如果要限制两个字符才提示,把下面的1改为2即可)
|
||||||
|
var term = extractLast(this.value);
|
||||||
|
if (term.length < 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
focus: function () {
|
||||||
|
// 阻止某一项获得焦点时,更新文本框的值
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
select: function (event, ui) {
|
||||||
|
var terms = split(this.value);
|
||||||
|
// 移除用户正在输入项
|
||||||
|
terms.pop();
|
||||||
|
// 添加用户选择的项
|
||||||
|
terms.push(ui.item.value);
|
||||||
|
// 添加占位符,确保字符串的最后以逗号空格结束
|
||||||
|
terms.push("");
|
||||||
|
this.value = terms.join(", ");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
24
FineUI.Examples/autocomplete/multi_values_remote.aspx.cs
Normal file
24
FineUI.Examples/autocomplete/multi_values_remote.aspx.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete
|
||||||
|
{
|
||||||
|
public partial class multi_values_remote : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
51
FineUI.Examples/autocomplete/multi_values_remote.aspx.designer.cs
generated
Normal file
51
FineUI.Examples/autocomplete/multi_values_remote.aspx.designer.cs
generated
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class multi_values_remote {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox TextBox1;
|
||||||
|
}
|
||||||
|
}
|
56
FineUI.Examples/autocomplete/remote_with_cache.aspx
Normal file
56
FineUI.Examples/autocomplete/remote_with_cache.aspx
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="remote_with_cache.aspx.cs"
|
||||||
|
Inherits="FineUI.Examples.autocomplete.remote_with_cache" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="../jqueryui/css/ui-lightness/jquery-ui-1.9.2.custom.min.css" />
|
||||||
|
<style>
|
||||||
|
.ui-autocomplete-loading {
|
||||||
|
background: white url('../images/ui-anim_basic_16x16.gif') right center no-repeat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:SimpleForm ID="SimpleForm1" runat="server" LabelWidth="60px" Width="600px" BodyPadding="5px" EnableFrame="true" EnableCollapse="true"
|
||||||
|
Title="简单表单">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="TextBox1" runat="server" Label="标题" EmptyText="输入字母 ja 或者 sc 试试,必须输入两个字符后才有自动提示">
|
||||||
|
</x:TextBox>
|
||||||
|
</Items>
|
||||||
|
</x:SimpleForm>
|
||||||
|
</form>
|
||||||
|
<script src="../jqueryui/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||||
|
<script src="../jqueryui/js/jquery-ui-1.9.2.custom.min.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function onReady() {
|
||||||
|
var textbox1ID = '<%= TextBox1.ClientID %>';
|
||||||
|
|
||||||
|
var cache = {};
|
||||||
|
|
||||||
|
$('#' + textbox1ID + ' input').autocomplete({
|
||||||
|
minLength: 2,
|
||||||
|
source: function (request, response) {
|
||||||
|
var term = request.term;
|
||||||
|
if (term in cache) {
|
||||||
|
response(cache[term]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.getJSON("search.ashx", request, function (data, status, xhr) {
|
||||||
|
cache[term] = data;
|
||||||
|
response(data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
24
FineUI.Examples/autocomplete/remote_with_cache.aspx.cs
Normal file
24
FineUI.Examples/autocomplete/remote_with_cache.aspx.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete
|
||||||
|
{
|
||||||
|
public partial class remote_with_cache : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
51
FineUI.Examples/autocomplete/remote_with_cache.aspx.designer.cs
generated
Normal file
51
FineUI.Examples/autocomplete/remote_with_cache.aspx.designer.cs
generated
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class remote_with_cache {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// TextBox1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox TextBox1;
|
||||||
|
}
|
||||||
|
}
|
1
FineUI.Examples/autocomplete/search.ashx
Normal file
1
FineUI.Examples/autocomplete/search.ashx
Normal file
@ -0,0 +1 @@
|
|||||||
|
<%@ WebHandler Language="C#" CodeBehind="search.ashx.cs" Class="FineUI.Examples.autocomplete.search" %>
|
72
FineUI.Examples/autocomplete/search.ashx.cs
Normal file
72
FineUI.Examples/autocomplete/search.ashx.cs
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.autocomplete
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// search 的摘要说明
|
||||||
|
/// </summary>
|
||||||
|
public class search : IHttpHandler
|
||||||
|
{
|
||||||
|
private static readonly string[] LANGUAGES = new string[]{
|
||||||
|
"ActionScript",
|
||||||
|
"AppleScript",
|
||||||
|
"Asp",
|
||||||
|
"BASIC",
|
||||||
|
"C",
|
||||||
|
"C++",
|
||||||
|
"Clojure",
|
||||||
|
"COBOL",
|
||||||
|
"ColdFusion",
|
||||||
|
"Erlang",
|
||||||
|
"Fortran",
|
||||||
|
"Groovy",
|
||||||
|
"Haskell",
|
||||||
|
"Java",
|
||||||
|
"JavaScript",
|
||||||
|
"Lisp",
|
||||||
|
"Perl",
|
||||||
|
"PHP",
|
||||||
|
"Python",
|
||||||
|
"Ruby",
|
||||||
|
"Scala",
|
||||||
|
"Scheme"
|
||||||
|
};
|
||||||
|
|
||||||
|
public void ProcessRequest(HttpContext context)
|
||||||
|
{
|
||||||
|
//System.Threading.Thread.Sleep(2000);
|
||||||
|
|
||||||
|
String term = context.Request.QueryString["term"];
|
||||||
|
if (!String.IsNullOrEmpty(term))
|
||||||
|
{
|
||||||
|
term = term.ToLower();
|
||||||
|
|
||||||
|
JArray ja = new JArray();
|
||||||
|
foreach (string lang in LANGUAGES)
|
||||||
|
{
|
||||||
|
if (lang.ToLower().Contains(term))
|
||||||
|
{
|
||||||
|
ja.Add(lang);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
context.Response.ContentType = "text/plain";
|
||||||
|
context.Response.Write(ja.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsReusable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
198
FineUI.Examples/basic/Captcha/CaptchaImage.cs
Normal file
198
FineUI.Examples/basic/Captcha/CaptchaImage.cs
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Drawing2D;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
using System.Drawing.Text;
|
||||||
|
|
||||||
|
|
||||||
|
namespace CaptchaImage
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 这个生成验证码图片的代码来自:http://www.codeproject.com/KB/aspnet/CaptchaImage.aspx
|
||||||
|
/// </summary>
|
||||||
|
public class CaptchaImage
|
||||||
|
{
|
||||||
|
// Public properties (all read-only).
|
||||||
|
public string Text
|
||||||
|
{
|
||||||
|
get { return this.text; }
|
||||||
|
}
|
||||||
|
public Bitmap Image
|
||||||
|
{
|
||||||
|
get { return this.image; }
|
||||||
|
}
|
||||||
|
public int Width
|
||||||
|
{
|
||||||
|
get { return this.width; }
|
||||||
|
}
|
||||||
|
public int Height
|
||||||
|
{
|
||||||
|
get { return this.height; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Internal properties.
|
||||||
|
private string text;
|
||||||
|
private int width;
|
||||||
|
private int height;
|
||||||
|
private string familyName;
|
||||||
|
private Bitmap image;
|
||||||
|
|
||||||
|
// For generating random numbers.
|
||||||
|
private Random random = new Random();
|
||||||
|
|
||||||
|
// ====================================================================
|
||||||
|
// Initializes a new instance of the CaptchaImage class using the
|
||||||
|
// specified text, width and height.
|
||||||
|
// ====================================================================
|
||||||
|
public CaptchaImage(string s, int width, int height)
|
||||||
|
{
|
||||||
|
this.text = s;
|
||||||
|
this.SetDimensions(width, height);
|
||||||
|
this.GenerateImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================================================================
|
||||||
|
// Initializes a new instance of the CaptchaImage class using the
|
||||||
|
// specified text, width, height and font family.
|
||||||
|
// ====================================================================
|
||||||
|
public CaptchaImage(string s, int width, int height, string familyName)
|
||||||
|
{
|
||||||
|
this.text = s;
|
||||||
|
this.SetDimensions(width, height);
|
||||||
|
this.SetFamilyName(familyName);
|
||||||
|
this.GenerateImage();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================================================================
|
||||||
|
// This member overrides Object.Finalize.
|
||||||
|
// ====================================================================
|
||||||
|
~CaptchaImage()
|
||||||
|
{
|
||||||
|
Dispose(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================================================================
|
||||||
|
// Releases all resources used by this object.
|
||||||
|
// ====================================================================
|
||||||
|
public void Dispose()
|
||||||
|
{
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
this.Dispose(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================================================================
|
||||||
|
// Custom Dispose method to clean up unmanaged resources.
|
||||||
|
// ====================================================================
|
||||||
|
protected virtual void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing)
|
||||||
|
// Dispose of the bitmap.
|
||||||
|
this.image.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================================================================
|
||||||
|
// Sets the image width and height.
|
||||||
|
// ====================================================================
|
||||||
|
private void SetDimensions(int width, int height)
|
||||||
|
{
|
||||||
|
// Check the width and height.
|
||||||
|
if (width <= 0)
|
||||||
|
throw new ArgumentOutOfRangeException("width", width, "Argument out of range, must be greater than zero.");
|
||||||
|
if (height <= 0)
|
||||||
|
throw new ArgumentOutOfRangeException("height", height, "Argument out of range, must be greater than zero.");
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================================================================
|
||||||
|
// Sets the font used for the image text.
|
||||||
|
// ====================================================================
|
||||||
|
private void SetFamilyName(string familyName)
|
||||||
|
{
|
||||||
|
// If the named font is not installed, default to a system font.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Font font = new Font(this.familyName, 13F);
|
||||||
|
this.familyName = familyName;
|
||||||
|
font.Dispose();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
this.familyName = System.Drawing.FontFamily.GenericSerif.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ====================================================================
|
||||||
|
// Creates the bitmap image.
|
||||||
|
// ====================================================================
|
||||||
|
private void GenerateImage()
|
||||||
|
{
|
||||||
|
// Create a new 32-bit bitmap image.
|
||||||
|
Bitmap bitmap = new Bitmap(this.width, this.height, PixelFormat.Format32bppArgb);
|
||||||
|
|
||||||
|
// Create a graphics object for drawing.
|
||||||
|
Graphics g = Graphics.FromImage(bitmap);
|
||||||
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
||||||
|
Rectangle rect = new Rectangle(0, 0, this.width, this.height);
|
||||||
|
|
||||||
|
// Fill in the background.
|
||||||
|
HatchBrush hatchBrush = new HatchBrush(HatchStyle.SmallConfetti, Color.LightGray, Color.White);
|
||||||
|
g.FillRectangle(hatchBrush, rect);
|
||||||
|
|
||||||
|
// Set up the text font.
|
||||||
|
SizeF size;
|
||||||
|
float fontSize = rect.Height + 1;
|
||||||
|
Font font;
|
||||||
|
// Adjust the font size until the text fits within the image.
|
||||||
|
do
|
||||||
|
{
|
||||||
|
fontSize--;
|
||||||
|
font = new Font(this.familyName, fontSize, FontStyle.Bold);
|
||||||
|
size = g.MeasureString(this.text, font);
|
||||||
|
} while (size.Width > rect.Width);
|
||||||
|
|
||||||
|
// Set up the text format.
|
||||||
|
StringFormat format = new StringFormat();
|
||||||
|
format.Alignment = StringAlignment.Center;
|
||||||
|
format.LineAlignment = StringAlignment.Center;
|
||||||
|
|
||||||
|
// Create a path using the text and warp it randomly.
|
||||||
|
GraphicsPath path = new GraphicsPath();
|
||||||
|
path.AddString(this.text, font.FontFamily, (int)font.Style, font.Size, rect, format);
|
||||||
|
float v = 8F;
|
||||||
|
PointF[] points =
|
||||||
|
{
|
||||||
|
new PointF(this.random.Next(rect.Width) / v, this.random.Next(rect.Height) / v),
|
||||||
|
new PointF(rect.Width - this.random.Next(rect.Width) / v, this.random.Next(rect.Height) / v),
|
||||||
|
new PointF(this.random.Next(rect.Width) / v, rect.Height - this.random.Next(rect.Height) / v),
|
||||||
|
new PointF(rect.Width - this.random.Next(rect.Width) / v, rect.Height - this.random.Next(rect.Height) / v)
|
||||||
|
};
|
||||||
|
Matrix matrix = new Matrix();
|
||||||
|
matrix.Translate(0F, 0F);
|
||||||
|
path.Warp(points, rect, matrix, WarpMode.Perspective, 0F);
|
||||||
|
|
||||||
|
// Draw the text.
|
||||||
|
hatchBrush = new HatchBrush(HatchStyle.LargeConfetti, Color.Green, Color.DarkGray);
|
||||||
|
g.FillPath(hatchBrush, path);
|
||||||
|
|
||||||
|
// Add some random noise.
|
||||||
|
int m = Math.Max(rect.Width, rect.Height);
|
||||||
|
for (int i = 0; i < (int)(rect.Width * rect.Height / 30F); i++)
|
||||||
|
{
|
||||||
|
int x = this.random.Next(rect.Width);
|
||||||
|
int y = this.random.Next(rect.Height);
|
||||||
|
int w = this.random.Next(m / 50);
|
||||||
|
int h = this.random.Next(m / 50);
|
||||||
|
g.FillEllipse(hatchBrush, x, y, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clean up.
|
||||||
|
font.Dispose();
|
||||||
|
hatchBrush.Dispose();
|
||||||
|
g.Dispose();
|
||||||
|
|
||||||
|
// Set the image.
|
||||||
|
this.image = bitmap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1
FineUI.Examples/basic/Captcha/captcha.ashx
Normal file
1
FineUI.Examples/basic/Captcha/captcha.ashx
Normal file
@ -0,0 +1 @@
|
|||||||
|
<%@ WebHandler Language="C#" CodeBehind="captcha.ashx.cs" Class="FineUI.Examples.basic.Captcha.captcha" %>
|
53
FineUI.Examples/basic/Captcha/captcha.ashx.cs
Normal file
53
FineUI.Examples/basic/Captcha/captcha.ashx.cs
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.Services;
|
||||||
|
using System.Web.SessionState;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic.Captcha
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 生成验证码图片
|
||||||
|
/// </summary>
|
||||||
|
[WebService(Namespace = "http://tempuri.org/")]
|
||||||
|
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
|
||||||
|
public class captcha : IHttpHandler, IReadOnlySessionState
|
||||||
|
{
|
||||||
|
|
||||||
|
public void ProcessRequest(HttpContext context)
|
||||||
|
{
|
||||||
|
int width = 200;
|
||||||
|
int height = 30;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
width = Convert.ToInt32(context.Request.QueryString["w"]);
|
||||||
|
height = Convert.ToInt32(context.Request.QueryString["h"]);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
// Nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从 Session 中读取验证码,并创建图片
|
||||||
|
CaptchaImage.CaptchaImage ci = new CaptchaImage.CaptchaImage(context.Session["CaptchaImageText"].ToString(), width, height, "Consolas");
|
||||||
|
|
||||||
|
// 输出图片
|
||||||
|
context.Response.Clear();
|
||||||
|
context.Response.ContentType = "image/jpeg";
|
||||||
|
|
||||||
|
ci.Image.Save(context.Response.OutputStream, ImageFormat.Jpeg);
|
||||||
|
|
||||||
|
ci.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsReusable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
FineUI.Examples/basic/hello.aspx
Normal file
19
FineUI.Examples/basic/hello.aspx
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="hello.aspx.cs" Inherits="FineUI.Examples.basic.hello" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:Button Text="点击弹出对话框" runat="server" ID="btnHello" OnClick="btnHello_Click">
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
<x:Button Text="在顶层窗口弹出对话框" runat="server" ID="btnHello2" OnClick="btnHello2_Click">
|
||||||
|
</x:Button>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
26
FineUI.Examples/basic/hello.aspx.cs
Normal file
26
FineUI.Examples/basic/hello.aspx.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic
|
||||||
|
{
|
||||||
|
public partial class hello : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnHello_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.Show("你好 FineUI!", MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnHello2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("你好 FineUI!", MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
51
FineUI.Examples/basic/hello.aspx.designer.cs
generated
Normal file
51
FineUI.Examples/basic/hello.aspx.designer.cs
generated
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class hello {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnHello 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnHello;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnHello2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnHello2;
|
||||||
|
}
|
||||||
|
}
|
14
FineUI.Examples/basic/hello_aspnet.aspx
Normal file
14
FineUI.Examples/basic/hello_aspnet.aspx
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="hello_aspnet.aspx.cs" Inherits="FineUI.Examples.basic.hello_aspnet" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<asp:Button Text="点击弹出对话框" runat="server" ID="btnHello" OnClick="btnHello_Click" />
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
21
FineUI.Examples/basic/hello_aspnet.aspx.cs
Normal file
21
FineUI.Examples/basic/hello_aspnet.aspx.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic
|
||||||
|
{
|
||||||
|
public partial class hello_aspnet : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnHello_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Page.ClientScript.RegisterStartupScript(this.GetType(), "alert_hello", "alert('你好 Asp.Net!');", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
33
FineUI.Examples/basic/hello_aspnet.aspx.designer.cs
generated
Normal file
33
FineUI.Examples/basic/hello_aspnet.aspx.designer.cs
generated
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class hello_aspnet {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnHello 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Button btnHello;
|
||||||
|
}
|
||||||
|
}
|
42
FineUI.Examples/basic/login.aspx
Normal file
42
FineUI.Examples/basic/login.aspx
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="FineUI.Examples.basic.login" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
用户名:admin
|
||||||
|
<br />
|
||||||
|
密码:admin
|
||||||
|
<br />
|
||||||
|
注意:在任意文本输入框内按回车键,都会触发按钮(Type="Submit")的表单提交事件。
|
||||||
|
<x:Window ID="Window1" runat="server" Title="登录表单" IsModal="false" EnableClose="false"
|
||||||
|
WindowPosition="GoldenSection" Width="350px" FooterBarAlign="Right">
|
||||||
|
<Items>
|
||||||
|
<x:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="false" BodyPadding="10px"
|
||||||
|
LabelWidth="60px" ShowHeader="false">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="tbxUserName" Label="用户名" Required="true" runat="server">
|
||||||
|
</x:TextBox>
|
||||||
|
<x:TextBox ID="tbxPassword" Label="密码" TextMode="Password" Required="true" runat="server">
|
||||||
|
</x:TextBox>
|
||||||
|
</Items>
|
||||||
|
</x:SimpleForm>
|
||||||
|
</Items>
|
||||||
|
<Toolbars>
|
||||||
|
<x:Toolbar ID="Toolbar1" runat="server" Position="Footer">
|
||||||
|
<Items>
|
||||||
|
<x:Button ID="btnLogin" Text="登录" Type="Submit" ValidateForms="SimpleForm1" ValidateTarget="Top"
|
||||||
|
runat="server" OnClick="btnLogin_Click">
|
||||||
|
</x:Button>
|
||||||
|
</Items>
|
||||||
|
</x:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
</x:Window>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
31
FineUI.Examples/basic/login.aspx.cs
Normal file
31
FineUI.Examples/basic/login.aspx.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic
|
||||||
|
{
|
||||||
|
public partial class login : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnLogin_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (tbxUserName.Text == "admin" && tbxPassword.Text == "admin")
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("成功登录!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("用户名或密码错误!", MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
87
FineUI.Examples/basic/login.aspx.designer.cs
generated
Normal file
87
FineUI.Examples/basic/login.aspx.designer.cs
generated
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class login {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Window1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Window Window1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxUserName 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox tbxUserName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxPassword 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox tbxPassword;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnLogin 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnLogin;
|
||||||
|
}
|
||||||
|
}
|
55
FineUI.Examples/basic/login_captcha.aspx
Normal file
55
FineUI.Examples/basic/login_captcha.aspx
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login_captcha.aspx.cs"
|
||||||
|
Inherits="FineUI.Examples.basic.login_captcha" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
用户名:admin
|
||||||
|
<br />
|
||||||
|
密码:admin
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Window ID="Window1" runat="server" Title="登录表单" IsModal="false" EnableClose="false"
|
||||||
|
WindowPosition="GoldenSection" Width="350px">
|
||||||
|
<Items>
|
||||||
|
<x:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="false" BodyPadding="10px"
|
||||||
|
LabelWidth="60px" ShowHeader="false">
|
||||||
|
<Items>
|
||||||
|
<x:TextBox ID="tbxUserName" Label="用户名" Required="true" runat="server">
|
||||||
|
</x:TextBox>
|
||||||
|
<x:TextBox ID="tbxPassword" Label="密码" TextMode="Password" Required="true" runat="server">
|
||||||
|
</x:TextBox>
|
||||||
|
<x:TextBox ID="tbxCaptcha" Label="验证码" Required="true" runat="server">
|
||||||
|
</x:TextBox>
|
||||||
|
<x:Panel CssStyle="padding-left:65px;" ShowBorder="false" ShowHeader="false"
|
||||||
|
runat="server">
|
||||||
|
<Items>
|
||||||
|
<x:Image ID="imgCaptcha" CssStyle="float:left;width:160px;" runat="server" ShowEmptyLabel="true">
|
||||||
|
</x:Image>
|
||||||
|
<x:LinkButton CssStyle="float:left;padding-top:8px;" ID="btnRefresh" Text="看不清?"
|
||||||
|
runat="server" OnClick="btnRefresh_Click">
|
||||||
|
</x:LinkButton>
|
||||||
|
</Items>
|
||||||
|
</x:Panel>
|
||||||
|
</Items>
|
||||||
|
</x:SimpleForm>
|
||||||
|
</Items>
|
||||||
|
<Toolbars>
|
||||||
|
<x:Toolbar ID="Toolbar1" runat="server" Position="Footer">
|
||||||
|
<Items>
|
||||||
|
<x:Button ID="btnLogin" Text="登录" Type="Submit" ValidateForms="SimpleForm1" ValidateTarget="Top"
|
||||||
|
runat="server" OnClick="btnLogin_Click">
|
||||||
|
</x:Button>
|
||||||
|
</Items>
|
||||||
|
</x:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
</x:Window>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
76
FineUI.Examples/basic/login_captcha.aspx.cs
Normal file
76
FineUI.Examples/basic/login_captcha.aspx.cs
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic
|
||||||
|
{
|
||||||
|
public partial class login_captcha : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
LoadData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void LoadData()
|
||||||
|
{
|
||||||
|
InitCaptchaCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化验证码
|
||||||
|
/// </summary>
|
||||||
|
private void InitCaptchaCode()
|
||||||
|
{
|
||||||
|
// 创建一个 6 位的随机数并保存在 Session 对象中
|
||||||
|
Session["CaptchaImageText"] = GenerateRandomCode();
|
||||||
|
imgCaptcha.ImageUrl = "~/basic/captcha/captcha.ashx?w=150&h=30&t=" + DateTime.Now.Ticks;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建一个 6 位的随机数
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
private string GenerateRandomCode()
|
||||||
|
{
|
||||||
|
string s = String.Empty;
|
||||||
|
Random random = new Random();
|
||||||
|
for (int i = 0; i < 6; i++)
|
||||||
|
{
|
||||||
|
s += random.Next(10).ToString();
|
||||||
|
}
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnRefresh_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
InitCaptchaCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnLogin_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (tbxCaptcha.Text != Session["CaptchaImageText"].ToString())
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("验证码错误!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tbxUserName.Text == "admin" && tbxPassword.Text == "admin")
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("成功登录!");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("用户名或密码错误!", MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
114
FineUI.Examples/basic/login_captcha.aspx.designer.cs
generated
Normal file
114
FineUI.Examples/basic/login_captcha.aspx.designer.cs
generated
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.basic {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class login_captcha {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Window1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Window Window1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SimpleForm1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.SimpleForm SimpleForm1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxUserName 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox tbxUserName;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxPassword 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox tbxPassword;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// tbxCaptcha 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.TextBox tbxCaptcha;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// imgCaptcha 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Image imgCaptcha;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnRefresh 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.LinkButton btnRefresh;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Toolbar Toolbar1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnLogin 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnLogin;
|
||||||
|
}
|
||||||
|
}
|
BIN
FineUI.Examples/bin/CKEditor.NET.dll
Normal file
BIN
FineUI.Examples/bin/CKEditor.NET.dll
Normal file
Binary file not shown.
BIN
FineUI.Examples/bin/FineUI.Examples.dll
Normal file
BIN
FineUI.Examples/bin/FineUI.Examples.dll
Normal file
Binary file not shown.
BIN
FineUI.Examples/bin/FineUI.dll
Normal file
BIN
FineUI.Examples/bin/FineUI.dll
Normal file
Binary file not shown.
20693
FineUI.Examples/bin/FineUI.xml
Normal file
20693
FineUI.Examples/bin/FineUI.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
FineUI.Examples/bin/FredCK.FCKeditorV2.dll
Normal file
BIN
FineUI.Examples/bin/FredCK.FCKeditorV2.dll
Normal file
Binary file not shown.
BIN
FineUI.Examples/bin/Newtonsoft.Json.dll
Normal file
BIN
FineUI.Examples/bin/Newtonsoft.Json.dll
Normal file
Binary file not shown.
BIN
FineUI.Examples/bin/Wilco.SyntaxHighlighter.dll
Normal file
BIN
FineUI.Examples/bin/Wilco.SyntaxHighlighter.dll
Normal file
Binary file not shown.
40
FineUI.Examples/button/button.aspx
Normal file
40
FineUI.Examples/button/button.aspx
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="button.aspx.cs" Inherits="FineUI.Examples.button.button" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<style type="text/css">
|
||||||
|
.redbutton button
|
||||||
|
{
|
||||||
|
color: #FF0000;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:Button ID="btnChangeEnable" Text="启用后面的按钮" runat="server" OnClick="btnChangeEnable_Click"
|
||||||
|
CssClass="inline" />
|
||||||
|
<x:Button ID="btnEnable" Text="禁用的按钮" OnClick="btnEnable_Click" runat="server"
|
||||||
|
Enabled="False" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="btnChangePressed" Text="改变后面按钮的按下状态" runat="server" OnClick="btnChangePressed_Click"
|
||||||
|
CssClass="inline" />
|
||||||
|
<x:Button ID="btnPressed" Text="按下的按钮" runat="server" EnablePress="true" Pressed="true" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="btnTooltip" Text="这个按钮有提示信息(点击改变提示信息)" ToolTip="这是按钮的提示信息" OnClick="btnTooltip_Click"
|
||||||
|
runat="server">
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button1" Text="普通按钮" runat="server" EnablePostBack="false" CssClass="inline" />
|
||||||
|
<x:Button ID="Button2" Text="中等大小按钮" runat="server" Size="Medium" EnablePostBack="false"
|
||||||
|
CssClass="inline" />
|
||||||
|
<x:Button ID="Button3" Text="大按钮" runat="server" Size="Large" EnablePostBack="false" />
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
46
FineUI.Examples/button/button.aspx.cs
Normal file
46
FineUI.Examples/button/button.aspx.cs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button
|
||||||
|
{
|
||||||
|
public partial class button : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnChangeEnable_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
btnEnable.Enabled = true;
|
||||||
|
btnEnable.Text = "本按钮已经启用(点击弹出对话框)";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnEnable_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("你点击了刚刚启用的按钮");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void btnTooltip_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
btnTooltip.ToolTip = "这是改变后的提示信息";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void btnChangePressed_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
btnPressed.Pressed = !btnPressed.Pressed;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
105
FineUI.Examples/button/button.aspx.designer.cs
generated
Normal file
105
FineUI.Examples/button/button.aspx.designer.cs
generated
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class button {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnChangeEnable 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnChangeEnable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnEnable 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnEnable;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnChangePressed 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnChangePressed;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnPressed 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnPressed;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnTooltip 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnTooltip;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button3;
|
||||||
|
}
|
||||||
|
}
|
25
FineUI.Examples/button/button_click.aspx
Normal file
25
FineUI.Examples/button/button_click.aspx
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="button_click.aspx.cs" Inherits="FineUI.Examples.button.button_click" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:Button ID="btnServerClick" Text="服务器端事件" OnClick="btnServerClick_Click" runat="server">
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="btnClientClick" Text="客户端事件" OnClientClick="alert('这是客户端事件');" EnablePostBack="false"
|
||||||
|
CssClass="inline" runat="server">
|
||||||
|
</x:Button>
|
||||||
|
<x:Button ID="btnClientClick2" Text="服务器端生成的客户端事件" EnablePostBack="false" runat="server">
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
29
FineUI.Examples/button/button_click.aspx.cs
Normal file
29
FineUI.Examples/button/button_click.aspx.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button
|
||||||
|
{
|
||||||
|
public partial class button_click : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
btnClientClick2.OnClientClick = Alert.GetShowInTopReference("这是在服务器端生成的客户端事件");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void btnServerClick_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("这是服务器端事件");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
60
FineUI.Examples/button/button_click.aspx.designer.cs
generated
Normal file
60
FineUI.Examples/button/button_click.aspx.designer.cs
generated
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class button_click {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnServerClick 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnServerClick;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnClientClick 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnClientClick;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnClientClick2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnClientClick2;
|
||||||
|
}
|
||||||
|
}
|
33
FineUI.Examples/button/button_custom.aspx
Normal file
33
FineUI.Examples/button/button_custom.aspx
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="button_custom.aspx.cs" Inherits="FineUI.Examples.button.button_custom" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
<style type="text/css">
|
||||||
|
.bgbtn {
|
||||||
|
background: url(../images/login.png) no-repeat;
|
||||||
|
width: 320px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bgbtn .x-btn-tl, .bgbtn .x-btn-tr, .bgbtn .x-btn-tc,
|
||||||
|
.bgbtn .x-btn-ml, .bgbtn .x-btn-mr, .bgbtn .x-btn-mc,
|
||||||
|
.bgbtn .x-btn-bl, .bgbtn .x-btn-br, .bgbtn .x-btn-bc {
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:Button ID="Button1" Text="普通按钮" runat="server" Size="Large" OnClick="Button1_Click" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<x:Button ID="Button2" Text="" CssClass="bgbtn" runat="server" OnClick="Button2_Click" />
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
29
FineUI.Examples/button/button_custom.aspx.cs
Normal file
29
FineUI.Examples/button/button_custom.aspx.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button
|
||||||
|
{
|
||||||
|
public partial class button_custom : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("点击了普通按钮");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void Button2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("点击了自定义按钮");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
51
FineUI.Examples/button/button_custom.aspx.designer.cs
generated
Normal file
51
FineUI.Examples/button/button_custom.aspx.designer.cs
generated
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class button_custom {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button2;
|
||||||
|
}
|
||||||
|
}
|
33
FineUI.Examples/button/button_icon.aspx
Normal file
33
FineUI.Examples/button/button_icon.aspx
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="button_icon.aspx.cs" Inherits="FineUI.Examples.button.button_icon" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:Button ID="btnIcon1" Text="图标在左侧" Icon="Report" runat="server" CssClass="inline" />
|
||||||
|
<x:Button ID="btnIcon2" Text="图标在右侧" IconAlign="Right" Icon="Report" runat="server" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="btnIcon3" Text="图标在上面" IconAlign="Top" Icon="Report" runat="server"
|
||||||
|
CssClass="inline" />
|
||||||
|
<x:Button ID="btnIcon4" Text="图标在下面" IconAlign="Bottom" Icon="Report" runat="server" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="btnCustomIcon" Text="自定义图标(点击修改图标)" OnClick="btnCustomIcon_Click"
|
||||||
|
IconUrl="~/images/16/1.png" runat="server" />
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
只有图片的按钮:
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button1" IconUrl="~/images/16/1.png" CssClass="inline" runat="server" />
|
||||||
|
<x:Button ID="Button2" IconUrl="~/images/16/8.png" runat="server" />
|
||||||
|
<br />
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
21
FineUI.Examples/button/button_icon.aspx.cs
Normal file
21
FineUI.Examples/button/button_icon.aspx.cs
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button
|
||||||
|
{
|
||||||
|
public partial class button_icon : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnCustomIcon_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
btnCustomIcon.IconUrl = "~/images/16/8.png";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
96
FineUI.Examples/button/button_icon.aspx.designer.cs
generated
Normal file
96
FineUI.Examples/button/button_icon.aspx.designer.cs
generated
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class button_icon {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnIcon1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnIcon1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnIcon2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnIcon2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnIcon3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnIcon3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnIcon4 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnIcon4;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnCustomIcon 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnCustomIcon;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Button2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button Button2;
|
||||||
|
}
|
||||||
|
}
|
32
FineUI.Examples/button/button_linkbutton.aspx
Normal file
32
FineUI.Examples/button/button_linkbutton.aspx
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="button_linkbutton.aspx.cs"
|
||||||
|
Inherits="FineUI.Examples.button.button_linkbutton" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:LinkButton ID="LinkButton2" Text="客户端事件(服务器生成)" EnablePostBack="false" runat="server">
|
||||||
|
</x:LinkButton>
|
||||||
|
<br />
|
||||||
|
<x:LinkButton ID="LinkButton3" Text="服务器端事件" OnClick="LinkButton3_Click" runat="server">
|
||||||
|
</x:LinkButton>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:LinkButton ID="LinkButton1" Enabled="true" Text="客户端事件(在页面中定义)" EnablePostBack="false"
|
||||||
|
OnClientClick="clickLinkButton();" runat="server">
|
||||||
|
</x:LinkButton>
|
||||||
|
<br />
|
||||||
|
<x:Button ID="btnChangeEnable" Text="启用/禁用最后一个链接按钮" runat="server" OnClick="btnChangeEnable_Click" />
|
||||||
|
</form>
|
||||||
|
<script>
|
||||||
|
function clickLinkButton() {
|
||||||
|
top.X.alert("定义在页面中的客户端事件!");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
30
FineUI.Examples/button/button_linkbutton.aspx.cs
Normal file
30
FineUI.Examples/button/button_linkbutton.aspx.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button
|
||||||
|
{
|
||||||
|
public partial class button_linkbutton : PageBase
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (!IsPostBack)
|
||||||
|
{
|
||||||
|
LinkButton2.OnClientClick = Alert.GetShowInTopReference("这是在服务器端生成的客户端事件");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LinkButton3_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Alert.ShowInTop("这是服务器端事件");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnChangeEnable_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LinkButton1.Enabled = !LinkButton1.Enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
69
FineUI.Examples/button/button_linkbutton.aspx.designer.cs
generated
Normal file
69
FineUI.Examples/button/button_linkbutton.aspx.designer.cs
generated
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <自动生成>
|
||||||
|
// 此代码由工具生成。
|
||||||
|
//
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
// 重新生成代码,这些更改将会丢失。
|
||||||
|
// </自动生成>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace FineUI.Examples.button {
|
||||||
|
|
||||||
|
|
||||||
|
public partial class button_linkbutton {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// form1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PageManager1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.PageManager PageManager1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// LinkButton2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.LinkButton LinkButton2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// LinkButton3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.LinkButton LinkButton3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// LinkButton1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.LinkButton LinkButton1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnChangeEnable 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUI.Button btnChangeEnable;
|
||||||
|
}
|
||||||
|
}
|
38
FineUI.Examples/button/button_menu.aspx
Normal file
38
FineUI.Examples/button/button_menu.aspx
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="button_menu.aspx.cs" Inherits="FineUI.Examples.button.button_menu" %>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head runat="server">
|
||||||
|
<title></title>
|
||||||
|
<link href="../css/main.css" rel="stylesheet" type="text/css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<form id="form1" runat="server">
|
||||||
|
<x:PageManager ID="PageManager1" runat="server" />
|
||||||
|
<x:Button ID="btnMenu" Text="中国科学技术大学" EnablePostBack="false" runat="server">
|
||||||
|
<Menu runat="server">
|
||||||
|
<x:MenuHyperLink runat="server" Icon="TagGreen" Target="_blank" NavigateUrl="http://scms.ustc.edu.cn/"
|
||||||
|
Text="化学与材料科学学院">
|
||||||
|
</x:MenuHyperLink>
|
||||||
|
<x:MenuHyperLink runat="server" Icon="TagBlue" Target="_blank" NavigateUrl="http://business.ustc.edu.cn/zh_CN/"
|
||||||
|
Text="管理学院">
|
||||||
|
<Menu runat="server">
|
||||||
|
<x:MenuHyperLink runat="server" Icon="TagPink" Target="_blank" NavigateUrl="http://is.ustc.edu.cn/"
|
||||||
|
Text="工商管理系">
|
||||||
|
</x:MenuHyperLink>
|
||||||
|
<x:MenuHyperLink runat="server" Icon="TagPurple" Target="_blank" NavigateUrl="http://stat.ustc.edu.cn/"
|
||||||
|
Text="统计与金融系">
|
||||||
|
</x:MenuHyperLink>
|
||||||
|
</Menu>
|
||||||
|
</x:MenuHyperLink>
|
||||||
|
</Menu>
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
<x:Button ID="Button1" Text="中国科学技术大学(动态创建下拉菜单)" EnablePostBack="false" runat="server">
|
||||||
|
</x:Button>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user