2012年4月25日 星期三

UpdatePanel for jquery

DOWNLOAD
http://updatepanelplugin.codeplex.com/releases/28571/download/71254

Project Description
Allows developers using the .Net Framework and MS AJAX to interact with UpdatePanels using jQuery.

The UpdatePanel plug-in for jQuery (http://jQuery.com) allows developers using the MS Ajax post back model and jQuery a simple event model to bind jQuery selectors to content located inside a UpdatePanel.

I wrote this plug-in before jQuery introduced .live events or .delegate. I really suggest you look into these as alternatives as they will perform much better.

Functions:
  • .panelCreated(fn) - called when the UpdatePanel is created on a page
  • .panelUpdated(fn) - called when the panel is updated during a asynchronous (ajax) postback.
  • .panelReady(fn) - called when the UpdatePanel is first created or updated.
  • .beginRequest(fn) - called before the processing of an asynchronous postback starts and the postback request is sent to the server.
  • .initializeRequest(fn) - called during the initialization of the asynchronous postback. Allows the cancellation of the request.

Usage:

$(document).ready(function() {

    //Place jQuery code here for elements selected outside the update panel
    $('#UpdatePanel1').panelReady(function() {
        //Place jQuery code here for elements selected inside the update panel
        $('#Button1').click(function() {
            alert('button clicked!');
        });
    });
});
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
    <asp:Button ID="Button1" runat="server" Text="Button1" /><br />
    <asp:Label ID="Label1" runat="server" Text="Label1"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>

2012年4月17日 星期二

免改系統,好看的 Mac 字體完全移植 Windows 7


轉:http://www.techbang.com/posts/8767-modified-system-mac-font-full-transplant-win-7?related_post=true
22da66603cbac881ff56b443da6267ad我們知道在 Windows 7 中有內建了「Clear Type」平滑字體功能,不過對中文沒有完全支援,而最好的選擇就是將 Windows  7字體變更為 MAC 字型,有使用 MAC 的人都知道字體看起來相當的舒適,而要達成這樣的效果,大多都會透過「MacType」這套工具來達成。
而這次要介紹的是包含了網友特製過的四款字型,能夠更正確的套用到Windows 7上所有顯示的字型,喜歡MAC字型的朋友一定不能錯過。
下載網址:http://goo.gl/dVyJy
1.
下載解壓縮後,先執行「MacTypeInstaller_2010_1231_0.exe」進行安裝,安裝到最後面時,先不要勾選啟動MacType,按下完成,再繼續往下。




2.
我們手動執行MacType,然後選擇「服務加載」,點擊〔下一步〕。




3.
選擇要使用的字型,建議可以使用網友「糖果」所特製過的字型,四個其中一個,如果你是LCD的寬螢幕請使用前二個,CRT傳統螢幕請使用後二個,而分別二個當中差別僅在於有沒有陰影,選擇完後按下〔完成〕。




4.
按下〔完成〕以後,會再跳出一個「應用更改」對話盒,再按一下〔確定〕即可。




5.
再來是套用佈景,進入到theme資料夾裡,一共有五種選擇,分別解說如下,依你個人的喜好執行套用後重開機即可:

■7 Basic:建議電腦效能較低的人使用。
■Windows 7:一般Windows 7樣式。
■Big font:如果是大解析度的朋友可以使用,字體較大。
■Small font:小筆電建議使用。
■MAC:MAC風格。
■而這些佈景你也可以通通都安裝,之後直接在Windows7裡的個人化變更即可。




6.
套用完重開機就來看看字體變更後的效果,你會發現全部的地方都渲染的非常好,如果需要變更字型,一樣執行MacType.exe選擇套用即可。

變更 Windows 7 系統字體大小,眼睛看了更舒服


轉:http://www.techbang.com/posts/6938-drj-how-to-change-the-font-size-of-windows-7
01977c80f68cc5ce387148c5ecd2a44d現在螢幕愈做愈大,解析度也愈來愈高,但在大螢幕與高解析度的搭配下,畫面呈現的文字卻愈來愈小,所以也常聽到一些與讀者相同的狀況,原來是好意買給長輩使用的大螢幕,卻因為高解析度下,反而讓長輩抱怨字體大小、看不清楚,扼殺了原來的美意。
當然,這部分可透過調整螢幕解析度來改變,但通常不是螢幕最適解析度下,容易產生變型、殘影、疊字等問題,看起來有點像畫面沒有對焦的樣子。
因此,建議可以利用Windows 7內建的設定選項,變更系統的字體大小,好讓長輩可以看得更清楚,提升閱讀的舒適度。而Windows 7內建的字體等級有三種,如果設定至最大150%還不夠,可選擇「設定自訂文字大小(DPI)」,再依顯示器的解析度範圍值內調整。

Step 1

若要變更字體大小,於桌面空白處按一下滑鼠右鍵,選擇「螢幕解析度」的選項。

Step 2

再於出現的視窗裡,點選「改變文字和其他項目的大小」。

Step 3

接著可見小、中、大三種字級可以選擇,預設是小,可依照需求調整至中或大的等級,再按下「套用」。

Step 4

完成設定後,必須重新開機,讓Windows 7重新載入改變的字體大小。

Step 5

再回到桌面後可發現,不管是圖示或是文字等,都相對變大了,與設定前的桌面有明顯的差異。

Step 6

如果還覺得不夠大,在步驟4中選擇「設定自訂文字大小(DPI)」,可再依顯示器的解析度範圍值內調整。