BloggerAds廣告
2012年10月16日 星期二
2012年7月23日 星期一
VWD伺服器控制項實作
1、Visual Web Developer 2008 Express
檔案®新增專案®Visual C#®Web®ASP.NET 伺服器控制項
2、在方案總管中加入兩個資料夾Images和Sound,將jpg檔及mp3檔分別加入其中。
將footstep.jpg和腳步.mp3的屬性®建置動作,設為內嵌資源。
3、在SvrControl.cs中加入
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
// 加入 WebResource
// JSControl 是namespace名稱
// Images.footstep.jpg是專案下之檔案路徑
[assembly: WebResource("JSControl.Images.footstep.jpg", "image/jpg")]
[assembly: WebResource("JSControl.Sound.腳步.mp3", "audio/mpegurl")]
namespace JSControl
{
[DefaultProperty("Text")]
[ToolboxData("<{0}:JSEmbedded
runat=server>")]
public
class JSEmbedded
: WebControl
{
[Bindable(true)]
[Category("Appearance")]
[DefaultValue("")]
[Localizable(true)]
public
string Text
{
get
{
String s = (String)ViewState["Text"];
return ((s == null) ?
"[" + this.ID
+ "]" : s);
}
set
{
ViewState["Text"] = value;
}
}
protected
override void
RenderContents(HtmlTextWriter output)
{
//output.Write(Text);
//
Display picture
string
str = Page.ClientScript.GetWebResourceUrl(typeof(JSEmbedded), "JSControl.Images.footstep.jpg");
Image
image = new Image();
image.ImageUrl = str;
image.ImageAlign = ImageAlign.Middle;
image.AlternateText = "Foot Step";
image.RenderControl(output);
output.WriteBreak();
output.WriteBreak();
//output.Write("Hello
show picture!");
// Play
music
string
strSoundPath = Page.ClientScript.GetWebResourceUrl(typeof(JSEmbedded), "JSControl.Sound.腳步.mp3");
output.Write("<EMBED id='sound' src='" +
strSoundPath + "' border=0 autostart=false
loop=true></EMBED>");
}
}
}
4、存檔後,建置JSControl專案
編譯完成-- 0 個錯誤,0 個警告
JSControl ->
G:\jsbird\visualwebdeveloper\JSControl\JSControl\bin\Debug\JSControl.dll
========== 全部重建: 1
成功、失敗、0 略過==========
5、將JSControl.dll加入 .NET Framework 元件
工具®選擇工具箱項目®瀏覽,開啟JSControl.dll。
6、關閉JSControl專案,新增一個ASP.NET Web應用程式
7、在Default.aspx中加入JSEmbedded元件
8、存檔後,在IE中瀏覽Default.aspx。
2012年5月10日 星期四
2012年4月28日 星期六
2012年4月22日 星期日
追隨者
The follower
馬英九的從政之路一直追隨著阿扁,從台北市長到中華民國總統亦步亦趨。下一步是什麼?根據專家預測,馬可能會被關起來,但不會關在台灣,因為台灣的法院是國民黨開的,他會被關在中國大陸,理由是統一的步調太慢,對於中央的政策執行不力,態度不夠積極。
The political pace of Ma Yingjiu has been chasing with A-Bian, he picked up the pace from Taipei Mayor to the President of the Republic of China. What is next? According to the predition of some experts, Ma could be put in jail; however, he will not be held in Taiwan, because KMT(Kuomintang) owns the courts in Taiwan, he would be held in mainland China, the reasons are that the pace of Cross-Strait Reunification is too slow, the implementation of central policies is ineffective and the attitude is not active enough.
馬英九的從政之路一直追隨著阿扁,從台北市長到中華民國總統亦步亦趨。下一步是什麼?根據專家預測,馬可能會被關起來,但不會關在台灣,因為台灣的法院是國民黨開的,他會被關在中國大陸,理由是統一的步調太慢,對於中央的政策執行不力,態度不夠積極。
The political pace of Ma Yingjiu has been chasing with A-Bian, he picked up the pace from Taipei Mayor to the President of the Republic of China. What is next? According to the predition of some experts, Ma could be put in jail; however, he will not be held in Taiwan, because KMT(Kuomintang) owns the courts in Taiwan, he would be held in mainland China, the reasons are that the pace of Cross-Strait Reunification is too slow, the implementation of central policies is ineffective and the attitude is not active enough.
2012年4月16日 星期一
特赦阿扁
Amnesty A-Bian
馬英九堅定地表示他不會特赦阿扁。但是阿扁所被指控的,馬英九一樣也不缺。
Ma Yingjiu (President of ROC since 2008) firmly expressed that he will not amnesty A-Bian (former President from 2000 to 2008). But of everything that A-Bian was accused, there is no lack to Ma Yingjiu.
為什麼看見你弟兄眼中有刺,卻不想自己眼中有樑木呢?(路加福音六章41節)
And why do you look at the speck in your brother's eye, but do not perceive the plank in your own eye?(Luke 6:41)
馬英九堅定地表示他不會特赦阿扁。但是阿扁所被指控的,馬英九一樣也不缺。
Ma Yingjiu (President of ROC since 2008) firmly expressed that he will not amnesty A-Bian (former President from 2000 to 2008). But of everything that A-Bian was accused, there is no lack to Ma Yingjiu.
為什麼看見你弟兄眼中有刺,卻不想自己眼中有樑木呢?(路加福音六章41節)
And why do you look at the speck in your brother's eye, but do not perceive the plank in your own eye?(Luke 6:41)
2012年4月12日 星期四
國共合作
Cooperation between KMT and CP
原來國民黨與共產黨是一家親,國民黨是共產黨的先頭部隊,國民黨搞亂了大陸,讓給共產黨管理。現在國民黨又要搞亂台灣,再將台灣送給共產黨。
It suddenly dawned on me that KMT and CP are a family, KMT is a vanguard of CP, KMT messed up the mainland China then gave it to CP for management. Now KMT also will mess up Taiwan then send it to CP as a gift.
KMT - the Kuomintang
CP - the Communist Party
原來國民黨與共產黨是一家親,國民黨是共產黨的先頭部隊,國民黨搞亂了大陸,讓給共產黨管理。現在國民黨又要搞亂台灣,再將台灣送給共產黨。
It suddenly dawned on me that KMT and CP are a family, KMT is a vanguard of CP, KMT messed up the mainland China then gave it to CP for management. Now KMT also will mess up Taiwan then send it to CP as a gift.
KMT - the Kuomintang
CP - the Communist Party
2012年4月11日 星期三
政府亂象
Disordered phenomenon of Government
執政者不知民間疾苦,只求自己的歷史定位。
The ruler is unaware of the sufferings of the people, just seeking their own historical position.
公務員不知為民服務,只求自己的口袋滿滿。
The officer is unaware of serving the people, just seeking money to fill their own pocket.
執政者不知民間疾苦,只求自己的歷史定位。
The ruler is unaware of the sufferings of the people, just seeking their own historical position.
公務員不知為民服務,只求自己的口袋滿滿。
The officer is unaware of serving the people, just seeking money to fill their own pocket.
訂閱:
文章 (Atom)