<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7084184</id><updated>2011-12-23T16:31:33.032+08:00</updated><category term='ASP.NET 4.0'/><category term='The Build Master'/><category term='Globalization'/><category term='Windows XP'/><category term='Vista'/><category term='ASP.NET 2.0'/><category term='IIS 7'/><category term='Team Foundation Server 2010 RC'/><category term='Visual Studio 2005'/><category term='Windows Update'/><category term='Silverlight 2.0'/><category term='AJAX'/><category term='T-SQL Programming Language'/><category term='Smart Client + ClickOnce'/><category term='Oracle'/><category term='Microsoft SQL Server'/><category term='Expression Blend 2.5'/><category term='Visual Studio 2010'/><category term='Microsoft .NET Framework 3.0'/><category term='ASP.NET'/><category term='Microsoft Workflow Foundation'/><category term='Visual Studio 2008'/><category term='Microsoft .NET Framework'/><category term='Virtual PC 2007'/><category term='Active Direcotry (include ADSI)'/><category term='Windows Communication Service(WCF)'/><category term='Office 2007'/><category term='Window Server 2008'/><category term='WPF 4.0'/><category term='office 2010'/><category term='Windows 7'/><category term='Visual Studio 2003'/><category term='Microsoft Team Foundation Server'/><category term='LINQ'/><category term='Documentation Generate'/><category term='Microsoft Online Services 中文版'/><category term='Windows mobile'/><category term='SQL Server 2008'/><category term='Microsoft Enterprise Library'/><category term='Microsoft .NET Framework 4.0'/><category term='UnitTest'/><category term='Microsoft C# 2.0'/><category term='WPF Browser'/><category term='Entity Framework 4.0'/><category term='MSBuild'/><category term='Team Foundation Server 2010'/><category term='Crystal Report For Visual Studio'/><category term='Microsoft ALM'/><category term='Visio 2010'/><category term='Remoting'/><category term='ReSharper'/><category term='Windows SharePoint Service'/><category term='Visual Studio 2010 Beta 2'/><category term='Windows Virutal PC'/><category term='Source Controller'/><category term='Blend 4'/><category term='Design Pattern'/><category term='其他'/><category term='Microsoft .NET Framework 3.5'/><title type='text'>.NET Midway</title><subtitle type='html'>This blog is focused on sharing Microsoft .NET technology, which include C#, DesignPattern, XML, WebService, .NET Remoting, WinFX, CLR, .NET Framework 3.0, SQL Server 2005...etc.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default?start-index=101&amp;max-results=100'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>295</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7084184.post-1047481948452931554</id><published>2011-05-25T01:15:00.001+08:00</published><updated>2011-05-25T01:15:53.725+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>在.NET 4.0 上如何註冊到 GAC ?</title><content type='html'>&lt;p&gt;首先我們先來了解一下，目前 GAC 做了什麼改變？為什麼要做這個改變？&lt;/p&gt; &lt;p&gt;在 .NET 4.0 ，GAC 有了更新！在.NET 2.0 / 3.5 ，GAC 的實體目錄在 C:\Windows\Assebly 這個目錄。而 .NET 4.0 ，則變更至 C:\Windows\Microsoft.NET\Assembly 下。&lt;/p&gt; &lt;p&gt;為什麼有這樣的區別呢？主要是因為 CLR 版本造成的， .NET 2.0 / 3.5 所使用的是相同的 CLR 2.0，所以沒有必要進行分割的動作。但是 .NET 4.0 使用的卻是 CLR 4.0，我們可以試想一種狀況，若沒有區別，我們將一個組件的.NET 2.0 及 .NET 4.0 的版本同時註冊到 GAC 中，會有什麼狀況呢？好一點的結果是，一律都會叫最新的組件，也就是.NET 4.0 的版本。所以呢，.NET 2.0 版本的程式就壞掉了。慘一點的狀況，因為分不出 CLR 的版本，所以都叫不起來，全部都壞掉了…&lt;/p&gt; &lt;p&gt;所以為了避免這種狀況， GAC 依 CLR 的版本進行分割，每個 CLR 版本的 GAC 都是獨立的，也都不會互相影響。換句話說，如果你註冊了一個 .NET 4.0 的組件，基本上，應該在 CLR 2.0 的GAC 裏是找不到的 ( C:\Windows\Assembly 目錄下)&lt;/p&gt; &lt;p&gt;好了，我們回過頭來說明如何將assembly 註冊到 GAC，以及如何進行反註冊？&lt;/p&gt; &lt;ol&gt; &lt;li&gt;最簡單的方式，用檔案總管開啟該目錄 (例如：C:\Windows\Assembly )，然後將要註冊的組件拖曳到該目錄裏就完成了。&lt;/li&gt; &lt;li&gt;使用 GACUtil.exe 進行註冊及反註冊的動作&lt;br&gt;&lt;strong&gt;GACUtil.exe /i xxx.dll&lt;br&gt;GACUtil.exe /u xxx &lt;/strong&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;(切記：不要加上 .dll - 這個指令，會將GAC 中所有叫這個名字的組件一律移除 )&lt;br&gt;&lt;/strong&gt;&lt;/font&gt;&lt;font color="#000000"&gt;若想特別指定某一個組件進行移除，最好的方式是把強式名稱的屬性全部都指定進去，例如：&lt;br&gt;&lt;/font&gt;&lt;font color="#000000"&gt;&lt;strong&gt;GACUtil.exe /u xxx, Version=1.0.0.0, Culture=neutal, PublicKeyToken=…&lt;/strong&gt;&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font color="#000000"&gt;使用 GACUtil.exe 進行整批的註冊及反註冊&lt;br&gt;GACUtil.exe /il AssemblyList.txt&lt;br&gt;GACUtil.exe /ul UnRegisterAssemblyList.txt&lt;br&gt;&lt;br&gt;其中&lt;br&gt;AssemblyList.txt的格式：一行列出一個要註冊的組件的檔案名稱，例如：&lt;br&gt; &lt;div id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;AAA.dll&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;BBB.dll&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;CCC.dll&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;UnRegisterAssemblyList.txt 的格式：類似 AssemblyList.txt，只是每個檔案名稱都不需要加上 .dll ，例如：&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;AAA&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;BBB&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;CCC&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;&lt;font color="#000000"&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;div&gt;最後，請注意 GACUtil.exe 這個檔案在哪裏呢？當你的電腦安裝了 Visual Studio 2010 之後，你可以在 &lt;strong&gt;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools&lt;/strong&gt; 這個目錄中找到這個執行檔&lt;/font&gt;&lt;/div&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-1047481948452931554?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/1047481948452931554/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=1047481948452931554&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1047481948452931554'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1047481948452931554'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/05/net-40-gac.html' title='在.NET 4.0 上如何註冊到 GAC ?'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-4676397582208078152</id><published>2011-04-26T18:48:00.000+08:00</published><updated>2011-04-26T18:50:26.278+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Team Foundation Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>如何在 PL/SQL Developer IDE 中將 Table Schema 加入 Team Foundation Server ?</title><content type='html'>&lt;p&gt;在&lt;a href="http://dotnetframework.blogspot.com/2011/04/plsql-developer-tfs.html"&gt;上一篇&lt;/a&gt;，告訴大家如何使用 PL/SQL Developer 連接 Team Foundation Server 進行資料庫物件的版本管控。經過試用之用，才發現預設 Stored Procedure, Function 按右鍵時都會出現 Add to VCS 的選項，讓你可以很直覺得將物件由 Team Foundation Server 簽入、簽出，甚至將物件首次加入到 Team Foundation Server中。&lt;/p&gt; &lt;p&gt;但是我發現在 Tables 上卻沒有這個選項。我想，這應該跟 Table 太多相依物件有關。那我們怎麼處理 Table 物件呢？如何在 IDE 上快速將Table 物件簽入到 Team Foundation Server?下圖是現狀，你可以看到並沒有「Add To VCS」的選項&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TbajSUXZs2I/AAAAAAAAEu8/5lbL9992wXM/s1600-h/SNAGHTMLdc1eab%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTMLdc1eab" border="0" alt="SNAGHTMLdc1eab" src="http://lh3.ggpht.com/_BiAIh45tOHE/TbajTfrz9DI/AAAAAAAAEvA/TBsHRboEyX4/SNAGHTMLdc1eab_thumb%5B1%5D.png?imgmax=800" width="307" height="436"&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TbajUCITdgI/AAAAAAAAEvE/pc9Kd5YWwnQ/s1600-h/SNAGHTMLdd9f2f%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTMLdd9f2f" border="0" alt="SNAGHTMLdd9f2f" src="http://lh5.ggpht.com/_BiAIh45tOHE/TbajVESCQHI/AAAAAAAAEvI/TFYIJ5PJ5oI/SNAGHTMLdd9f2f_thumb%5B1%5D.png?imgmax=800" width="274" height="430"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;所以，我們使用另外的作法達到需求。&lt;/p&gt; &lt;p&gt;首先，我們先在某個 Table 上按下右鍵，選擇「DBMS_Metadata」其下的 DDL 選項，產生相關的Script。&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TbajWRcB4-I/AAAAAAAAEvM/F0MZ58IsBR4/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TbajXg332rI/AAAAAAAAEvQ/uCMZ69G-O_Y/image_thumb%5B2%5D.png?imgmax=800" width="373" height="408"&gt;&lt;/a&gt;&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TbajYknZ4FI/AAAAAAAAEvU/QZjsP6xb5jY/s1600-h/image%5B9%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TbajaKXf3kI/AAAAAAAAEvY/vbOMldcM0mg/image_thumb%5B5%5D.png?imgmax=800" width="365" height="305"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;按下儲存鈕，將產生出來的DDL 檔案儲存在 Team Foundation Server 在本機電腦中對應的路徑下。&lt;br&gt;然後，在 DDL Script 的 IDE 上直接按下右鍵，你會發現有「Add to VCS」的選項，即可將此檔案加入到 Team Foundation Server 中。&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TbajbACX6NI/AAAAAAAAEvc/peAEPoDzBJI/s1600-h/image%5B13%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TbajcLa0ZsI/AAAAAAAAEvg/6Y-wJ-Q5Rp4/image_thumb%5B7%5D.png?imgmax=800" width="372" height="263"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;註：在加入之前，先儲存檔案，是一個很重要的動作。如果你不先存檔，直接執行「Add to VCS」，會出現「Invalid file name」的錯誤訊息。&lt;br&gt;之後，雖然會出現 Check Out 選項，也會出現 Get File 的選項，但是在 Team Foundation Server 的 Source Control 卻是沒有任何的檔案出現 – PL/SQL Developer 會壞掉…&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-4676397582208078152?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/4676397582208078152/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=4676397582208078152&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4676397582208078152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4676397582208078152'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/04/plsql-developer-ide-table-schema-team.html' title='如何在 PL/SQL Developer IDE 中將 Table Schema 加入 Team Foundation Server ?'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_BiAIh45tOHE/TbajTfrz9DI/AAAAAAAAEvA/TBsHRboEyX4/s72-c/SNAGHTMLdc1eab_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-4950355888053053242</id><published>2011-04-24T03:50:00.000+08:00</published><updated>2011-04-24T03:54:07.549+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>如何讓 PL/SQL Developer 利用 Tfs 進行版本控管？</title><content type='html'>&lt;p&gt;最近協助一個專案進行版本管控。這個專案使用的資料庫是 Oracle。到了客戶端，才發現不管是開發團隊或是客戶，都非常習慣一套 Oracle 3-Party 工具：&lt;a href="http://www.allroundautomations.com/plsqldev.html?gclid=COWxifORs6gCFcFrpAodJklACA"&gt;PL/SQL Developer&lt;/a&gt;。&lt;/p&gt; &lt;p&gt;對於這個專案的整個軟體開發流程，導入 Tfs 2010 進行管理，加上團隊本身有一點點使用過 Tfs 的經驗。對於 Work Item ，也不算陌生。所以在C# 原始碼及 Release 的版本控管上，不會有太大的問題。唯一，由於他們使用 Oracle 資料庫，該如何幫助他們進行 Oracle 資料庫物件的版本控制。&lt;/p&gt; &lt;p&gt;我的想法，由 PL/SQL Developer 這套工具著手，因為無論開發團隊或是客戶，Oracle 資料庫的開發 &amp;amp; 管理，最順手的工具都是 PL/SQL Developer。有一個概念很重要，導入版本管控時盡量不要增加使用者 (開發團隊 or 客戶)，以免增加排斥感。不要為了整個動作的流暢性或是希望流程更完美，結果讓使用者造成排斥感後，反而造成整個導入的成效降低。&lt;/p&gt; &lt;p&gt;回過頭來說，課題就變成是 PL/SQL Developer 如何利用 Team Foundation Server 進行 Oracle 資料庫物件的版本管控。&lt;br&gt;首先，我們要先下載兩個軟體：&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/bce06506-be38-47a1-9f29-d3937d3d88d6"&gt;Team Foundation Server MSSCCI Provider 2010&lt;/a&gt;&lt;/li&gt; &lt;li&gt;PL/SQL Developer 外掛：&lt;a href="http://www.allroundautomations.com/download/vcs123.zip"&gt;VCS&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;首先，先安裝 Team FOundation Server MSSCCI Provider 2010。完成後，再安裝 PL/SQL Developer Plug in (VCS)。&lt;/p&gt; &lt;p&gt;上述兩個軟體都安裝完成後。開啟 PL/SQL Developer ，你會發現在功能選單上多了一組 VCS 的功能。如下圖所示：&lt;br&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TbMt93gAqII/AAAAAAAAEs0/xTtAwA71eyA/s1600-h/SNAGHTML58d448b%5B5%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML58d448b" border="0" alt="SNAGHTML58d448b" src="http://lh3.ggpht.com/_BiAIh45tOHE/TbMt-_t0c2I/AAAAAAAAEs4/JRl5aIJKy-g/SNAGHTML58d448b_thumb%5B2%5D.png?imgmax=800" width="540" height="446"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;接下來，介紹一下如何設定連線 Team Foundation Server：&lt;/p&gt; &lt;ul&gt; &lt;li&gt; 第一次使用時，先選擇「Preference」&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TbMt_Z4Ir4I/AAAAAAAAEs8/JJjlG985AJo/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuARcV9HI/AAAAAAAAEtA/WC96vdLfIj8/image_thumb%5B1%5D.png?imgmax=800" width="180" height="356"&gt;&lt;/a&gt;&lt;br&gt;跳出對話框&lt;br&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TbMuAyWxZBI/AAAAAAAAEtE/0wIcLxDiBy8/s1600-h/SNAGHTML59d78e4%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML59d78e4" border="0" alt="SNAGHTML59d78e4" src="http://lh3.ggpht.com/_BiAIh45tOHE/TbMuB_CI6-I/AAAAAAAAEtI/f0ZRLszW72c/SNAGHTML59d78e4_thumb.png?imgmax=800" width="194" height="244"&gt;&lt;/a&gt;&lt;br&gt;記得勾選「Allow version control over DB objects」及「Add Spec and Body as a Single file」，這兩個選項會讓你的PL/SQL Developer 在 object window 中的物件按右鍵時多了一個選項：「Add to VCS」，讓你的物件可以新增至 Team Foundation Server Source Control 中。&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuCt1XbLI/AAAAAAAAEtM/Rr6lzIfFVdw/s1600-h/SNAGHTML5a040b4%5B5%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5a040b4" border="0" alt="SNAGHTML5a040b4" src="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuDr0bL1I/AAAAAAAAEtQ/b_vaL213yf8/SNAGHTML5a040b4_thumb%5B2%5D.png?imgmax=800" width="325" height="428"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;設定完成後。我們選擇「Open Project」&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuEXEJSLI/AAAAAAAAEtU/Kh_vZ_cCn1w/s1600-h/SNAGHTML5a1e01e%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5a1e01e" border="0" alt="SNAGHTML5a1e01e" src="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuFLzNt0I/AAAAAAAAEtY/Supe_hTCofg/SNAGHTML5a1e01e_thumb.png?imgmax=800" width="244" height="173"&gt;&lt;/a&gt;&lt;br&gt;跳出對話視窗，首先你會發現在System的下拉選單上，已經填入「Microsoft Team Foundation Server MSSCCI Provider」。如果有出現，基本上你的PL/SQL Developer 已經具備可以連線 Microsoft Team Foundation Server 了。&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuF4w3eaI/AAAAAAAAEtc/OPTufNitKlo/s1600-h/SNAGHTML5a4e887%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5a4e887" border="0" alt="SNAGHTML5a4e887" src="http://lh3.ggpht.com/_BiAIh45tOHE/TbMuGnm1c7I/AAAAAAAAEtg/2GUwhkVXQ0s/SNAGHTML5a4e887_thumb%5B1%5D.png?imgmax=800" width="391" height="260"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;接下來，我們點選Project 欄位後面的Folder Icon。它會出現選擇 Microsoft Team Foundation Server 的視窗。&lt;br&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TbMuHW9SkZI/AAAAAAAAEtk/8R3qXcE6cAg/s1600-h/SNAGHTML5a5dab2%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5a5dab2" border="0" alt="SNAGHTML5a5dab2" src="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuH-e-J-I/AAAAAAAAEto/ON6_99ENPMM/SNAGHTML5a5dab2_thumb%5B1%5D.png?imgmax=800" width="368" height="147"&gt;&lt;/a&gt;&lt;br&gt;基本上列出來的都是你已經在Team Explorer 中設定過的連線。當然，你也可以按後面的「Servers」按鈕，新增一條新的Team Foundation Server 連線。當你選擇好Team Foundation Server 的連線後，按下OK鈕，進行下一步。它接著跳出登入Team Foundation Server 的輸入帳號、密碼的對話框。&lt;/li&gt; &lt;li&gt;登入後，出現選擇 Folder 的對話視窗&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuIp6bgAI/AAAAAAAAEts/ct1gfeFM1mI/s1600-h/SNAGHTML5ab110d%5B5%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5ab110d" border="0" alt="SNAGHTML5ab110d" src="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuJRHpQKI/AAAAAAAAEtw/9i_4ZSy7t_I/SNAGHTML5ab110d_thumb%5B2%5D.png?imgmax=800" width="392" height="480"&gt;&lt;/a&gt;&lt;br&gt;&lt;font color="#ff0000"&gt;注意：這裏要指定的，非專案、也不是系統原始碼的位置。指的是你存放或想存放資料庫物件的位置(例如：Table Schema, Stored Procedure, Trigger…等等)。&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font color="#000000"&gt;當你按下「OK」鈕後，會再次出現 VCS 設定畫面，此時會將剛剛設定的資料全部回填至所有欄位中。&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuKHuOjHI/AAAAAAAAEt0/GWk-WYs4qZ8/s1600-h/SNAGHTML5aeedb5%5B5%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5aeedb5" border="0" alt="SNAGHTML5aeedb5" src="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuK0gPJGI/AAAAAAAAEt4/kMv4RNBVsys/SNAGHTML5aeedb5_thumb%5B2%5D.png?imgmax=800" width="349" height="239"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font color="#000000"&gt;按下「OK」後完成設定。此時，你會發現 VCS 功能中，有許多功能被啟用了。你也可以進行 Check In / Check Out了。&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuLQAYE6I/AAAAAAAAEt8/1-UEIlDWb88/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuMTAMlhI/AAAAAAAAEuA/aRYoTCAsE1s/image_thumb%5B3%5D.png?imgmax=800" width="176" height="348"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;h5&gt;將一個檔案加入到 Team Foundation Server 中 – Add To VCS&lt;/h5&gt; &lt;p&gt;首先，在object window 中選擇一個你將要放置到 Team Foundation Server 的Oracle 物件。&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuNPFmToI/AAAAAAAAEuE/widgZFJdxAc/s1600-h/image%5B11%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TbMuN2x8LxI/AAAAAAAAEuI/9nP3axeGMv8/image_thumb%5B5%5D.png?imgmax=800" width="237" height="320"&gt;&lt;/a&gt;&lt;br&gt;如圖所示，選擇「S_AA_LOGINLOG_TX」這一支Stored Procedure。在該物件上按右鍵，選擇「Add To VCS」。若此物件已經Add to VCS中，你將找不到「Add to VCS」的選項，而是多了一個「Get from VCS」。&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuOwzOmNI/AAAAAAAAEuM/ihtT4dqvFX0/s1600-h/image%5B14%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TbMuPrzFiyI/AAAAAAAAEuQ/q2QvTNQ7EMA/image_thumb%5B6%5D.png?imgmax=800" width="159" height="252"&gt;&lt;/a&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TbMuQb9PxGI/AAAAAAAAEuU/rJxZCiiUW_o/s1600-h/image%5B17%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TbMuRGGQkYI/AAAAAAAAEuY/XKG-Z_AWQfQ/image_thumb%5B7%5D.png?imgmax=800" width="126" height="252"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;選擇「Add to VCS」後，會跳出請你輸入簽入說明的對話框&lt;br&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TbMuRzBQtPI/AAAAAAAAEuc/OCVmblnUNYw/s1600-h/SNAGHTML5efd3c1%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5efd3c1" border="0" alt="SNAGHTML5efd3c1" src="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuSuRU20I/AAAAAAAAEug/IHcq5aXXWm0/SNAGHTML5efd3c1_thumb.png?imgmax=800" width="244" height="179"&gt;&lt;/a&gt;&lt;br&gt;將註解寫入後按下「OK」鈕。此時，會出現 Team Foundation Server 原本的簽入對話框，同時會把剛剛填入的註解一併複製到該視窗內&lt;br&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TbMuTfTbb6I/AAAAAAAAEuk/XRm78LySD1Y/s1600-h/SNAGHTML5f09683%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5f09683" border="0" alt="SNAGHTML5f09683" src="http://lh3.ggpht.com/_BiAIh45tOHE/TbMuUIsjehI/AAAAAAAAEuo/2GjXmu-clFg/SNAGHTML5f09683_thumb%5B1%5D.png?imgmax=800" width="458" height="292"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;接下來的操作，如果原本的Team Foundation Server Check in Policy - 該填的註解要填，該指定的Work Item 也要指定。此時就可以將一支全新的Stored Procedure 簽入至 Team Foundation Server 上。&lt;/p&gt; &lt;h5&gt;&lt;/h5&gt; &lt;h5&gt;簽出 – Check Out&lt;/h5&gt; &lt;p&gt;在object window裏，點選某支要修改的Oracle 物件。(以 S_AA_LOGINLOG_TX 為例)&lt;br&gt;在 S_AA_LOGINLOG_TX 上按右鍵，點選「Check Out」後，會跳出請你選擇該支檔案你簽出(Check Out) 後的鎖定類型 (Lock Type)&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuVGwtWhI/AAAAAAAAEus/_G_6_pys3Y8/s1600-h/SNAGHTML5f7025f%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5f7025f" border="0" alt="SNAGHTML5f7025f" src="http://lh6.ggpht.com/_BiAIh45tOHE/TbMuV1xDFhI/AAAAAAAAEuw/OPQiyDNUfh8/SNAGHTML5f7025f_thumb%5B1%5D.png?imgmax=800" width="212" height="297"&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TbMuWksZs_I/AAAAAAAAEu0/J3a0B0eH1o4/s1600-h/SNAGHTML5f72106%5B6%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML5f72106" border="0" alt="SNAGHTML5f72106" src="http://lh5.ggpht.com/_BiAIh45tOHE/TbMuXbr4giI/AAAAAAAAEu4/XivJ7Dtw33U/SNAGHTML5f72106_thumb%5B3%5D.png?imgmax=800" width="341" height="158"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;即可將此檔案 Check out。&lt;/p&gt; &lt;p&gt;其它的 source control 動作，其實大同小異。各位可以自行試試看囉&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-4950355888053053242?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/4950355888053053242/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=4950355888053053242&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4950355888053053242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4950355888053053242'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/04/plsql-developer-tfs.html' title='如何讓 PL/SQL Developer 利用 Tfs 進行版本控管？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_BiAIh45tOHE/TbMt-_t0c2I/AAAAAAAAEs4/JRl5aIJKy-g/s72-c/SNAGHTML58d448b_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8486848903442820624</id><published>2011-04-17T00:52:00.000+08:00</published><updated>2011-04-17T00:54:21.776+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF 4.0'/><title type='text'>如何清除WPF Browser application cache？</title><content type='html'>&lt;p&gt;一般而言，我們有兩種方式清除WPF Browser application cache。&lt;/p&gt; &lt;p&gt;如果你的電腦上有安裝Visual Studio 2010 SDK，則你可以使用 mage.exe 這個命令，指令如下：&lt;br&gt;&lt;pre class="csharpcode"&gt;Mage.exe –cc&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;若沒有安裝，則只能利用 rundll32 來清除，指令如下：&lt;br&gt;&lt;pre class="csharpcode"&gt;rundll32 %windir%\system32\dfshim.dll CleanOnlineAppCache&lt;/pre&gt;&lt;br /&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt;&lt;/style&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8486848903442820624?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8486848903442820624/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8486848903442820624&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8486848903442820624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8486848903442820624'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/04/wpf-browser-application-cache.html' title='如何清除WPF Browser application cache？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8263274522875416648</id><published>2011-04-12T10:29:00.001+08:00</published><updated>2011-04-12T10:30:20.243+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Window Server 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Install the FrontPage Extensions on IIS 7.0</title><content type='html'>&lt;p&gt;當我們利用 Visual Studio 2010 Publish Web Project Publish 功能，部署專案到Window Server 2008 時，會回傳 Window Server 沒有安裝 FrontPage Extension。若我們用Window Server 2003 的方式在安裝 Window 元件中，想要找尋 FrontPage Extension時會發現，它…不見了。&lt;/p&gt; &lt;p&gt;原來，Window Server 2008 將FrontPage Extension 改成外掛模式了，所以我們必須到微軟的網址中另外下載 FrontPage Extension 2002，詳細資訊，請參考 &lt;a href="http://learn.iis.net/page.aspx/134/installing-the-frontpage-server-extensions-on-iis-70/"&gt;Install the FrontPage Server Extensions on IIS 7.0&lt;/a&gt;&lt;/p&gt; &lt;p&gt;註：FrontPage Extension 2002 目前只支援 IIS 7.0 ，並不支援 IIS 7.5 (Window 7 &amp;amp; Window Server 2008 R2)。&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8263274522875416648?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8263274522875416648/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8263274522875416648&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8263274522875416648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8263274522875416648'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/04/install-frontpage-extensions-on-iis-70.html' title='Install the FrontPage Extensions on IIS 7.0'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8248982564895960074</id><published>2011-04-11T11:30:00.000+08:00</published><updated>2011-04-11T13:26:26.840+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Enterprise Library'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Reference 中Copy Local = false 造成的問題–Cache Application Block 錯誤</title><content type='html'>&lt;p&gt;這兩天，在我的專案中將Microsoft Enterprise Library 5.0，移動至GAC。(由於Microsoft Enterprise Library 屬於基底元件，不會常常異動，使用強式名稱並註冊在GAC，整個開發團隊不易有版本上的Issue)，結果卻發現Cache Application Block 無法執行了？？&lt;/p&gt; &lt;p&gt;看一下錯誤的狀況：&lt;br&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TaKQ_OlVxiI/AAAAAAAAEso/B2yAe9KocEw/s1600-h/image%5B6%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TaKRAe_6saI/AAAAAAAAEss/kjZPz18SOIo/image_thumb%5B2%5D.png?imgmax=800" width="632" height="339"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;這究竟是怎麼一回事呢？怎麼找都找不到錯誤原因，只知道是.NET Reflection 有問題而言，將 Microsoft Enterprise Library 移動到 GAC，整個專案只調整了專案參考中所有對於Microsoft Enterprise Library 的Reference，將其 Reference Properties中的 Copy Local，由True 改成 False。那會不會是這裏出了問題呢？&lt;/p&gt; &lt;p&gt;Copy Local = true | false ，到底有什麼差別呢？這樣來說吧，基本上並沒有太大的差別。當你把Copy Local = true 時，Visual Studio 會主動將你 Reference 的組件複製到 Bin\Debug 的目錄之下，而 Copy Local = false ，則不會。有可能不同的地方在於 Visual Studio 實在太聰明了，它會幫你將 Reference 組件相關 Dependency 的組件也一併複製到這個目錄裏，所以當你 Copy Local = true 時，你會忽略另外一件事，那就是 Reference 組件的Dependency 組件也必須一併加入Reference。因為它都在 Bin\Debug 目錄裏，你的程式不會發生錯誤，你也就不會發現有問題。所以，當你將 Copy Local = false 時，也就有可能會發生異常。&lt;/p&gt; &lt;p&gt;基於這個概念，我重新去看了相關的Reference。基本上要使用 Cache Application Block 必須 Reference 三個組件，其中兩個是Dependency 組件：&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Microsoft.Practices.EnterpriseLibrary.Caching&lt;/li&gt; &lt;li&gt;Microsoft.Practices.EnterpriseLibrary.Common (Dependency Assembly)&lt;/li&gt; &lt;li&gt;Microsoft.Practices.ServiceLocation (Dependency Assembly)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;後來，發現有些專案沒有Reference Microsoft.Practices.ServiceLocation。加入後，重新執行程式，Cache Applicatoin Block 就沒有發生任何異常了。 &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8248982564895960074?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8248982564895960074/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8248982564895960074&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8248982564895960074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8248982564895960074'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/04/reference-copy-local-false-cache.html' title='Reference 中Copy Local = false 造成的問題–Cache Application Block 錯誤'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_BiAIh45tOHE/TaKRAe_6saI/AAAAAAAAEss/kjZPz18SOIo/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5351111619135373243</id><published>2011-04-04T02:19:00.000+08:00</published><updated>2011-04-04T02:20:56.388+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>如何在Window 7 上安裝 PL/SQL Developer？</title><content type='html'>&lt;p&gt;以下這個方法，個人覺得還不錯！原因是我不需要安裝一個 Oracle Client 這個龐然大物。只需要將 Oracle Instance Client 解壓縮後即可。&lt;/p&gt; &lt;ul&gt; &lt;li&gt;下載 &lt;a href="http://www.oracle.com/technetwork/cn/topics/winsoft-095945-zhs.html"&gt;Oracle Instance Client&lt;/a&gt;&amp;nbsp;&lt;/li&gt; &lt;li&gt;將下載後的 Installclient-basic-win32-11.2.0.1.0.zip 解壓縮至 C:\Oracle_Client&lt;/li&gt; &lt;li&gt;設定 Window 7 的環境變數&lt;/li&gt; &lt;ul&gt; &lt;li&gt;開啟「系統內容」，切換至「進階」，按下「環境變數」&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TZi6ZxiFT1I/AAAAAAAAEsA/KZuI6lIf6tA/s1600-h/SNAGHTML81e9382%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML81e9382" border="0" alt="SNAGHTML81e9382" src="http://lh6.ggpht.com/_BiAIh45tOHE/TZi6a3aatFI/AAAAAAAAEsE/K5JVZ4vG5mI/SNAGHTML81e9382_thumb%5B1%5D.png?imgmax=800" width="369" height="414"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;按下「系統變數」中的「新增」按鈕&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TZi6boT7xdI/AAAAAAAAEsI/_LLSBbyPjTk/s1600-h/SNAGHTML82243dd%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML82243dd" border="0" alt="SNAGHTML82243dd" src="http://lh4.ggpht.com/_BiAIh45tOHE/TZi6cpO9rfI/AAAAAAAAEsM/wZRxlVbW7qM/SNAGHTML82243dd_thumb%5B1%5D.png?imgmax=800" width="376" height="400"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;分別加入&lt;/li&gt; &lt;ul&gt; &lt;li&gt;ORACLE_HOME : C:\Oracle_Client&lt;/li&gt; &lt;li&gt;Path : %ORACLE_HOME%&lt;/li&gt; &lt;li&gt;TNS_ADMIN: %ORACLE_HOME%&lt;/li&gt; &lt;li&gt;NLS_LANG : AMERICAN_AMERICA.ZHS16GBK&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;li&gt;安裝 PL/SQL Developer。無法安裝在預設目錄 “C:\Program Files (x86)”，因為路徑中不可以存在括號。&lt;/li&gt; &lt;li&gt;安裝完成後，執行 PL/SQL Developer。&lt;br&gt;先選擇不登入，直接進入畫面。&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TZi6dS_L1GI/AAAAAAAAEsQ/REVANAqn-Ds/s1600-h/SNAGHTML82b8c32%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML82b8c32" border="0" alt="SNAGHTML82b8c32" src="http://lh6.ggpht.com/_BiAIh45tOHE/TZi6eaGslqI/AAAAAAAAEsU/MZjJ6ydwUO4/SNAGHTML82b8c32_thumb%5B1%5D.png?imgmax=800" width="333" height="186"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;點選PL/SQL Developer 中的「Tools」—&amp;gt;「Preferences」&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TZi6fZ2_OkI/AAAAAAAAEsY/67O-cNgLbLU/s1600-h/SNAGHTML82e3e42%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML82e3e42" border="0" alt="SNAGHTML82e3e42" src="http://lh4.ggpht.com/_BiAIh45tOHE/TZi6gE9XPtI/AAAAAAAAEsc/Q8RgqwAwRAg/SNAGHTML82e3e42_thumb%5B1%5D.png?imgmax=800" width="475" height="379"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;在開始的首頁，分別設定&lt;br&gt;Oracle Home : OraClient11g_home&lt;br&gt;OCI library : C:\Oracle_Client\oci.dll (可以選的到)&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TZi6g71SmWI/AAAAAAAAEsg/6aGDFQjgLJk/s1600-h/SNAGHTML83624c9%5B4%5D%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML83624c9[4]" border="0" alt="SNAGHTML83624c9[4]" src="http://lh5.ggpht.com/_BiAIh45tOHE/TZi6h9qBOTI/AAAAAAAAEsk/W5Gf40u_7-8/SNAGHTML83624c9%5B4%5D_thumb%5B1%5D.png?imgmax=800" width="502" height="394"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;重新啟動 PL/SQL Developer，就可以進行正常的Oracle LogOn。&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5351111619135373243?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5351111619135373243/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5351111619135373243&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5351111619135373243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5351111619135373243'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/04/window-7-plsql-developer.html' title='如何在Window 7 上安裝 PL/SQL Developer？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_BiAIh45tOHE/TZi6a3aatFI/AAAAAAAAEsE/K5JVZ4vG5mI/s72-c/SNAGHTML81e9382_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-7940801655595291510</id><published>2011-03-03T02:44:00.000+08:00</published><updated>2011-03-03T02:45:14.224+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>忽略 XML Comments</title><content type='html'>&lt;p&gt;當你在Visual Studio 中設定專案必需輸入註解(XML Comment)後，設定方式如下圖：&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TW6QLjS8ZqI/AAAAAAAAErc/2puL7Ku15wc/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TW6QMaRRHGI/AAAAAAAAErg/I9vrBzfaiQc/image_thumb%5B1%5D.png?imgmax=800" width="594" height="358"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;當你的專案勾選「XML Document file」，若程式中 public methods 或是public perprites 沒有加上註解，在Build 時就會出現警告(warning)，用來提醒相關程式撰寫人員必須補上相關說明。這其實是一個很好的、也很方便的功能。這些註解所產生的XML，將會幫助其它 reference 這個元件的專案或程式提供一個更好的IntellSense 說明。(警告，如下圖所示)&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TW6QNXzhLtI/AAAAAAAAErk/pckFy8pMiXk/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TW6QOYsOTDI/AAAAAAAAEro/n4yLYPkkxzc/image_thumb%5B3%5D.png?imgmax=800" width="590" height="234"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;在真實的專案中使用這個功能，要求整個團隊在每一個方法及屬性上撰寫註解。Build 之後卻發現連 Designer.cs 或是 Reference 這一類由Visual Studio 自動產生的類別都會出現相關的Warning。&lt;/p&gt; &lt;p&gt;我們該如何忽略這些類別的Warning呢？(因為它非Coding出來的，而是自動產生的)。&lt;/p&gt; &lt;p&gt;可以利用&lt;br&gt;&lt;/p&gt; &lt;p id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #cc6633"&gt;#pragma&lt;/span&gt; warning disable 1591&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;加在相關類別的第一行，這些類別就不會再產生警告(warning)。&lt;/p&gt;&lt;br /&gt;&lt;p&gt;另外，這個指令可以用在程式碼中，例如在產生警告該行程式碼(例如，method)的前一行，用來忽略特定的method。在該行程式碼的下一行，可以用另一個指令來取消強制忽略警示。&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #cc6633"&gt;#pragma&lt;/span&gt; warning restore 1591&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-7940801655595291510?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/7940801655595291510/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=7940801655595291510&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/7940801655595291510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/7940801655595291510'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/03/xml-comments.html' title='忽略 XML Comments'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/TW6QMaRRHGI/AAAAAAAAErg/I9vrBzfaiQc/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-3001874552245336712</id><published>2011-01-19T13:08:00.000+08:00</published><updated>2011-01-19T13:09:42.503+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF 4.0'/><title type='text'>WPF 視窗重要事件的順序</title><content type='html'>&lt;p&gt;一個最簡單的WPF Window，從出現到結束，列出幾個重要的階段及事件：&lt;/p&gt; &lt;ol&gt; &lt;li&gt;呼叫建構子&lt;/li&gt; &lt;li&gt;引發 Window.Initialized 事件&lt;/li&gt; &lt;li&gt;引發 Window.Activated 事件&lt;/li&gt; &lt;li&gt;引發 Window.Loaded 事件&lt;/li&gt; &lt;li&gt;引發 Window.ContentRendered 事件&lt;/li&gt; &lt;li&gt;使用者與視窗互動&lt;/li&gt; &lt;li&gt;引發 Window.Closing 事件&lt;/li&gt; &lt;li&gt;引發 Window.Unloaded 事件&lt;/li&gt; &lt;li&gt;引發 Window.Closed 事件&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;其中最常使用的事件恐怕就是 Loaded, Closing 以及 Closed。通常&lt;br&gt;Loaded，會用來撰寫指定或處理視窗的預設值。&lt;br&gt;Closing 事件是在視窗真正被關閉前就引發的，會用來撰寫取消關閉視窗的動作，一般而言用來實作要求使用者確認這類的功能。&lt;br&gt;Closed 事件，只有在視窗被確實關閉後才會引發。一般而言，用到的機率較低。&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-3001874552245336712?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/3001874552245336712/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=3001874552245336712&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/3001874552245336712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/3001874552245336712'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/01/wpf.html' title='WPF 視窗重要事件的順序'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-2303052482953929778</id><published>2011-01-17T16:03:00.000+08:00</published><updated>2011-01-17T16:04:29.440+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF 4.0'/><title type='text'>如何將 WPF Browser Application 快速轉換成 WPF Windows Application ?</title><content type='html'>&lt;p&gt;WPF Browser Application 是WPF 中較新的功能。其實它的基本概念，仍然是ClickOnce Application。所以在權限及安控的處理上，必須很小心。&lt;/p&gt; &lt;p&gt;若你的系統已經用WPF Browser Project Template進行開發，我們要如何快速、無痛的轉換至WPF Windows Application 呢？研究了一下，發現我們可以利用修改專案檔的方式，快速切換程式到WPF Window Application。&lt;/p&gt; &lt;p&gt;我先開啟Visual Studio 2010，選擇 WPF Browser Application，專案名稱：HelloWorld，建立一個WPF Browser Application 範例&lt;/p&gt; &lt;ul&gt; &lt;li&gt;開啟 HelloWorld.csproj (*.csproj) 原始檔。&lt;br&gt;不是開啟專案，而是打開 Project File 的 XML 內容&lt;/li&gt; &lt;li&gt;在 PropertyGroup 區段中，找到三個Tag。&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TTP39b31ZvI/AAAAAAAAEqQ/sRUbcyVMuCg/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TTP3_CboYzI/AAAAAAAAEqU/jFT6LD6zU_s/image_thumb%5B2%5D.png?imgmax=800" width="621" height="376"&gt;&lt;/a&gt;&lt;br&gt;&lt;/li&gt;StartAction：指Debug的啟始位置，對應到 Project Property Windows&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TTP4AANWNlI/AAAAAAAAEqY/QVlXi2iUdZc/s1600-h/SNAGHTML15c0a91%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTML15c0a91" border="0" alt="SNAGHTML15c0a91" src="http://lh4.ggpht.com/_BiAIh45tOHE/TTP4A1g54tI/AAAAAAAAEqc/JEENg-3JotE/SNAGHTML15c0a91_thumb%5B1%5D.png?imgmax=800" width="522" height="392"&gt;&lt;/a&gt;&lt;br&gt;HostInBrowser：是否用IE啟動&lt;br&gt;GenerateManifests：是否要設定權限，對應到Project Property Windows&lt;br&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TTP4CK9YlXI/AAAAAAAAEqg/M83c9FJHBzY/s1600-h/image%5B9%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TTP4DLYR_iI/AAAAAAAAEqk/TTHBju76SQA/image_thumb%5B5%5D.png?imgmax=800" width="531" height="408"&gt;&lt;/a&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;將&lt;/ul&gt; &lt;ol&gt; &lt;li&gt;&amp;lt;StartAction&amp;gt;&lt;font color="#d16349"&gt;URL&lt;/font&gt;&amp;lt;/StartAction&amp;gt;，改成&amp;lt;StartAction&amp;gt;&lt;strong&gt;&lt;font color="#c0504d"&gt;Project&lt;/font&gt;&lt;/strong&gt;&amp;lt;/StartAction&amp;gt;&lt;/li&gt; &lt;li&gt;&amp;lt;HostInBrowser&amp;gt;&lt;font color="#d16349"&gt;true&lt;/font&gt;&amp;lt;/HostInBrowser&amp;gt;，改成&amp;lt;HostInBrowser&amp;gt;&lt;font color="#c0504d"&gt;false&lt;/font&gt;&amp;lt;/HostInBrowser&amp;gt;&lt;/li&gt; &lt;li&gt;&amp;lt;GenerateManifests&amp;gt;&lt;font color="#c0504d"&gt;true&lt;/font&gt;&amp;lt;/GenerateManifest&amp;gt;，改成&amp;lt;GenerateManifests&amp;gt;&lt;font color="#c0504d"&gt;false&lt;/font&gt;&amp;lt;/GenerateManifests&amp;gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;重新載入一次專案，再執行一次程式，你會發現原本的程式變成是WPF Windows Application囉&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-2303052482953929778?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/2303052482953929778/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=2303052482953929778&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2303052482953929778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2303052482953929778'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/01/wpf-browser-application-wpf-windows.html' title='如何將 WPF Browser Application 快速轉換成 WPF Windows Application ?'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BiAIh45tOHE/TTP3_CboYzI/AAAAAAAAEqU/jFT6LD6zU_s/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5370708218551611562</id><published>2011-01-14T15:01:00.000+08:00</published><updated>2011-01-14T15:02:24.556+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft SQL Server'/><title type='text'>如何解決User Define Function的參數是另一個資料表的欄位值？</title><content type='html'>&lt;p&gt;在早期的做法，我們的直覺就是直接跑一個cursor，分別取得每一筆資料該欄位的值後送進user defined function，取得相對應的資料後，塞入一個暫存的資料表。等cursor 跑完後，最後再一次select 暫存資料表取得資料。&lt;/p&gt; &lt;p&gt;現在，其實不用。SQL Server 提供一個指令非常好用 – APPLY。舉例而言，我們資料庫中有一支UDF，依輸入的user id 取得該user 隸屬的群組，如下圖所示：&lt;br&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TS_07nKWqWI/AAAAAAAAEqA/a7B3U2wqAwk/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TS_08mCYk7I/AAAAAAAAEqE/msdz8Ap6bNs/image_thumb%5B1%5D.png?imgmax=800" width="497" height="222"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;好了，接下來假設我們有一個需求是要取得所有使用者的群組資料。該怎麼處理呢？我們可以利用 APPLY 指令，非常簡單的達到這項功能&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TS_0-L-6lYI/AAAAAAAAEqI/xwC1efggOJ0/s1600-h/image%5B8%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TS_0_yYfe_I/AAAAAAAAEqM/9LnCutndqwY/image_thumb%5B4%5D.png?imgmax=800" width="638" height="509"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;指令如下：&lt;br&gt; &lt;div id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; * &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; dbo.AA_User&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;CROSS&lt;/span&gt; APPLY dbo.f_GetLoginGroup(UserID)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;在dbo.f_GetLoginGroup 的參數，請指定APPLY 之前的資料表某個欄位即可&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5370708218551611562?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5370708218551611562/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5370708218551611562&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5370708218551611562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5370708218551611562'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/01/user-define-function.html' title='如何解決User Define Function的參數是另一個資料表的欄位值？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_BiAIh45tOHE/TS_08mCYk7I/AAAAAAAAEqE/msdz8Ap6bNs/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-2397281006077531046</id><published>2011-01-14T14:25:00.000+08:00</published><updated>2011-01-14T14:26:19.377+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft SQL Server'/><title type='text'>如何撰寫跳號一覽表的Stored Procedure</title><content type='html'>&lt;p&gt;要解決這樣的問題，可以使用SQL Server中的EXCEPT指令。&lt;/p&gt; &lt;p&gt;我們可以先建立一組連續號碼的資料，再用這個資料，利用EXCEPT指令與真實的資料表進行比對後取得不存在於真實資料表的資料，即為「跳號資料」。看一下以下的範例：&lt;/p&gt; &lt;ul&gt; &lt;li&gt;建立一個資料表，模擬真實環境的取號資料表&lt;br&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TS_sewM8SdI/AAAAAAAAEpg/pJtwK6058Oc/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TS_sfbf_KWI/AAAAAAAAEpk/iMx7O65P-xA/image_thumb%5B1%5D.png?imgmax=800" width="351" height="212"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;填入DEMO 用資料&lt;br&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TS_sf9WtCQI/AAAAAAAAEpo/URdlGz-ztI0/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TS_sgXF53dI/AAAAAAAAEps/KPVI0ZWMJpA/image_thumb%5B3%5D.png?imgmax=800" width="443" height="390"&gt;&lt;/a&gt;&lt;/li&gt; &lt;li&gt;先來檢視一下產生的資料&lt;br&gt; &lt;div id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;--檢視資料產生結果&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; * &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; dbo.TxSN&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;結果是：&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TS_sg3geWbI/AAAAAAAAEpw/WDZokff5OBs/s1600-h/image%5B11%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TS_shsXgFZI/AAAAAAAAEp0/Y-PRiluNp7E/image_thumb%5B5%5D.png?imgmax=800" width="235" height="199"&gt;&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;撰寫下列程式碼，取得跳號資料&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;DECLARE&lt;/span&gt; @t &lt;span style="color: #0000ff"&gt;TABLE&lt;/span&gt;(txid &lt;span style="color: #0000ff"&gt;INT&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;DECLARE&lt;/span&gt; @&lt;span style="color: #0000ff"&gt;max&lt;/span&gt; &lt;span style="color: #0000ff"&gt;INT&lt;/span&gt;, @&lt;span style="color: #0000ff"&gt;min&lt;/span&gt; &lt;span style="color: #0000ff"&gt;INT&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;--找出最小與最大編號&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @&lt;span style="color: #0000ff"&gt;min&lt;/span&gt; = (&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;MIN&lt;/span&gt;(TxId) &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; dbo.TxSN)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @&lt;span style="color: #0000ff"&gt;max&lt;/span&gt; = (&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;MAX&lt;/span&gt;(TxId) &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; dbo.TxSN)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;WHILE&lt;/span&gt; @&lt;span style="color: #0000ff"&gt;min&lt;/span&gt; &amp;lt;= @&lt;span style="color: #0000ff"&gt;max&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;BEGIN&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    INSERT &lt;span style="color: #0000ff"&gt;INTO&lt;/span&gt; @t&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;            ( txid )&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;VALUES&lt;/span&gt;  ( @&lt;span style="color: #0000ff"&gt;min&lt;/span&gt;  &lt;span style="color: #008000"&gt;-- txid - int&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;              )&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @&lt;span style="color: #0000ff"&gt;min&lt;/span&gt; = @&lt;span style="color: #0000ff"&gt;min&lt;/span&gt; + 1&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;END&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;--使用 &lt;span style="color: #0000ff"&gt;EXCEPT&lt;/span&gt; 找出不連續編號&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; txid    &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; @t &lt;span style="color: #0000ff"&gt;EXCEPT&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; TxId &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; dbo.TxSN&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; NOCOUNT &lt;span style="color: #0000ff"&gt;OFF&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;執行後結果如下：&lt;br&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TS_sh0HEbrI/AAAAAAAAEp4/vHLC8Sk6Lk8/s1600-h/image%5B15%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TS_sivNsoTI/AAAAAAAAEp8/8OzpxAlykHg/image_thumb%5B7%5D.png?imgmax=800" width="255" height="212"&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;這樣就可以快速的取得跳號資料囉&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-2397281006077531046?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/2397281006077531046/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=2397281006077531046&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2397281006077531046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2397281006077531046'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/01/stored-procedure.html' title='如何撰寫跳號一覽表的Stored Procedure'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BiAIh45tOHE/TS_sfbf_KWI/AAAAAAAAEpk/iMx7O65P-xA/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8898714882276363732</id><published>2011-01-14T14:03:00.001+08:00</published><updated>2011-01-14T14:03:48.034+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft SQL Server'/><title type='text'>NOTE : 使用 SELECT * 查詢方式的壞處</title><content type='html'>&lt;ul&gt; &lt;li&gt;提供應用程式多餘的資料行，造成資源及效能上的浪費。&lt;/li&gt; &lt;li&gt;會因為資料表的結構改變，易造成應用程式在捉取欄位時的bug。&lt;/li&gt; &lt;li&gt;資料庫引擎需要先搜尋所有的資料行，再進行作業，影響資料庫效能。&lt;/li&gt; &lt;li&gt;易造成無法使用index進行查詢，影響執行效能&lt;/li&gt; &lt;li&gt;Spec 文件或是程式碼不清楚，解讀時無法清楚、明確的知道資料行的名稱&lt;/li&gt;&lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8898714882276363732?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8898714882276363732/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8898714882276363732&amp;isPopup=true' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8898714882276363732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8898714882276363732'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/01/note-select.html' title='NOTE : 使用 SELECT * 查詢方式的壞處'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-6582632016823956397</id><published>2011-01-13T18:16:00.001+08:00</published><updated>2011-01-13T18:16:58.582+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2008'/><title type='text'>Database Encryption in SQL Server 2008</title><content type='html'>&lt;p&gt;&lt;font face="微軟正黑體"&gt;Microsoft SQL Server 2008 提供三種不同的加解密方式：&lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font face="微軟正黑體"&gt;Cell-Level encryption&lt;br&gt;微軟由SQL Server 2005開始提供Cell-Level Encryption的功能。讓使用者可以針對Cell-Level 或是 Column-Level 的資料進行加密及解密的動作。&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="微軟正黑體"&gt;Full Database-Level encryption&lt;br&gt;SQL Server 2008 Enterprise Edition，則提供TDE (Transparent Database Encryption)，可以針對Database-Level提供加密及解密的功能。&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="微軟正黑體"&gt;File-Level encryption&lt;br&gt;則指的是利用Windows 本身的功能，例如：Encrytpting File System (EFS)或是BitLocker&lt;sup&gt;TM &lt;/sup&gt;Driven Encryption，對Database的實體檔案(*.mdf, *.ldf)進行加密及解密的功能，以保持資料的安全性。&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;h5&gt;&lt;font face="微軟正黑體"&gt;Why we use TDE ?&lt;/font&gt;&lt;/h5&gt; &lt;p&gt;&lt;font face="微軟正黑體"&gt;微軟在Microsoft SQL Server 20008 提供Transparent database encryption (DTE)，為了解決部份在Cell-Level Encryption 所遇到的問題。&lt;/font&gt;&lt;/p&gt; &lt;p&gt;&lt;font face="微軟正黑體"&gt;如果你使用Cell-Level Encryption 有下列幾個問題：&lt;/font&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;&lt;font face="微軟正黑體"&gt;欄位的資料型態必須改變，一般而言會換成 &lt;strong&gt;varbinary&lt;/strong&gt;。&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="微軟正黑體"&gt;搜尋時，無法使用範圍查詢或是等號查詢。&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="微軟正黑體"&gt;應用系統必須使用SQL Server所建立的物件來進行資料的維護 (因為必須在SQL Server 上進行加、解密的動作)，例如使用Stored Procedure, 或是 View。&lt;/font&gt;&lt;/li&gt; &lt;li&gt;&lt;font face="微軟正黑體"&gt;甚至，你無法使用Index, PK, FK…等功能。&lt;/font&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;font face="微軟正黑體"&gt;若你使用 DTE 進行整個資料庫的加密，則不會有上述的這些問題。所有的動作與未加密之前相同，也不需要再去變動應用程式的程式碼。&lt;/font&gt;&lt;/p&gt; &lt;h5&gt;Hot to enable Transparent&amp;nbsp; Database Encryption (TDE)&lt;/h5&gt; &lt;p&gt;要啟動TDE功能，首先你必須要擁有可以建立database master key 及在master 資料建立憑證的權限。同時，你也必須擁有要加密的某一資料庫的控制權。&lt;/p&gt; &lt;p&gt;依據下列的動作來建啟用 TDE，：&lt;br&gt;首先在master 資料庫：&lt;/p&gt; &lt;ol&gt; &lt;li&gt;建立 master key&lt;br&gt; &lt;div id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; MASTER &lt;span style="color: #0000ff"&gt;KEY&lt;/span&gt; ENCRYPTION &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; PASSWORD = &lt;span style="color: #006080"&gt;'KevinTsui'&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;div&gt;建立 Certficate&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; CERTIFICATE swKey &lt;span style="color: #0000ff"&gt;WITH&lt;/span&gt; SUBJECT = &lt;span style="color: #006080"&gt;'Systemweb'&lt;/span&gt;s PWP Certificate'&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;div&gt;備份 Certificate&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;BACKUP&lt;/span&gt; CERTIFICATE swKey &lt;span style="color: #0000ff"&gt;TO&lt;/span&gt; &lt;span style="color: #0000ff"&gt;FILE&lt;/span&gt; = &lt;span style="color: #006080"&gt;'path_to_file'&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;WITH&lt;/span&gt; PRIVATE &lt;span style="color: #0000ff"&gt;KEY&lt;/span&gt; (&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        &lt;span style="color: #0000ff"&gt;FILE&lt;/span&gt; = &lt;span style="color: #006080"&gt;'path_to_private_key_file'&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;        ENCRYPTOIN &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; PASSWORD = &lt;span style="color: #006080"&gt;'cert password'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;在要加密的資料庫中：&lt;/p&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;建立資料庫加密使用的Key – database encryption key (DEK)&lt;br&gt;這把Key 必須使用server certificate 來產生 (非database certificate)&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;DATABASE&lt;/span&gt; ENCRYPTION &lt;span style="color: #0000ff"&gt;KEY&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;WITH&lt;/span&gt; ALGORITHM = AES_256&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    ENCRYPTION &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; SERVER CERTIFICATE swKey&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;啟用TDE。(會在背景執行資料庫加密的動作)&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;ALTER&lt;/span&gt; &lt;span style="color: #0000ff"&gt;DATABASE&lt;/span&gt; myDatabase&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;    &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; ENCRYPTION ON&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;檢視資料庫加密的狀況，以確定資料庫已經完成加密 (需要VIEW SERVER STATE權限)&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; db_name(database_id), encryption_state &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; sys.dm_database_encryption_keys&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;Summary&lt;/h5&gt;&lt;br /&gt;&lt;p&gt;原本我以為TDE，可以解決我的需求。我的需求是不希望客戶動到我們公司建立的資料，甚至讀取資料內容。後來，發現TDE解決的是客戶端的問題，例如：資料庫本身的實體檔案或備份檔被盜取後，讓偷取者無法在另一台機器上無法正常的掛上去或是還原，以保證資料的安全性。&lt;/p&gt;&lt;br /&gt;&lt;p&gt;看來，想解決我的需求，還是得使用Cell-Level Encryption。&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-6582632016823956397?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/6582632016823956397/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=6582632016823956397&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/6582632016823956397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/6582632016823956397'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/01/database-encryption-in-sql-server-2008.html' title='Database Encryption in SQL Server 2008'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-7133071723692825037</id><published>2011-01-06T14:27:00.000+08:00</published><updated>2011-01-06T14:28:26.268+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft SQL Server'/><title type='text'>如何設計資料庫資料加密的機制</title><content type='html'>&lt;p&gt;在某些狀況，我們會希望系統的資料加密，防止其它不明用意的人士偷偷進行資料變更，造成系統錯誤。那我們如何將目前資料庫的資料，進行加密同時系統不需要大幅度進行修改呢？&lt;/p&gt; &lt;p&gt;基本上有四個步驟：&lt;/p&gt; &lt;ul&gt; &lt;li&gt;建立資料庫非對稱式憑證 (記得設定密碼)&lt;/li&gt; &lt;li&gt;建立儲存加密資料的資料表&lt;/li&gt; &lt;li&gt;建立維護資料用的 Stored Procedure&lt;/li&gt; &lt;li&gt;建立檢視資料用的 View&lt;/li&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt; &lt;ul&gt;&lt;/ul&gt;&lt;/ul&gt; &lt;h5&gt;建立資料庫非對稱式憑證&lt;/h5&gt; &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt; &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; height: 80px; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; ASYMMETRIC &lt;span style="color: #0000ff"&gt;KEY&lt;/span&gt; 非對稱式金鑰&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;WITH&lt;/span&gt; ALGORITHM = RSA_2048&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     ENCRYPTION &lt;span style="color: #0000ff"&gt;BY&lt;/span&gt; PASSWORD = &lt;span style="color: #006080"&gt;'KevinTsui'&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; GO&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;你會在Microsoft SQL Server Management Studio 的Object Explorer裏看到下列結果：&lt;br&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TSVg7zO94RI/AAAAAAAAEo4/6weBgHR7fIk/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TSVg8ijtrKI/AAAAAAAAEo8/wGeQ_t3thWM/image_thumb%5B2%5D.png?imgmax=800" width="269" height="414"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;h5&gt;建立儲存加密資料的資料表&lt;/h5&gt;&lt;br /&gt;&lt;p&gt;選擇一個要加密的資料表，按右鍵產生相對應的T-SQL。如下圖所示：&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TSVg9LavKnI/AAAAAAAAEpA/miwgHTNLABs/s1600-h/image%5B8%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TSVg90MdAtI/AAAAAAAAEpE/2cU7tcKLhCo/image_thumb%5B4%5D.png?imgmax=800" width="611" height="179"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;將產生的CREATE TABLE Script中的Table Name 後面加上「_E」以區別這個Table是有應用加密技術。另外要儲存加密資料的欄位，無論是NVARCHAR, INT…，一律都改成NVARCHAR(255)，如下圖所示&lt;br&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TSVg-gh88zI/AAAAAAAAEpI/Fcxlibg28Jw/s1600-h/image%5B12%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TSVg_COPncI/AAAAAAAAEpM/ypCSXFh1Ahc/image_thumb%5B6%5D.png?imgmax=800" width="578" height="351"&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;建立維護資料用的 Stored Procedure&lt;/h5&gt;&lt;br /&gt;&lt;p&gt;由於維護資料時，皆必須額外考慮加密的問題，就我的建議直接使用Stored Procedure處理會比較直覺，所有的人都只呼叫Stored Procedure，把明碼(畫面上的值直接傳入即可)，不需要再針對每一支需要變更此Table的程式都進行相關修改。Stored Procedure的寫法可以參考以下的範例，另外有一件事要特別注意：由於加密的欄位都修改成NVARCHAR(255)，為了保持程式的一致性，Stored Procedure傳入參數的部份，請依照原本的Table設計，該是NVARCHAR(10)，該是INT，該是SMALLINT，一律維持原樣：&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; ANSI_NULLS &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; QUOTED_IDENTIFIER &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;PROCEDURE&lt;/span&gt; sw_ModifyProductModule &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;     @action_type    &lt;span style="color: #0000ff"&gt;NCHAR&lt;/span&gt;(1) = &lt;span style="color: #006080"&gt;''&lt;/span&gt; ,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;     @productId        nvarchar(10) = &lt;span style="color: #006080"&gt;''&lt;/span&gt;, &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;     @moduleId        NVARCHAR(10) = &lt;span style="color: #006080"&gt;''&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;     @moduleCName    NVARCHAR(100) = &lt;span style="color: #006080"&gt;''&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;     @moduleEName    NVARCHAR(10) = &lt;span style="color: #006080"&gt;''&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;     @is_active        &lt;span style="color: #0000ff"&gt;SMALLINT&lt;/span&gt; = 0&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;BEGIN&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; NOCOUNT &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;     --傳入資料檢核&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;IF&lt;/span&gt; (@action_type &lt;span style="color: #0000ff"&gt;NOT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;IN&lt;/span&gt; (&lt;span style="color: #006080"&gt;'A'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'D'&lt;/span&gt;,&lt;span style="color: #006080"&gt;'U'&lt;/span&gt;))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;BEGIN&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;DECLARE&lt;/span&gt; @DBID &lt;span style="color: #0000ff"&gt;INT&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @DBID = DB_ID();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;DECLARE&lt;/span&gt; @DBNAME NVARCHAR(128);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @DBNAME = DB_NAME();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;RAISERROR&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;             (N&lt;span style="color: #006080"&gt;'資料庫 ID:%d, 資料庫名稱: %s。 錯誤訊息：傳入的Action_Mode，必須是 A, U, D 其中一種'&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;             10, &lt;span style="color: #008000"&gt;-- Severity.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum30"&gt;  30:&lt;/span&gt;             1, &lt;span style="color: #008000"&gt;-- State.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum31"&gt;  31:&lt;/span&gt;             @DBID, &lt;span style="color: #008000"&gt;-- First substitution argument.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum32"&gt;  32:&lt;/span&gt;             @DBNAME); &lt;span style="color: #008000"&gt;-- Second substitution argument.    &lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum33"&gt;  33:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;END&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum34"&gt;  34:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum35"&gt;  35:&lt;/span&gt;     --宣告加密用變數&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum36"&gt;  36:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;DECLARE&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum37"&gt;  37:&lt;/span&gt;         @encryp_productId        NVARCHAR(255),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum38"&gt;  38:&lt;/span&gt;         @encryp_moduleId        NVARCHAR(255),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum39"&gt;  39:&lt;/span&gt;         @encryp_moduleCName        NVARCHAR(255),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum40"&gt;  40:&lt;/span&gt;         @encryp_moduleEName        NVARCHAR(255),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum41"&gt;  41:&lt;/span&gt;         @encryp_is_active        NVARCHAR(255)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum42"&gt;  42:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum43"&gt;  43:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @encryp_productId = ENCRYPTBYASYMKEY(ASYMKEY_ID(&lt;span style="color: #006080"&gt;'SwEncryKey100'&lt;/span&gt;),@productId)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum44"&gt;  44:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @encryp_moduleId = ENCRYPTBYASYMKEY(ASYMKEY_ID(&lt;span style="color: #006080"&gt;'SwEncryKey100'&lt;/span&gt;),@moduleId)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum45"&gt;  45:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @encryp_moduleCName = ENCRYPTBYASYMKEY(ASYMKEY_ID(&lt;span style="color: #006080"&gt;'SwEncryKey100'&lt;/span&gt;),@moduleCName)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum46"&gt;  46:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @encryp_moduleEName = ENCRYPTBYASYMKEY(ASYMKEY_ID(&lt;span style="color: #006080"&gt;'SwEncryKey100'&lt;/span&gt;),@moduleEName)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum47"&gt;  47:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; @encryp_is_active = ENCRYPTBYASYMKEY(ASYMKEY_ID(&lt;span style="color: #006080"&gt;'SwEncryKey100'&lt;/span&gt;),&lt;span style="color: #0000ff"&gt;CONVERT&lt;/span&gt;(NVARCHAR(1),@is_active))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum48"&gt;  48:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum49"&gt;  49:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;IF&lt;/span&gt; (@action_type = &lt;span style="color: #006080"&gt;'A'&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum50"&gt;  50:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;BEGIN&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum51"&gt;  51:&lt;/span&gt;         INSERT &lt;span style="color: #0000ff"&gt;INTO&lt;/span&gt; Production.SW_PRODUCT_MODULE_E&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum52"&gt;  52:&lt;/span&gt;         ( PRODUCT_ID ,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum53"&gt;  53:&lt;/span&gt;           MODULE_ID ,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum54"&gt;  54:&lt;/span&gt;           MODULE_CNAME ,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum55"&gt;  55:&lt;/span&gt;           MODULE_ENAME ,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum56"&gt;  56:&lt;/span&gt;           IS_ACTIVE &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum57"&gt;  57:&lt;/span&gt;         )&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum58"&gt;  58:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;VALUES&lt;/span&gt;  (             &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum59"&gt;  59:&lt;/span&gt;         @productId,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum60"&gt;  60:&lt;/span&gt;         @moduleId,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum61"&gt;  61:&lt;/span&gt;         @encryp_moduleCName,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum62"&gt;  62:&lt;/span&gt;         @encryp_moduleEName,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum63"&gt;  63:&lt;/span&gt;         @encryp_is_active&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum64"&gt;  64:&lt;/span&gt;         )&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum65"&gt;  65:&lt;/span&gt;          &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum66"&gt;  66:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;END&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum67"&gt;  67:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum68"&gt;  68:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;IF&lt;/span&gt; (@action_type = &lt;span style="color: #006080"&gt;'U'&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum69"&gt;  69:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;BEGIN&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum70"&gt;  70:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;UPDATE&lt;/span&gt; Production.SW_PRODUCT_MODULE_E&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum71"&gt;  71:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; MODULE_CNAME = @encryp_moduleCName,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum72"&gt;  72:&lt;/span&gt;             MODULE_ENAME = @encryp_moduleEName,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum73"&gt;  73:&lt;/span&gt;             IS_ACTIVE = @encryp_is_active&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum74"&gt;  74:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt; PRODUCT_ID = @productId&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum75"&gt;  75:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;AND&lt;/span&gt; MODULE_ID = @moduleId&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum76"&gt;  76:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;END&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum77"&gt;  77:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum78"&gt;  78:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;IF&lt;/span&gt; (@action_type = &lt;span style="color: #006080"&gt;'D'&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum79"&gt;  79:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;BEGIN&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum80"&gt;  80:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;DELETE&lt;/span&gt; Production.SW_PRODUCT_MODULE_E&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum81"&gt;  81:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;WHERE&lt;/span&gt; PRODUCT_ID = @productId&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum82"&gt;  82:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;AND&lt;/span&gt; MODULE_ID = @moduleId&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum83"&gt;  83:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;END&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum84"&gt;  84:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum85"&gt;  85:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;END&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum86"&gt;  86:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;接下來，我們來新增一筆資料&lt;/p&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;EXEC&lt;/span&gt; dbo.sw_ModifyProductModule &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     @action_type = &lt;span style="color: #006080"&gt;'A'&lt;/span&gt;, &lt;span style="color: #008000"&gt;-- nchar(1)&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     @productId = &lt;span style="color: #006080"&gt;'PWP'&lt;/span&gt;, &lt;span style="color: #008000"&gt;-- nvarchar(10)&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     @moduleId = &lt;span style="color: #006080"&gt;'Security'&lt;/span&gt;, &lt;span style="color: #008000"&gt;-- nvarchar(10)&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     @moduleCName = &lt;span style="color: #006080"&gt;'權限控管模組'&lt;/span&gt;, &lt;span style="color: #008000"&gt;-- nvarchar(100)&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     @moduleEName = &lt;span style="color: #006080"&gt;'Security Module'&lt;/span&gt;, &lt;span style="color: #008000"&gt;-- nvarchar(10)&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     @is_active = 1 &lt;span style="color: #008000"&gt;-- smallint  &lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;   &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;結果你會發現資料真的被加密了&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TSVg_6_9rYI/AAAAAAAAEpQ/_5HFMlAzpog/s1600-h/image%5B16%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TSVhBDvb8FI/AAAAAAAAEpU/PFJYTR4P0mo/image_thumb%5B8%5D.png?imgmax=800" width="649" height="117"&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;那我們該如何讀取資料呢？&lt;/div&gt;&lt;br /&gt;&lt;h5&gt;建立檢視用的View&lt;/h5&gt;&lt;br /&gt;&lt;p&gt;為了讀取加密資料，同時又不想修改所有相關的SQL Statement，加上解密相關的語法，讓程式變得更複雜及更難維護，所以我會採取建立View的方式解決這個問題。&lt;/p&gt;&lt;br /&gt;&lt;p&gt;所以先來建立一個View&lt;br&gt;&lt;br /&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;br /&gt;&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;USE&lt;/span&gt; [PWP_NEW]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; &lt;span style="color: #008000"&gt;/****** Object:  View [dbo].[vwSW_PRODUCT_MODULE]    Script Date: 01/06/2011 13:58:55 ******/&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; ANSI_NULLS &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;SET&lt;/span&gt; QUOTED_IDENTIFIER &lt;span style="color: #0000ff"&gt;ON&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; [Production].[vwSW_PRODUCT_MODULE]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;             DATAID, &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;             PRODUCT_ID, &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;             MODULE_ID,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;CONVERT&lt;/span&gt;(NVARCHAR(10),DECRYPTBYASYMKEY(ASYMKEY_ID(&lt;span style="color: #006080"&gt;'SwEncryKey100'&lt;/span&gt;),MODULE_CNAME, N&lt;span style="color: #006080"&gt;'KevinTsui'&lt;/span&gt;)) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; MODULE_CNAME,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;CONVERT&lt;/span&gt;(NVARCHAR(50),DECRYPTBYASYMKEY(ASYMKEY_ID(&lt;span style="color: #006080"&gt;'SwEncryKey100'&lt;/span&gt;), MODULE_ENAME, N&lt;span style="color: #006080"&gt;'KevinTsui'&lt;/span&gt;)) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; MODULE_ENAME,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum21"&gt;  21:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;CONVERT&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;SMALLINT&lt;/span&gt;,&lt;span style="color: #0000ff"&gt;CONVERT&lt;/span&gt;(NVARCHAR(1), DECRYPTBYASYMKEY(ASYMKEY_ID(&lt;span style="color: #006080"&gt;'SwEncryKey100'&lt;/span&gt;), IS_ACTIVE, N&lt;span style="color: #006080"&gt;'KevinTsui'&lt;/span&gt;))) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; IS_ACTIVE,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum22"&gt;  22:&lt;/span&gt;             DATAFLAG&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum23"&gt;  23:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; Production.SW_PRODUCT_MODULE_E&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum24"&gt;  24:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum25"&gt;  25:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum26"&gt;  26:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum27"&gt;  27:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum28"&gt;  28:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum29"&gt;  29:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;再來看一下執行結果&lt;br&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TSVhBr-x9FI/AAAAAAAAEpY/UwNknar27L4/s1600-h/image%5B20%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TSVhCB__bNI/AAAAAAAAEpc/2e6Qpa51shg/image_thumb%5B10%5D.png?imgmax=800" width="660" height="176"&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;最後系統對應此架構做一個簡單的調整就可以執行了&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-7133071723692825037?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/7133071723692825037/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=7133071723692825037&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/7133071723692825037'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/7133071723692825037'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2011/01/blog-post.html' title='如何設計資料庫資料加密的機制'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/TSVg8ijtrKI/AAAAAAAAEo8/wGeQ_t3thWM/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-3055528520292360770</id><published>2010-12-28T15:00:00.000+08:00</published><updated>2010-12-28T15:01:34.154+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><title type='text'>Restore Visual Studio 2010 Project Template？</title><content type='html'>&lt;p&gt;昨天，嚐試安裝 DevExpress 這套 3-Party 元件。安裝的原因，不外乎是看上它的IDE Enhancement，讓IDE 畫面更加美觀，怎知，安裝後才是悲慘的開始。&lt;/p&gt;  &lt;p&gt;安裝成功後，迫不及待的開啟 Visual Studio 2010，赫然發現整個Visual Studio 慢到不行，以我的NB，四核加上8G記憶體，卻拖不動它，嚇得我馬上移除安裝。移除後，另外一個問題產生了，我的Project Template，不知道為什麼只剩下一半？如圖所示    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TRmLRFdGIzI/AAAAAAAAEoo/zDaWoagikZA/s1600-h/image3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TRmLSUWSm-I/AAAAAAAAEos/l08kHaiLYWs/image_thumb1.png?imgmax=800" width="635" height="409" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;哎…當然，Visual Studio 2010 有儲存備份的Project Tempalte，放置在    &lt;br /&gt;&lt;strong&gt;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp      &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;若你的作業系統是32 Bits的會在    &lt;br /&gt;&lt;strong&gt;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;我們可以利用另外一種作法：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;開啟 Visual Studio Command Prompt (2010)      &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TRmLSmh4TiI/AAAAAAAAEow/gHFU2ylBkM0/s1600-h/image6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TRmLTWB2UPI/AAAAAAAAEo0/NPTTc-WQidE/image_thumb2.png?imgmax=800" width="244" height="46" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;輸入「devenv /installvstemplates」 &lt;/li&gt;    &lt;li&gt;重新開啟 Visual Studio 2010 檢查相關設定 &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;沒想到…還是失敗了，最後只得走向 Reinstall Visual Studio 2010 一途&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-3055528520292360770?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/3055528520292360770/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=3055528520292360770&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/3055528520292360770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/3055528520292360770'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/12/restore-visual-studio-2010-project.html' title='Restore Visual Studio 2010 Project Template？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/TRmLSUWSm-I/AAAAAAAAEos/l08kHaiLYWs/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-2039204075885849381</id><published>2010-12-13T14:53:00.000+08:00</published><updated>2010-12-13T14:54:58.313+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><title type='text'>Visual Studio 2010 Database Project中的Post-Deployment Script中會出現SQL80001的錯誤訊息</title><content type='html'>&lt;p&gt;Visual Studio 2010 在Premium以上的版本就提供資料庫專案，讓程式開發人員可以利用Visual Studio 2010 直接管理資料庫原始碼、Schema Compare、Data Compare，甚至於部署。&lt;/p&gt;  &lt;p&gt;在資料庫專案中，它還有預設的兩個事件允許我們在部署的過程中，Pre-Deployment及Post-Deployment，如下圖所示   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TQXDFq6AUbI/AAAAAAAAEn0/894GqQ_f3lo/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TQXDHcDxF5I/AAAAAAAAEn8/j8UtrhUhtNs/image_thumb%5B1%5D.png?imgmax=800" width="372" height="272" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;用法可能是&lt;/p&gt;  &lt;p&gt;Pre-Deployment：在部署資料庫結構之前，我可能需事先進立資料庫及Schema之類的物件。&lt;/p&gt;  &lt;p&gt;Post-Deployment：在資料庫部署完成後，我可能需要事後先匯入一些基本資料。&lt;/p&gt;  &lt;p&gt;所以，當你點開Script.PostDeployment.sql 或是 Script.PreDeployment.sql, 你可以看到檔案所提供的預設範本：   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TQXDIYO15LI/AAAAAAAAEoA/2QqOwT7Ocfs/s1600-h/image%5B7%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TQXDJTxngkI/AAAAAAAAEoE/w9cqBlv-fJE/image_thumb%5B3%5D.png?imgmax=800" width="649" height="195" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;很不幸的，當我們照著做寫下…   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TQXDJ9DRkaI/AAAAAAAAEoI/KnPsxM2Xwe8/s1600-h/image%5B11%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TQXDK26WkWI/AAAAAAAAEoM/2uAEsJdmZuw/image_thumb%5B5%5D.png?imgmax=800" width="663" height="235" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;結果…卻是出現SQL80001的錯誤訊息。&lt;/p&gt;  &lt;p&gt;原來，你必須手動調整設定，開啟「SQLCMD Mode」，如下圖所示   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TQXDNOPq_rI/AAAAAAAAEoQ/GkTTbGFGaK8/s1600-h/image%5B16%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TQXDO7ySa8I/AAAAAAAAEoU/HMgsLMSJT6g/image_thumb%5B8%5D.png?imgmax=800" width="602" height="320" /&gt;&lt;/a&gt;&lt;/p&gt;        &lt;p&gt;開啟後，你就會發現檔案不再會出現紅色底線哦   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TQXDPbsS0JI/AAAAAAAAEoY/WwFP3K_jEZ4/s1600-h/image%5B20%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TQXDQS5GB0I/AAAAAAAAEoc/RE7TN5m2QDo/image_thumb%5B10%5D.png?imgmax=800" width="620" height="227" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-2039204075885849381?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/2039204075885849381/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=2039204075885849381&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2039204075885849381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2039204075885849381'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/12/visual-studio-2010-database-projectpost.html' title='Visual Studio 2010 Database Project中的Post-Deployment Script中會出現SQL80001的錯誤訊息'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BiAIh45tOHE/TQXDHcDxF5I/AAAAAAAAEn8/j8UtrhUhtNs/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-6868178384828630435</id><published>2010-12-05T03:21:00.000+08:00</published><updated>2010-12-05T03:22:24.352+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Source Controller'/><title type='text'>How to Undo Convert to Branch ?</title><content type='html'>&lt;p&gt;在 Team Foundation Server 中有一個新功能：Convert to Branch，其用意是產生Branch Hierarchy 圖表。如圖所示：   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TPqU1bXWhQI/AAAAAAAAEnM/f00f56rDc7c/s1600-h/image%5B2%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TPqU2D1XtTI/AAAAAAAAEnQ/3ZB6J-42gUo/image_thumb.png?imgmax=800" width="242" height="244" /&gt;&lt;/a&gt;    &lt;br /&gt;所以我們可以執行「View History」顯示Branch Hierarchy圖形來了解目前的Branch狀況    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TPqU21YSmlI/AAAAAAAAEnU/excI7-MsFck/s1600-h/image%5B8%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TPqU3UgVn8I/AAAAAAAAEnY/RQurR15g45k/image_thumb%5B4%5D.png?imgmax=800" width="260" height="195" /&gt;&lt;/a&gt;    &lt;br /&gt;但是我們在其它的Branch狀況下，也會遇到這個問題    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TPqU4JYFRTI/AAAAAAAAEnc/cYls1JQANsw/s1600-h/image%5B12%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TPqU4nP0zsI/AAAAAAAAEng/lJK7XrM1Uog/image_thumb%5B6%5D.png?imgmax=800" width="342" height="160" /&gt;&lt;/a&gt;    &lt;br /&gt;這個訊息告訴我們，在我們要分支的目錄下已經有其它的分支存在。其實在這個目錄下並沒有其它的分支，只是某一個目錄可能已經執行過「Convert to Branch」。&lt;/p&gt;  &lt;p&gt;我們該如何解決這個問題呢？在Source Control中，先點選有問題的目錄(指已執行過Convert to Branch 的目錄)。然後，點選 File –&amp;gt; Source Control –&amp;gt; Branching and Merging –&amp;gt; Convert to Folder   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TPqU5geBp7I/AAAAAAAAEnk/TTSU4pNHrB0/s1600-h/image%5B17%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TPqU6oUkOcI/AAAAAAAAEno/fNckly9wtSM/image_thumb%5B9%5D.png?imgmax=800" width="640" height="523" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;你會發現目錄恢復正常了，如下圖所示   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TPqU7LWp3vI/AAAAAAAAEns/n3S8aU5hr3M/s1600-h/image%5B20%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TPqU71SKYFI/AAAAAAAAEnw/G3F6kgSa9Vo/image_thumb%5B10%5D.png?imgmax=800" width="242" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;接下來，你又可以正常執行 Branch 囉&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-6868178384828630435?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/6868178384828630435/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=6868178384828630435&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/6868178384828630435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/6868178384828630435'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/12/how-to-undo-convert-to-branch.html' title='How to Undo Convert to Branch ?'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_BiAIh45tOHE/TPqU2D1XtTI/AAAAAAAAEnQ/3ZB6J-42gUo/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-1458851247042419526</id><published>2010-12-01T19:37:00.000+08:00</published><updated>2010-12-01T19:37:37.968+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visio 2010'/><title type='text'>Visio 2010 Database Data Model 正向工程？</title><content type='html'>&lt;p&gt;Visio Professional 一直以來都只提供資料庫反向工程，不提供正向工程，所以當我們由資料庫拉出ER-Model Diagram之後，經過修改卻沒有辦法同步回資料庫，真的粉不方便。&lt;/p&gt;  &lt;p&gt;在之前Visio 2000, 2003時，微軟多了一個版本：Visio for Enterprise Architecture中提供資料庫正向工程。那現在的Visio 2010 怎麼辦呢？已經沒有Visio 2010 for Enterprise Architecture，那怎麼做資料庫正向工程呢？沒有辦法，只有去拜…Google 大神&lt;/p&gt;  &lt;p&gt;終於找到一位高手寫了一個小程式，雖然是Beta版，但是他Open 他的程式碼哦，詳細請看：   &lt;br /&gt;&lt;a title="http://sqlblog.com/blogs/alberto_ferrari/archive/2010/04/16/visio-forward-engineer-addin-for-office-2010.aspx" href="http://sqlblog.com/blogs/alberto_ferrari/archive/2010/04/16/visio-forward-engineer-addin-for-office-2010.aspx"&gt;http://sqlblog.com/blogs/alberto_ferrari/archive/2010/04/16/visio-forward-engineer-addin-for-office-2010.aspx&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-1458851247042419526?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/1458851247042419526/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=1458851247042419526&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1458851247042419526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1458851247042419526'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/12/visio-2010-database-data-model.html' title='Visio 2010 Database Data Model 正向工程？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-7186870079734801750</id><published>2010-11-25T17:02:00.000+08:00</published><updated>2010-11-25T17:08:06.783+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft ALM'/><title type='text'>Visual Studio 2010 Feature Pack 2 除包含前一版程式碼視覺化及塑模工具外，另增強測試相容性。</title><content type='html'>&lt;p&gt;Visual Studio 2010 Feature Pack 2 已經正式 Release了，它包含了下列幾個功能：&lt;/p&gt;  &lt;p&gt;測試部份：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;測試管理員(Microsoft Test Manager )&lt;font color="#c0504d"&gt;支援 Silverlight 4 應用程式&lt;/font&gt;。&lt;/li&gt;    &lt;li&gt;Visual Studio 2010 Premium 或 Visual Studio 2010 Ultimate 版本支援Silverlight 4 應用程式的Coded UI 測試。&lt;/li&gt;    &lt;li&gt;Visual Studio 2010 Premium 或 Visual Studio 2010 Ultimate 版本的Coded UI 測試支援圖形化編輯。&lt;/li&gt;    &lt;li&gt;手動測試&lt;font color="#c0504d"&gt;支援 Mozilla Firefox 3.5 及 3.6&lt;/font&gt;。&lt;/li&gt;    &lt;li&gt;Visual Studio 2010 Premium 或 Visual Studio 2010 Ultimate 版本可以使用 Mozilla Firefox 3.5 及3.6 來執行 Web 應用程式的Coded UI測試。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;程式碼視覺化及塑模功能(必須是 Visual Studio 2010 Ultimate)&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font color="#c0504d"&gt;在 UML Class Diagram 中可以執行「Generate Code」來產生對應的程式碼。你可以使用預設的轉換功能，或是你可以客製化轉換的規則。&lt;/font&gt;&lt;font color="#0000ff"&gt; –&amp;gt; Visual Studio 2010 的 UML Class Diagram 終於可以產生程式碼囉…&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font color="#c0504d"&gt;由已存在的程式碼產生 UML Class Diagram。&lt;/font&gt;&lt;font color="#0000ff"&gt;—&amp;gt;也有反向的功能&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;使用 Dependency Diagram，有組織的瀏覧C, C++及ASP.NET 專案之間的關聯。&lt;/li&gt;    &lt;li&gt;&lt;font color="#c0504d"&gt;可以匯入由其它塑模工具所匯出的XMI 2.1 規格的檔案資料，用來產生 UML Sequence &lt;/font&gt;&lt;font color="#c0504d"&gt;Diagram、Class Diagram 及 Use Case Diagram。&lt;/font&gt;&lt;font color="#0000ff"&gt;—&amp;gt;也可以匯入別的UML Tools的圖形&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;可以直接在 UML Element 上建立Work Item，並檢視Work Item。&lt;/li&gt;    &lt;li&gt;C 或 C++ 程式碼也可以使用Layer Diagram，並驗證其依存性。&lt;/li&gt;    &lt;li&gt;可撰寫程式碼修改 Layer Diagram，並驗證 Layer Diagram 對應到的程式碼。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;詳細的說明，各位可以到 &lt;a href="http://msdn.microsoft.com/en-us/vstudio/ff655021.aspx" target="_blank"&gt;MSDN 上的 Visual Studio Feature Pack&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-7186870079734801750?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/7186870079734801750/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=7186870079734801750&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/7186870079734801750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/7186870079734801750'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/11/visual-studio-2010-feature-pack-2.html' title='Visual Studio 2010 Feature Pack 2 除包含前一版程式碼視覺化及塑模工具外，另增強測試相容性。'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-4018515571063660082</id><published>2010-10-31T03:15:00.000+08:00</published><updated>2010-10-31T03:16:12.115+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><title type='text'>Built-in Managed Code Analysis Rules</title><content type='html'>&lt;p&gt;資料來源：&lt;a href="http://as.wiley.com/WileyCDA/WileyTitle/productCd-0470484268.html" target="_blank"&gt;Prefessional Application Lieftcycle Management with Visual Studio 2010&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Table : Groups of Rules&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="638"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="181"&gt;         &lt;h5&gt;&lt;font style="font-weight: "&gt;規則群組 (規則數目)&lt;/font&gt;&lt;/h5&gt;       &lt;/td&gt;        &lt;td valign="top" width="455"&gt;         &lt;h5&gt;&lt;font style="font-weight: "&gt;描述&lt;/font&gt;&lt;/h5&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Design (62)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;基本上focus在程式碼的結構及介面。這個群組要求類別、事件、集合及參數都按照一般的觀念適當的實作。         &lt;br /&gt;你可以依照 &lt;a href="http://msdn.microsoft.com/zh-tw/library/czefa0ke(v=vs.71).aspx" target="_blank"&gt;Design Guidelines for Class Library Developers&lt;/a&gt; 解決這一類的問題。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Globalization (11)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這個群組包含如何撰寫國際化程式碼的練習。         &lt;br /&gt;它包含避免字串只照字面上意義，正確的使用CultureInfo及格式化。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Interoperability (17)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這個群組則focus 在正確的使用COM Interop。         &lt;br /&gt;包含適當的使用PInvoke，ComVisible屬性及marshalling的規則。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Maintainability (6)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這些規則可以幫助讓你的程式碼更容易維護。         &lt;br /&gt;這個群組識別潛在的問題，例如：複雜及過度使用繼承。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Mobility (2)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這些規則可以幫助偵測實際上無法在mobile或離線環境中執行的程式碼。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Naming (24)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這個群組要求，同「Design Guidelines」描述的命名原則。         &lt;br /&gt;使用這些規則驗證組件、類別、類別成員及變數必須符合標準。某些規則甚至可以幫助你發現拼字錯誤。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Performance (17)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這些規則可以幫助你發現程式碼中可以做效能最佳化的地方。         &lt;br /&gt;它們可以偵測各式各樣的浪費效能或是無用的程式碼。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Portability (3)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這些規則可以發現哪些程式碼可能無法跨平台。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Reliability (6)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這個群組可以偵測你的程式碼內會造成無預警錯誤的部份，包含物件的消滅、不當的使用GC，錯誤的使用thread…等。         &lt;br /&gt;這些規則非常有用，因為無預警的錯誤通常非常困難被發現及改善的。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Security (26)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這些規則可幫助辨認不夠安全或是不正確的安全作法。         &lt;br /&gt;規則可以尋找遺失的屬性，不適當的安全作法及SQL Injection攻擊的機會。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="181"&gt;Usage (42)&lt;/td&gt;        &lt;td valign="top" width="455"&gt;這些規則包含一個廣大範圍的實作。         &lt;br /&gt;鑑於典型的 design 規則群組包含了API結構，這些規則影響著程式碼的方法論。          &lt;br /&gt;包含適當的例外處理機制、數學運算溢位的管理、序例化及繼承的實作。&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-4018515571063660082?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/4018515571063660082/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=4018515571063660082&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4018515571063660082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4018515571063660082'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/10/built-in-managed-code-analysis-rules.html' title='Built-in Managed Code Analysis Rules'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5638350815079742158</id><published>2010-10-27T02:23:00.000+08:00</published><updated>2010-10-27T02:26:50.344+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Team Foundation Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><title type='text'>如何客製化 Visual Studio 2010 程式碼分析規則</title><content type='html'>&lt;p&gt;要撰寫程式碼分析規則，首先你必須使用 Visual Studio 2010 Premium 以上的版本。接著，在你的環境中必須先安裝 FxCop 1.36。而 FxCop 1.36 被包含在「&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b" target="_blank"&gt;Microsoft Windows SDK for Windows 7 and .NET Framework 4&lt;/a&gt;」中，所以你必須先下載 &lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=6b6c21d2-2006-4afa-9702-529fa782d63b" target="_blank"&gt;Microsoft Windows SDK for Windows 7 and .NET Framework 4&lt;/a&gt; 並且安裝，你就可以在 %ProgramFiles%\MicrosoftSDKs\Windows\v7.1\Bin\FXCop 目錄找到FxCop 1.36的安裝檔，記得安裝它。&lt;/p&gt;  &lt;p&gt;接下來，我們開始撰寫程式碼囉&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;建立一個Class Library專案，專案名稱為「MyCustomRules」 &lt;/li&gt;    &lt;li&gt;加入參考      &lt;br /&gt;至 C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop 目錄下，將FxCopSdk.dll及Microsoft.Cci.dll 加入參考中。 &lt;/li&gt;    &lt;li&gt;新增一個Xml File，檔名為「RuleMetadata.xml」      &lt;br /&gt;這個檔案會儲存規則的數個屬性，包含：規則的描述(description)，解決方法(resolutions)，訊息層級(message level)，管理者連絡資訊(owner contact info)…等資訊。先加上下列 XML 內容       &lt;br /&gt;      &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 641px; padding-right: 5px; height: 86px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Rules&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FriendlyName&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;My Custom FxCop Rules&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Rules&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;    &lt;ul&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#c0504d"&gt;記得將XML File設定成內嵌資源&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;    &lt;/ul&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;刪除class1.cs，並加入BaseFxCopRule.cs，程式碼如下： &lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 566px; padding-right: 5px; height: 452px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Microsoft.FxCop.Sdk;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; MyCustomRules&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;abstract&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; BaseFxCopRule : BaseIntrospectionRule&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; BaseFxCopRule(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; ruleName)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            : &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;(ruleName, &amp;quot;&lt;span style="color: #8b0000"&gt;MyCustomRules.RuleMetadata&lt;/span&gt;&amp;quot;, &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(BaseFxCopRule).Assembly)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        { }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;    &lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;ul&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#c0504d"&gt;重點在於字串「MyCustomRules.RuleMetadata」。這個參數指的是resource name。由於RuleMetadata.xml 已經被設定是內嵌資源，要叫用它則這個字串的規則就變成是{Dafault Namespace}.{Xml File Name}。 &lt;br /&gt;          &lt;br /&gt;若字串錯誤，則程式會無法叫用。&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;    &lt;/ul&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;接著，我們來撰寫真正的程式碼。首先，先新增一個類別(Class)：EnforceCustomNaming.cs，並繼承 BaseFxCopRule。 &lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 504px; padding-right: 5px; height: 534px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Text;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Microsoft.FxCop.Sdk;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; MyCustomRules&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;internal&lt;/span&gt; &lt;span style="color: #0000ff"&gt;sealed&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; EnforceCustomNaming &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        : BaseFxCopRule&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #808080"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #808080"&gt;/// 建構子 - 指定 Rule Name&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #808080"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; EnforceCustomNaming():&lt;span style="color: #0000ff"&gt;base&lt;/span&gt;(&amp;quot;&lt;span style="color: #8b0000"&gt;EnforceCustomNaming&lt;/span&gt;&amp;quot;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        {}&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;    &lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;ul&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#000000"&gt;其中的base(“EnforceCustomNaming”)，用來指定RuleName，這個RuleName 必須存在於RuleMetadata.xml中。(接下來的動作，會在RuleMetadata.xml 中加上這個Rule的相關資訊)&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;    &lt;/ul&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;接下來覆寫 Check 這個方法。執行程式碼分析時會叫用這個方法。我們撰寫一個檢核，Field 必須符合以下的命名原則。若是 Static Field，則必須是「s_」帶頭，若不是Static Field，則一律用「m_」。 &lt;br /&gt;      &lt;br /&gt;首先程式碼必須先確定傳入的參數是否為 Field，我們會利用Microsoft.FxCop.Sdk.Field 來判斷。接下來，就會判斷它是不是Static。 &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;若是，則必須是「s_」帶頭；若不是，則必須是「m_」帶頭。 &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 593px; padding-right: 5px; height: 807px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; Microsoft.FxCop.Sdk.ProblemCollection Check(Microsoft.FxCop.Sdk.Member member)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            &lt;span style="color: #008000"&gt;//return base.Check(member);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            Field field = member &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Field;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (field == &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;; &lt;span style="color: #008000"&gt;//這個規則只驗證在Field上&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (field.IsStatic)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                CheckFieldName(field, s_staticFieldPrefix);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                CheckFieldName(field, s_nonStaticFieldPrefix);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Problems;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s_staticFieldPrefix = &amp;quot;&lt;span style="color: #8b0000"&gt;s_&lt;/span&gt;&amp;quot;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; s_nonStaticFieldPrefix = &amp;quot;&lt;span style="color: #8b0000"&gt;m_&lt;/span&gt;&amp;quot;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; CheckFieldName(Field field, &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; expectedPrefix)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!field.Name.Name.StartsWith(expectedPrefix, StringComparison.Ordinal))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                Resolution resolution = GetResolution(&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                    field,          &lt;span style="color: #008000"&gt;//Field {0} 不符合匈牙利命名原則&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                    expectedPrefix  &lt;span style="color: #008000"&gt;//Field Name 前置調必須是 {1}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                    );&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                Problem problem = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Problem(resolution);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                Problems.Add(problem);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;    &lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;ul&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#000000"&gt;其中要特別說明的 Resolution resolution = GetResolution(field, exptectedPrefix)。GetResolution 這個方法會依你在建構子的地方，指定的RuleName，至RuleMetadata.xml中的該Rule 設定中找尋&amp;lt;Resolution&amp;gt;所設定的資訊。 &lt;br /&gt;          &lt;br /&gt;這個範例中為什麼要傳入兩個參數，那是因為我們在Resolution中設定了一個字串：「&lt;/font&gt;Field {0} 不符合匈牙利命名原則，Field Name 前置調必須是 {1}」。這個字串將會是執行程式碼分析發現問題後，所顯示的文字。 &lt;/li&gt;&lt;br /&gt;    &lt;/ul&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;最後，我們在RuleMetadata.mxl中補上 Rule及相關資訊。&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;規則的顯示名稱(TypeName)&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;規則的描述(Description)&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;一至多個的規則解決方法(Resolution)&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;規則的訊息層級(MessageLevel)&lt;/font&gt; &lt;br /&gt;&lt;br /&gt;    &lt;ul&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#000000"&gt;CriticalError&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#000000"&gt;Error&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#000000"&gt;CriticalWarning&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#000000"&gt;Warning&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;      &lt;li&gt;&lt;font color="#000000"&gt;Information&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;    &lt;/ul&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;規則的精準度(Certainty)&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;FixCategory&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;文件的連結位置(Url)&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;規則的擁有者(Owner)&lt;/font&gt; &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#000000"&gt;規則的電子郵件連絡資訊(Email) &lt;br /&gt;      &lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 508px; padding-right: 5px; height: 336px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Rule&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TypeName&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;EnforceCustomNaming&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Category&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;MyRules&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;CheckId&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;SW1000&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;檢核匈牙利命名原則&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;檢核 Field 是否符合匈牙利命名原則&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Resolution&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Field {0} 不符合匈牙利命名原則，&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;Field Name 前置調必須是 {1}&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Resolution&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;MessageLevel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Certainty&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;100&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Warning&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;MessageLevel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;FixCategories&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;NonBreaking&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;FixCategories&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Url&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Owner&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Email&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;  &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Rule&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;如何 Debug 客製化程式碼分析規則&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;要利用FxCop Debug 你的客製化規則，其實很簡單。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;開啟專案屬性，選擇「偵錯」頁籤。將啟動動作指定成「起始外部程式」，並將路徑指向&lt;br /&gt;    &lt;br /&gt;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;在起始選項區塊中的命令列的引數方塊中，填入&lt;br /&gt;    &lt;br /&gt;/out:”result.xml” /file:”MyCustomRules.dll” /rule:”MyCustomRules.dll” /D:”C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop”&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;所謂的&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;/out：指Xml 報告的輸出檔。&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;/file:指要分析的組件檔。&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;/rule：指含有規則的組件。&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;/D:指搜尋組件相依性的位置。&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;指定工作目錄是該專案的建置後擺放的目錄(build output folder)&lt;br /&gt;    &lt;br /&gt;例如：C:\VS2010_Demo\CodeAnalysis\MyCustomRules\bin\Debug&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TMcc0-Yy6YI/AAAAAAAAEnE/_EKmCHfDXdE/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TMcc1s8idkI/AAAAAAAAEnI/N1kSZt47-Os/image_thumb%5B2%5D.png?imgmax=800" width="582" height="371" /&gt;&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;這個時間，你可以在下列程式碼上下一個中斷點。&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 610px; padding-right: 5px; height: 81px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!field.Name.Name.StartsWith(ExpectedPrefix, &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;                                StringComparison.Ordinal))&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;按下 F5，若中斷點有停下來，則系統就可以進行debug了。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font color="#0000ff"&gt;最後說明一下，如何將你撰寫完成的客製化規則放入Visual Studio 2010中。&lt;br /&gt;    &lt;br /&gt;我們可以透過 Visual Studio 2010 的新功能，簡單又快速的將客製化規則整合至Visual Studio 2010 - 將你撰寫完成的客製化規則組件複製到 C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Rules 目錄後，重新開起你的Visual Studio 2010，你就可以在「程式碼分析」的頁籤裏看到你的客製化規則囉。&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5638350815079742158?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5638350815079742158/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5638350815079742158&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5638350815079742158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5638350815079742158'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/10/visual-studio-2010.html' title='如何客製化 Visual Studio 2010 程式碼分析規則'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BiAIh45tOHE/TMcc1s8idkI/AAAAAAAAEnI/N1kSZt47-Os/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5319906905148756604</id><published>2010-10-26T18:28:00.001+08:00</published><updated>2010-10-26T18:28:27.351+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 3.5'/><title type='text'>Linq 如何對 ArrayList 進行查詢動作</title><content type='html'>&lt;p&gt;一般而言ArrayList內並不會擺放泛型的型別。所以當我們用一般的Linq 語法是無法使用的。我們必須在Linq上使用明確的型別，如下面的例子所示，這樣的寫法就可以使用Linq 查詢ArrayList中的資料。&lt;/p&gt;  &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;var weekDayList = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ArrayList{&amp;quot;&lt;span style="color: #8b0000"&gt;Mon&lt;/span&gt;&amp;quot;,&amp;quot;&lt;span style="color: #8b0000"&gt;Tue&lt;/span&gt;&amp;quot;,&amp;quot;&lt;span style="color: #8b0000"&gt;Wed&lt;/span&gt;&amp;quot;,&amp;quot;&lt;span style="color: #8b0000"&gt;Thu&lt;/span&gt;&amp;quot;,&amp;quot;&lt;span style="color: #8b0000"&gt;Fri&lt;/span&gt;&amp;quot;,&amp;quot;&lt;span style="color: #8b0000"&gt;Sat&lt;/span&gt;&amp;quot;,&amp;quot;&lt;span style="color: #8b0000"&gt;Sun&lt;/span&gt;&amp;quot;};&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;var q = from &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; c &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; weekDayList&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;		select c;&lt;/pre&gt;&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5319906905148756604?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5319906905148756604/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5319906905148756604&amp;isPopup=true' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5319906905148756604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5319906905148756604'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/10/linq-arraylist.html' title='Linq 如何對 ArrayList 進行查詢動作'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5494248589610585731</id><published>2010-10-19T01:32:00.000+08:00</published><updated>2010-10-19T01:34:45.158+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>FxCop 10.0 (靜態程式碼分析)下載位置</title><content type='html'>&lt;p&gt;你可以在下列網址下載   &lt;br /&gt;&lt;a title="Download details- FxCop 10.0" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=917023f6-d5b7-41bb-bbc0-411a7d66cf3c"&gt;Download details- FxCop 10.0&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;你也可以安裝 Microsoft Windows SDK for Windows 7 and .NET Framework 4 Version 7.1，在已經安裝的目錄：%ProgramFiles%\Microsoft SDKs\Windows\v7.1\Bin\FxCop 的目錄下有一個檔案：FxCopSetup.exe   &lt;br /&gt;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=35AEDA01-421D-4BA5-B44B-543DC8C33A20" target="_blank"&gt;Microsoft Windows SDK for Windows 7 and .NET Framework 4 (ISO)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;如果你需要的是 FxCop 1.36，請下載 Windows SDK Version 7.0&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5494248589610585731?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5494248589610585731/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5494248589610585731&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5494248589610585731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5494248589610585731'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/10/fxcop-100.html' title='FxCop 10.0 (靜態程式碼分析)下載位置'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8072866305847065769</id><published>2010-10-14T03:08:00.000+08:00</published><updated>2010-10-14T03:53:10.428+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Team Foundation Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><title type='text'>Team Foundation Server 2010 ：客製化簽入原則 (Custom CheckIn Policy)</title><content type='html'>&lt;p&gt;Team Foundation Server 的 source control，從第一版 Team Foundation Server 2005 開始就提供簽入原則及可客製化簽入原則這個機制。老實說，客製化簽入原則的方式與舊版的方式沒有什麼差別。只是，今天忽然有興趣來研究了一下，忽然發現原來真的不難，還蠻簡單就可以完成一個客製化的簽入原則，不多說，我們來看看如何做一個客製化的簽入原則吧。&lt;/p&gt;  &lt;p&gt;首先，我們先新增一個專案，類型是 Class Library ，專案名稱：swCheckInPolicy。如下圖所示：    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TLYEIM0PaEI/AAAAAAAAEmQ/VY8IpXmZ24M/s1600-h/image3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TLYEJQrHPTI/AAAAAAAAEmU/Ih2XDhYM9mU/image_thumb1.png?imgmax=800" width="413" height="253" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;接著開啟預設的Class1.cs，在程式碼編輯器裏的Class1上，按滑鼠右鍵選擇Refactor—&amp;gt;rename    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLYEKQtBAAI/AAAAAAAAEmY/Y9MI4R4-8YA/s1600-h/image7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TLYELEtxo3I/AAAAAAAAEmc/HozQJjmRGRA/image_thumb3.png?imgmax=800" width="420" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;在rename對話框中，將class1改成CheckForCommetPolicy。    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TLYEMKNVSXI/AAAAAAAAEmg/qRJ_USaZNxc/s1600-h/image11.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TLYEM381eYI/AAAAAAAAEmk/EieTYZj03xQ/image_thumb5.png?imgmax=800" width="412" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;完成後，在Solution Explorer中，再將class1.cs 更名成 CheckForCommetPolicy。好了，準備動作完成，正式開始進行 Custom CheckIn Policy 元件的撰寫。&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;加入 System.Windows.Form.dll 的參考。因為在接下來的程式碼裏，你需要呼叫MessageBox 這個類別，用來顯示提示訊息。      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TLYENuSNAyI/AAAAAAAAEmo/NlnXgy_naTE/s1600-h/image15.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TLYEPOBpFwI/AAAAAAAAEms/Pgfqw-9VWqc/image_thumb7.png?imgmax=800" width="490" height="283" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;加入&amp;#160; Microsoft.TeamFoundaton.VersionControl.Client 的參考。      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TLYEP4BofnI/AAAAAAAAEmw/QM_U2KNO4uM/s1600-h/image19.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TLYEQ5WkAYI/AAAAAAAAEm0/5--Ppyg3u98/image_thumb9.png?imgmax=800" width="474" height="274" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;CheckForCommetPolicy 必須繼承 PolicyBase，同時需實作或覆寫相關的方法及屬性。 並在Class 上加上一個attribute：Serializable。      &lt;br /&gt;&lt;span style="color: blue"&gt;using &lt;/span&gt;System;       &lt;br /&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt;System.Collections.Generic;       &lt;br /&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt;System.Linq;       &lt;br /&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt;System.Text;       &lt;br /&gt;&lt;span style="color: blue"&gt;using&lt;/span&gt;Microsoft.TeamFoundation.VersionControl.Client;       &lt;br /&gt;      &lt;br /&gt;&lt;span style="color: blue"&gt;namespace&lt;/span&gt;swCheckInPolicy       &lt;br /&gt;{       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; [&lt;span style="color: #2b91af"&gt;Serializable&lt;/span&gt;]       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;public class&lt;/span&gt;&lt;span style="color: #2b91af"&gt;CheckForCommetPolicy&lt;/span&gt;: &lt;span style="color: #2b91af"&gt;PolicyBase        &lt;br /&gt;&amp;#160;&amp;#160; &lt;/span&gt;{       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;public override bool&lt;/span&gt;Edit(&lt;span style="color: #2b91af"&gt;IPolicyEditArgs&lt;/span&gt;policyEditArgs)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;throw new&lt;/span&gt;&lt;span style="color: #00008b"&gt;NotImplementedException&lt;/span&gt;();       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;public override string&lt;/span&gt;Type       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;get&lt;/span&gt;{ &lt;span style="color: blue"&gt;throw new&lt;/span&gt;&lt;span style="color: #00008b"&gt;NotImplementedException&lt;/span&gt;(); }       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;public override string&lt;/span&gt;TypeDescription       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;get&lt;/span&gt;{ &lt;span style="color: blue"&gt;throw new&lt;/span&gt;&lt;span style="color: #00008b"&gt;NotImplementedException&lt;/span&gt;(); }       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;public override string&lt;/span&gt;Description       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;get&lt;/span&gt;{ &lt;span style="color: blue"&gt;throw new&lt;/span&gt;&lt;span style="color: #00008b"&gt;NotImplementedException&lt;/span&gt;(); }       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;public override&lt;/span&gt;&lt;span style="color: #2b91af"&gt;PolicyFailure&lt;/span&gt;[] Evaluate()       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;span style="color: blue"&gt;throw new&lt;/span&gt;&lt;span style="color: #00008b"&gt;NotImplementedException&lt;/span&gt;();       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }       &lt;br /&gt;}       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Description 屬性：這個原則的說明&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160; &lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Description&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;get&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt;提醒使用者在簽入時加入有意義的註解&lt;/span&gt;&amp;quot;; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;覆寫 InstallationInstructions 屬性：這個字串會儲存在source control server上，當使用者沒有安裝這個元件時，就會顯示這個訊息。你也可以在這個屬性中留下使用者該如何安裝的訊息。 &lt;br /&gt;    &lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; InstallationInstructions&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;get&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt;需安裝博暉科技研發處客製化簽入原則元件，請連絡 Joseph&lt;/span&gt;&amp;quot;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #008000"&gt;//set&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #008000"&gt;//{&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #008000"&gt;//    base.InstallationInstructions = value;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #008000"&gt;//}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Type 屬性：顯示在 Policy List 中的名稱。 &lt;br /&gt;    &lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Type&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;get&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt;必須填寫簽入註解的原則&lt;/span&gt;&amp;quot;; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;TypeDescription 屬性：顯示在新增 CheckIn Policy 的對話框中的說明。 &lt;br /&gt;    &lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; TypeDescription&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;get&lt;/span&gt; { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &amp;quot;&lt;span style="color: #8b0000"&gt;這個原則將會檢核使用者在簽入原始碼時是否有填寫註解&lt;/span&gt;&amp;quot;; }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Edit 方法：當你在新增或修改原則時，會被呼叫的方法。你也可以在這個方法中實作這個原則的特殊畫面，讓使用者可以變更原則的參數。 &lt;br /&gt;    &lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; Edit(IPolicyEditArgs policyEditArgs)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #008000"&gt;//在這個原則，不需要進行客製化&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Evaluate 方法：真正檢核的程式碼。這個例子，我們是要實作簽入時一定要填寫註解。所以原始碼如下。 &lt;br /&gt;    &lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; PolicyFailure[] Evaluate()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; proposedCommet = PendingCheckin.PendingChanges.Comment;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.IsNullOrEmpty(proposedCommet))&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PolicyFailure[]{&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PolicyFailure(&amp;quot;&lt;span style="color: #8b0000"&gt;當你在簽入原始碼時，請填入有意義的註解&lt;/span&gt;&amp;quot;,&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                    };&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PolicyFailure[0];&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;Activate 方法：當驗證失敗後出現錯誤訊息時，若使用者在訊息上Double Click，會呼叫這個方法。一般而言，我們會提供較詳細的說明，包含為什麼沒有通過驗證，要如何才能通過驗證這些訊息。 &lt;br /&gt;    &lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Activate(PolicyFailure failure)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            &lt;span style="color: #008000"&gt;//base.Activate(failure);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            MessageBox.Show(&amp;quot;&lt;span style="color: #8b0000"&gt;在簽入時，請務必填寫有意義的註解&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="color: #8b0000"&gt;如何修正？&lt;/span&gt;&amp;quot;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;DisplayHelp 方法：當驗證失敗出現錯誤訊息時，若使用者按下 F1時，會呼叫這個方法。一般而言是要提供幫助及說明(Help)。 &lt;br /&gt;    &lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;    &lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 650px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; DisplayHelp(PolicyFailure failure)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            &lt;span style="color: #008000"&gt;//base.DisplayHelp(failure);&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;            MessageBox.Show(&amp;quot;&lt;span style="color: #8b0000"&gt;這個原則將提醒你，符合博暉科技系統開發原則，在簽入原始碼時務必要輸入有意義的註解&lt;/span&gt;&amp;quot;,&amp;quot;&lt;span style="color: #8b0000"&gt;提供原則幫助！&lt;/span&gt;&amp;quot;);&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 11px"&gt;        }&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;好了，恭喜你。你已經完成一隻客製化的CheckIn Policy，還蠻簡單的吧。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;如何部署 swCheckInPolicy ？&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;在命令模式下(Command-Line)，執行 RegEdit，呼叫出 Register。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;32 Bit 系統： &lt;br /&gt;  &lt;br /&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Checkin Policies&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;64 Bit系統： &lt;br /&gt;  &lt;br /&gt;HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\TeamFoundation\SourceControl\Checkin Policies&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;在右邊的視窗中，按右鍵加入一個StringValue。 &lt;br /&gt;  &lt;br /&gt;String = swCheckInPolicy，其Value = [swCheckInPolicy.dll 的實際路徑]&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;完成後，關閉Register。重新開啟 Visual Studio 2010 ，連線 Team Foundation Server 2010 後，在Team Project 上按右鍵，選擇 Team Project Settings –&amp;gt; Source control …。 &lt;br /&gt;  &lt;br /&gt;此時會開啟 Source Control Settins 畫面，切換至 Check-in Policy 這個頁籤。 &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLYERjHk7aI/AAAAAAAAEm4/nl2_8iRaV8E/s1600-h/image%5B4%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TLYES9RkcwI/AAAAAAAAEm8/LG3BxO59RZc/image_thumb%5B1%5D.png?imgmax=800" width="390" height="269" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;按下 Add 按鈕後，你就會發現你剛剛撰寫的客製化簽入原則已經可以使用了。&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8072866305847065769?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8072866305847065769/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8072866305847065769&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8072866305847065769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8072866305847065769'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/10/team-foundation-server-2010-custom.html' title='Team Foundation Server 2010 ：客製化簽入原則 (Custom CheckIn Policy)'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_BiAIh45tOHE/TLYEJQrHPTI/AAAAAAAAEmU/Ih2XDhYM9mU/s72-c/image_thumb1.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-2952634494636763874</id><published>2010-10-13T03:29:00.000+08:00</published><updated>2010-10-13T03:33:37.491+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><title type='text'>Tfs 2010 權限–Team Foundation Server 管理主控台使用者</title><content type='html'>  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TLS3p_euh2I/AAAAAAAAEj4/LEaDlkabHq4/s1600-h/image%5B37%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TLS3qi2e0aI/AAAAAAAAEj8/UrVrQo_HGzU/image_thumb%5B19%5D.png?imgmax=800" width="439" height="283" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;加入 Team Foundation Server 管理主控台使用者。將授與足夠權限的使用者帳戶，讓他能夠使用管理主控台的最小功能。使用選擇性的功能可授與額外的權限   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TLS3rVvBsHI/AAAAAAAAEkA/1U6y48fwo0A/s1600-h/image%5B3%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TLS3sB0mScI/AAAAAAAAEkE/Ujq6g2Lml8c/image_thumb%5B1%5D.png?imgmax=800" width="456" height="162" /&gt;&lt;/a&gt;    &lt;br /&gt;其實預設加入的範圍還蠻多項的：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;集合資料庫 (DefaultCollection)：Tfs_DefaultCollection&lt;/li&gt;    &lt;li&gt;系統資料庫 (master)&lt;/li&gt;    &lt;li&gt;本機群組：IIS_USERS, TFS_APPTIER_SERVER_WPG&lt;/li&gt;    &lt;li&gt;Service Account 群組&lt;/li&gt;    &lt;li&gt;Analysis Services 資料庫&lt;/li&gt;    &lt;li&gt;關聯式倉儲資料庫：Tfs_Warehouse&lt;/li&gt;    &lt;li&gt;Reporting Services 內容管理角色&lt;/li&gt;    &lt;li&gt;sharepoint Farm Administrators：指 SharePoint 產品中 Farm Administrators群組&lt;/li&gt;    &lt;li&gt;組態資料庫：Tfs_Configuration&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;針對指定的帳號，另外給予資料庫權限：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;VIEW ANY DEFINITION&lt;/li&gt;    &lt;li&gt;CREATE ANY DATABASE&lt;/li&gt;    &lt;li&gt;ALTER ANY LOGIN&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;以下我們分別來看看，它究竟設定在哪些位置上。首先，先開啟 Microsoft SQL Server 2008 Management Studio 。你會發現 Tfs 2010 安裝完成後會在資料庫上建立三個資料庫，分別是 Tfs_Configuration, Tfs_DefaultCollection, Tfs_Warehouse。   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TLS3s-McY6I/AAAAAAAAEkI/h7P7Mvy2jqk/s1600-h/image%5B8%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TLS3tp8XX-I/AAAAAAAAEkM/kUWT2xXB-7Q/image_thumb%5B4%5D.png?imgmax=800" width="216" height="275" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;再來看一下，你會發現 Windows Account 已經被主動建立在SQL Server 2008 的安全性目錄下。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS3uVk3-cI/AAAAAAAAEkQ/_651Ah0jZno/s1600-h/image%5B11%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TLS3vCkwRjI/AAAAAAAAEkU/gMPl3FjMktI/image_thumb%5B5%5D.png?imgmax=800" width="244" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;仔細來分析一下這個帳號在資料庫上設定哪些權限。   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TLS3v40k3jI/AAAAAAAAEkY/Me5205nBPgI/s1600-h/image%5B14%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TLS3wR85iOI/AAAAAAAAEkc/Moojd08Qw28/image_thumb%5B6%5D.png?imgmax=800" width="244" height="219" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TLS3w7Dg3yI/AAAAAAAAEkg/VVlgbeWSPOE/s1600-h/image%5B17%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TLS3yOWFP7I/AAAAAAAAEkk/fGDxBeEUmbs/image_thumb%5B7%5D.png?imgmax=800" width="244" height="217" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS3yjbCOxI/AAAAAAAAEko/8BVICEYEH-w/s1600-h/image%5B25%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TLS3zM4dGOI/AAAAAAAAEks/bgfoGeq1l5A/image_thumb%5B11%5D.png?imgmax=800" width="508" height="165" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS3zqSqsMI/AAAAAAAAEkw/6Jwk_nfCQ_A/s1600-h/image%5B29%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TLS30A6xEDI/AAAAAAAAEk0/w4wOxG13I1E/image_thumb%5B15%5D.png?imgmax=800" width="486" height="46" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;每個資料庫都有其角色成員資料：&lt;/p&gt;              &lt;ul&gt;   &lt;li&gt;master：public , TFSEXECROLE&lt;/li&gt;    &lt;li&gt;Tfs_Configuration：public, TFSADMINROLE, TFSEXECROLE&lt;/li&gt;    &lt;li&gt;Tfs_DefaultCollection：db_datareader, db_datawriter, db_owner, public, TFSEXECROLE&lt;/li&gt;    &lt;li&gt;Tfs_Warehouse：public, TFSEXECROLE&lt;/li&gt;    &lt;li&gt;WSS_Config：db_owner, public     &lt;br /&gt;另外，這個資料庫需注意一下。注意看一下，只有這個資料庫的預設結構描述，不是dbo，而是當初要加入 Team Foundation Server 管理主控台的指定帳號。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Joseph 這個Windows 帳號，同時也加入了三個群組，分別是 IIS_IUSERS, TFS_APPTIER_SERVICE_WPG, WSS_ADMIN_WPG。如下圖所示：   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS31CNgj-I/AAAAAAAAEk4/pFfilI382DI/s1600-h/image%5B33%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TLS31ixhLCI/AAAAAAAAEk8/ZxjZJE9VWOo/image_thumb%5B17%5D.png?imgmax=800" width="351" height="402" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;h3&gt;建立 Project Collection 及 Team Project&lt;/h3&gt;  &lt;p&gt;接下來，我們試著用 Joseph 這個帳號建立一個Team 專案集合(LabRoom01)後，再來review 一下權限的部份。先來看看資料庫的部份，你會發現多了一個資料庫 – Tfs_LabRoom01   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS32BJAADI/AAAAAAAAElA/EDg1UznUVzI/s1600-h/image%5B42%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TLS329spDdI/AAAAAAAAElE/YQlWf8ViIDE/image_thumb%5B22%5D.png?imgmax=800" width="266" height="372" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;看來資料庫的權限已經自動設上去了，而細部的角色設定與「Tfs_DefaultCollection」一致&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TLS33s1reXI/AAAAAAAAElI/hHsiqnsejEI/s1600-h/image%5B53%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TLS34fbfigI/AAAAAAAAElM/wTTG-xlN63g/image_thumb%5B29%5D.png?imgmax=800" width="252" height="123" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TLS35E553lI/AAAAAAAAElQ/u0YGib1EBAU/s1600-h/image%5B52%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TLS35hrxlKI/AAAAAAAAElU/KbkzK2ICoUg/image_thumb%5B28%5D.png?imgmax=800" width="264" height="120" /&gt;&lt;/a&gt;&lt;/p&gt;      &lt;p&gt;而 Joseph 這個Windows 帳號，群組似乎沒有做任何的調整。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS36bF7soI/AAAAAAAAElY/bgxB-EYPl50/s1600-h/image%5B56%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TLS37BCkJkI/AAAAAAAAElc/ZjhrTTU7FCI/image_thumb%5B30%5D.png?imgmax=800" width="214" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;好了，現在我們試著分別用 &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Joseph 這個帳號在 DefaultCollection 這個Team 專案集合中新建一個Team Project – Demo01。&lt;/li&gt;    &lt;li&gt;Administrator 這個帳號在 LabRoom01 這個Team 專案集合中新建一個 Team Project – Demo01。&lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Joseph 在 DefaultCollection 中建立一個 Team Project – Demo01&lt;/h4&gt;  &lt;p&gt;按照預設動作建立一個 Team Project。在一開始驗證時就發生的錯誤。錯誤訊息如圖所示：&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TLS374K08SI/AAAAAAAAElg/lCj69yLvacY/s1600-h/image%5B61%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TLS38sHAVPI/AAAAAAAAElk/WrIEwtQpGFE/image_thumb%5B33%5D.png?imgmax=800" width="510" height="439" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h4&gt;Administrator 在 LabRoom01 中建立一個 Team Project – Demo01&lt;/h4&gt;  &lt;p&gt;按照預設動作建立一個 Team Project，結果是可以建立成功的，如圖所示：   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS39WB_ttI/AAAAAAAAElo/PD3EBAWOaIo/s1600-h/image%5B64%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TLS3-EhGhMI/AAAAAAAAEls/5q9OF8GU6kI/image_thumb%5B34%5D.png?imgmax=800" width="244" height="209" /&gt;&lt;/a&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;回過頭來審視一下「Joseph 在 DefaultCollection 中建立一個新的 Team Project – Demo01」這個case。它的錯誤訊息，顯示是 UAC 的問題。所以，關閉 Visual Studio 2010 後，用系統管理員權限執行 Visual Studio 2010 後，再重新建立 Team Project 就成功了。&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;Team Project’s WSS &amp;amp; Reporting Service 權限&lt;/h3&gt;  &lt;p&gt;Demo01 這個Team Project 建立完成後。馬上連線至「專案人口網站」，顯示權限不足無法登入。這代表，就算這個專案是 Joseph 這個帳號建立的，但是它預設是沒有權限登入「專案入口網站」。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS3-wUl5LI/AAAAAAAAElw/TVUtbcJKwPg/s1600-h/image%5B69%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TLS3_kG70tI/AAAAAAAAEl0/P95F_GrBLqc/image_thumb%5B37%5D.png?imgmax=800" width="547" height="387" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;切換成 Administrator 登入後，就可以順利登入「專案入口網站」了。一進入後，畫面上有兩個 web parts，會顯示錯誤訊息。   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TLS4A-887_I/AAAAAAAAEl4/TU8Xcrgk6Fg/s1600-h/image%5B74%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TLS4BkSe5fI/AAAAAAAAEl8/1fmLZQ80_Qw/image_thumb%5B40%5D.png?imgmax=800" width="548" height="362" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;別忘了，用 Administrator 登入的用意是要設定權限。所以在網頁右上角有一個「網站設定」—&amp;gt;「網站設定」。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TLS4COlkJyI/AAAAAAAAEmA/QB5iKjuxc78/s1600-h/image%5B77%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TLS4CzTrJkI/AAAAAAAAEmE/Uqc_nJAGEBE/image_thumb%5B41%5D.png?imgmax=800" width="244" height="174" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;點選「網站設定」後會出現一個分類過超連結。點選「使用者與權限」—&amp;gt;「使用者與群組」，再點選左邊的超連結「網站權限」。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TLS4DTPwvBI/AAAAAAAAEmI/ND4_xeh-5As/s1600-h/image%5B81%5D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TLS4EDV_waI/AAAAAAAAEmM/wRKOW__wVtU/image_thumb%5B43%5D.png?imgmax=800" width="436" height="285" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;按下「新增」—&amp;gt;「新增使用者」，將 Joseph 這個windows 帳號加入。重新用Joseph這個帳號登入，再次連線「專案入口網站」，此時就可以很順利的登入了。&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-2952634494636763874?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/2952634494636763874/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=2952634494636763874&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2952634494636763874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2952634494636763874'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/10/tfs-2010-team-foundation-server.html' title='Tfs 2010 權限–Team Foundation Server 管理主控台使用者'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/TLS3qi2e0aI/AAAAAAAAEj8/UrVrQo_HGzU/s72-c/image_thumb%5B19%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-2798555033317591287</id><published>2010-09-13T14:28:00.000+08:00</published><updated>2010-09-13T14:30:32.363+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Online Services 中文版'/><title type='text'>Microsoft Online Services 中文版初測(一) - 建立試用帳號及服務</title><content type='html'>&lt;p&gt;上個星期，因為客戶提出需求，上網 research 時才發覺原來微軟已經針對雲端技術實作了 Online Services 中文版這項服務。目前仍然在測試版，至於什麼時候會出正式版，尚不可得知。&lt;/p&gt;  &lt;p&gt;首先，我們先來看一下如何入門吧…&lt;/p&gt;  &lt;ol&gt;   &lt;h4&gt;登入客戶入口網站&lt;/h4&gt;    &lt;p&gt;在&lt;a href="https://mocp.microsoftonline.com/Site/Manage.aspx" target="_blank"&gt;客戶入口網站&lt;/a&gt;，我們可以先選擇試用服務。基本上，它的試用可以長達一個月，而目前中文版也沒有辦法購買正式的license，所以也只能選擇試用。如下圖所示，這個畫面就是&lt;a href="https://mocp.microsoftonline.com/Site/Manage.aspx" target="_blank"&gt;客戶入口網站&lt;/a&gt;的首頁。&lt;/p&gt; &lt;/ol&gt; &lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TI3EpzLdNyI/AAAAAAAAEhw/aB_zEEmXjEw/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TI3Eqas9ZqI/AAAAAAAAEh0/7NIj0greePM/image_thumb%5B1%5D.png?imgmax=800" width="244" height="148" /&gt;&lt;/a&gt;   &lt;br /&gt;&amp;#160; &lt;p&gt;依首頁左方的「開始使用」的指示建立帳號。&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;先選擇右上角的「登入」，並輸入你的Windows Live ID 及密碼進行登入。&amp;#160; &lt;br /&gt;&amp;#160; &lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TI3ErF7s5vI/AAAAAAAAEh4/zG1mhx3UM3Y/s1600-h/image%5B11%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TI3Eru8IL8I/AAAAAAAAEh8/XiOaQfkA8Lo/image_thumb%5B3%5D.png?imgmax=800" width="244" height="125" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;接著輸入設定檔資料&amp;#160; &lt;br /&gt; &lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TI3EsBFGDYI/AAAAAAAAEiA/QTpODe79COc/s1600-h/image%5B14%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TI3Esmy6JfI/AAAAAAAAEiE/HKdXLIMr-qQ/image_thumb%5B4%5D.png?imgmax=800" width="244" height="126" /&gt;&lt;/a&gt;       &lt;br /&gt;需注意：       &lt;br /&gt;郵遞區號必須輸入滿五碼       &lt;br /&gt;電話號碼必須輸入10碼數字&amp;#160; &lt;br /&gt; &lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TI3EtAyHdAI/AAAAAAAAEiI/0XEX8cXLrPM/s1600-h/image%5B17%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TI3Etkc6UPI/AAAAAAAAEiM/FyQe6_BKWB0/image_thumb%5B5%5D.png?imgmax=800" width="244" height="126" /&gt;&lt;/a&gt;       &lt;br /&gt;然後出現確認畫面，按下右下角的「完成」按鈕，即完成新增設定檔的動作。&amp;#160; &lt;br /&gt;&amp;#160;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TI3Eueh0WdI/AAAAAAAAEiQ/vPQsOWzvVmk/s1600-h/image%5B23%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TI3Eu4cOZ-I/AAAAAAAAEiU/xm_ZqpKwSm8/image_thumb%5B7%5D.png?imgmax=800" width="244" height="126" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;選擇試用的服務      &lt;br /&gt;完成設定後，出現的首頁如下，你可以在網頁中間的Content Page中找到「可用的試用」區段，並選擇「Business Productivity Online Standard Suite」按下「立即試用」的按鈕。&amp;#160; &lt;br /&gt;&amp;#160;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TI3Ev0gX3DI/AAAAAAAAEiY/i0dkpW0IWC4/s1600-h/image%5B29%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TI3EweNe7uI/AAAAAAAAEic/dSm38IL8hFg/image_thumb%5B9%5D.png?imgmax=800" width="244" height="156" /&gt;&lt;/a&gt;       &lt;br /&gt;輸入自己想要的OnLine Services Domain Name，按下「我接受」按鈕&amp;#160; &lt;br /&gt;&amp;#160;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TI3ExrPFviI/AAAAAAAAEig/YW6y3dz6mIc/s1600-h/image%5B35%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TI3EyHYhkyI/AAAAAAAAEik/9NibAT3daek/image_thumb%5B11%5D.png?imgmax=800" width="244" height="143" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;你就會收到系統正在建製中的訊息。以我個人的經驗是不用到網頁上說明的15分鐘。&amp;#160; &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TI3EzcQDNvI/AAAAAAAAEio/aZXwl6dw_AQ/s1600-h/image%5B41%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TI3Ez8RXBBI/AAAAAAAAEis/ozM124gYKcY/image_thumb%5B13%5D.png?imgmax=800" width="244" height="126" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;h4&gt;建立次要系統管理員&lt;/h4&gt;  &lt;p&gt;為了預防主要系統管理員帳號發生問題，造成無法維護系統或是設定整個系統，一般而言我們會建議各位要建立一個次要的系統管理員帳號。在開始建立次要系統管理員之前，我們先來看看新增「Business Productivity Online Standard Suite」之後，首頁的變化：   &lt;br /&gt;&amp;#160; &lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TI3E1MnyoqI/AAAAAAAAEiw/Yac25EGPw4o/s1600-h/image%5B50%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TI3E1lYMyXI/AAAAAAAAEi0/tdK54iWfemY/image_thumb%5B16%5D.png?imgmax=800" width="244" height="126" /&gt;&lt;/a&gt;     &lt;br /&gt;接下來，我們分別看一下「服務」    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TI3E3e8_C5I/AAAAAAAAEi4/xecr7RIcaGw/s1600-h/image%5B53%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TI3E35OOjBI/AAAAAAAAEi8/pVJRexxP0zY/image_thumb%5B17%5D.png?imgmax=800" width="244" height="126" /&gt;&lt;/a&gt;     &lt;br /&gt;「訂閱」    &lt;br /&gt;&amp;#160;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TI3E4t1ALRI/AAAAAAAAEjA/yguw9_8bseE/s1600-h/image%5B59%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TI3E5J7EGSI/AAAAAAAAEjE/2bK34gt9vjA/image_thumb%5B19%5D.png?imgmax=800" width="244" height="105" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;好了，我們現在先來建立新的次要系統管理員帳號。首先，我們先登入「&lt;a href="https://admin.microsoftonline.com/login.aspx?ReturnUrl=%2fDefault.aspx" target="_blank"&gt;系統管理中心&lt;/a&gt;」- URL 會在Microsoft Online Services 寄給你的email中，或是使用這裏的超連結。&lt;/p&gt;  &lt;p&gt;輸入帳號及密碼後，按下「登入」鈕   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TI3E6L5oWNI/AAAAAAAAEjI/g6T-Q4g361E/s1600-h/image%5B62%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TI3E6rH1b_I/AAAAAAAAEjM/2t-oMVRrdiM/image_thumb%5B20%5D.png?imgmax=800" width="244" height="191" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;出現「&lt;a href="https://admin.apac.microsoftonline.com/Home/Home.aspx" target="_blank"&gt;系統管理中心&lt;/a&gt;」的首頁，點選右方的「動作」區塊中的「新增使用者」    &lt;br /&gt;&amp;#160;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TI3E7QOD6TI/AAAAAAAAEjQ/sf7MF6jjhCg/s1600-h/image%5B68%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TI3E71jPkdI/AAAAAAAAEjU/9ePADsEHMsg/image_thumb%5B22%5D.png?imgmax=800" width="244" height="182" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;填入帳號的各項資料，其中最重要的是在「設定」頁面上針對「您要讓這個使用者擁有服務管理員的權限嗎？」，必須選擇「是」。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TI3E8o5yo9I/AAAAAAAAEjY/nMHRRtWKrIo/s1600-h/image%5B71%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TI3E9LcqPEI/AAAAAAAAEjc/YwEmxDjeT0c/image_thumb%5B23%5D.png?imgmax=800" width="244" height="126" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;在「確認」頁上上，複製「使用者名稱」和「密碼」方便未來參考。也可以輸入您的電子郵件地址，然後按一下「傳送」。第二個動作會透過電子郵件通知這項資訊。   &lt;br /&gt;完成後，按下「完成」。&lt;/p&gt;  &lt;h4&gt;&lt;/h4&gt;  &lt;h4&gt;下載並安裝登入應用程式&lt;/h4&gt;  &lt;p&gt;建議您使用 Microsoft Online Services 登入應用程式來設定應用程式並驗證 Microsoft Online Services 帳戶。   &lt;br /&gt;您可下載並安裝登入應用程式：&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;在系統管理中心的「支援」索引頁籤上，按一下「下載」子索引頁籤，並點選「Microsoft Online Services 登入應用程式」     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TI3E-SAdcVI/AAAAAAAAEjg/FF71ODHCrM0/s1600-h/image%5B77%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TI3E-1CUeQI/AAAAAAAAEjk/KhF-708FqnY/image_thumb%5B25%5D.png?imgmax=800" width="244" height="184" /&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;安裝完成後，首次執行時會顯示「服務合約」，按一下「我已閱讀並接受上述條款」，然後按一下「下一步」。&lt;/li&gt;    &lt;li&gt;使用您的使用者名稱及密碼來登入。     &lt;br /&gt;此時，登入應用程式會開始進行服務應用程式的設定程序。&lt;/li&gt;    &lt;li&gt;按一下「套用組態」。完成後，便可以使用 Microsoft Online Services 相關服務。     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TI3E__TFcLI/AAAAAAAAEjo/H9ZOzCL8axQ/s1600-h/image%5B80%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TI3FAc2vaKI/AAAAAAAAEjs/-hvxVObrbCc/image_thumb%5B26%5D.png?imgmax=800" width="129" height="244" /&gt;&lt;/a&gt; &lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TI3FBJGq2VI/AAAAAAAAEjw/j3ppA4BgZw0/s1600-h/image%5B83%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TI3FBurPtcI/AAAAAAAAEj0/TO70nPVyuc4/image_thumb%5B27%5D.png?imgmax=800" width="129" height="244" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;註：因為我同時啟用了&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Microsoft Exchange Online &lt;/li&gt;    &lt;li&gt;Microsoft Live Meeting Online&lt;/li&gt;    &lt;li&gt;Microsoft Sharepoint Online&lt;/li&gt;    &lt;li&gt;Microsoft Communication Online     &lt;br /&gt;所以您可以在畫面上看到我有四項服務。本篇只介紹到啟用 Microsoft Exchange Online &amp;amp; Microsoft Sharepoint Online。下次再介紹如何啟用 Microsoft Live Meeting Online &amp;amp; Microsoft Communication Online ，如果你有興趣的話也可以先自行試試看囉！&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-2798555033317591287?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/2798555033317591287/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=2798555033317591287&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2798555033317591287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2798555033317591287'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/09/microsoft-online-services.html' title='Microsoft Online Services 中文版初測(一) - 建立試用帳號及服務'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BiAIh45tOHE/TI3Eqas9ZqI/AAAAAAAAEh0/7NIj0greePM/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5820948945496101029</id><published>2010-08-18T10:01:00.000+08:00</published><updated>2010-08-18T10:04:18.025+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='其他'/><title type='text'>Windows 7 上的Net meeting – Microsoft SharedView</title><content type='html'>&lt;p&gt;各位應該有印象，在Windows 2000 / XP的年代，有一個功能：Net Meeting。雖然與一般市面上的遠端連線軟體相比，並無特殊之處，但是由於內建在windows內，若你臨時需要遠端維護電腦，其實是相當的便利。&lt;/p&gt;  &lt;p&gt;現在，在 vista 及 windows 7，我們卻找不到這個功能了！！現在改用 &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=95af94ba-755e-4039-9038-63005ee9d33a&amp;amp;displaylang=en"&gt;Microsoft SharedView&lt;/a&gt;，基本上，你可以把它當作是windows 7版的net meeting。&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=95af94ba-755e-4039-9038-63005ee9d33a&amp;amp;displaylang=en"&gt;Microsoft SharedView&lt;/a&gt; 只要擁有Windows Live的帳號就可以使用。同時，最多可以有15個人一起共用主持人的桌面，當你是主持人負責控制時，你可以看到共同作業者的滑鼠動作(每個人都有個人化的滑鼠指標)，好讓他們可以指出文件或是應用程式上的項目。目前不支援語音功能，所以你必須在共用桌面的同時，額外開啟 Windows Live Messagener 或 Skype 來進行語音討論。&lt;/p&gt;  &lt;p&gt;下載位置：&lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=95af94ba-755e-4039-9038-63005ee9d33a&amp;amp;displaylang=en"&gt;Microsoft SharedView&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5820948945496101029?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5820948945496101029/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5820948945496101029&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5820948945496101029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5820948945496101029'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/08/windows-7-net-meeting-microsoft.html' title='Windows 7 上的Net meeting – Microsoft SharedView'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5021966691997998091</id><published>2010-08-13T16:05:00.000+08:00</published><updated>2010-08-13T16:07:56.772+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2008'/><title type='text'>SQL Server 2008 各版本的差異表</title><content type='html'>&lt;p&gt;不在SQL Server 2008的官網內，可以請參考   &lt;br /&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/cc645993.aspx" href="http://msdn.microsoft.com/en-us/library/cc645993.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc645993.aspx&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5021966691997998091?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5021966691997998091/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5021966691997998091&amp;isPopup=true' title='2 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5021966691997998091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5021966691997998091'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/08/sql-server-2008.html' title='SQL Server 2008 各版本的差異表'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-6111166137436286029</id><published>2010-08-12T00:45:00.000+08:00</published><updated>2010-08-12T00:49:09.826+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='Blend 4'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF 4.0'/><title type='text'>Microsoft Expression Blend 4 SDK for .NET 4</title><content type='html'>&lt;p&gt;Microsoft Expression Blend 4 許多新的功能，然後利用 Blend 4 開發UI專案，由於會引用許多 Blend 4 專屬的Behaviors或是 Blend 4中的packaged code，所以專案會引用到 Blend 4 專屬的元件。&lt;/p&gt;  &lt;p&gt;由於一般的程式設計師，並不一定會安裝Blend 4，那程式如何 compiler呢？所以，我們可以安裝 Blend 4 SDK。&lt;/p&gt;  &lt;p&gt;Expression Blend 4 SDK 包含下列元件：&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Stetch Flow Player&lt;/li&gt;    &lt;li&gt;Custom VSM for Fluid Layout&lt;/li&gt;    &lt;li&gt;Font Embedding enhancements&lt;/li&gt;    &lt;li&gt;Effects and Transitio Effects&lt;/li&gt;    &lt;li&gt;Shapes&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;下載：&lt;a href="http://download.microsoft.com/download/E/0/0/E0032698-8F1F-497D-B7BD-35275E1EB6FC/BlendWPFSDK_en.msi"&gt;Blend4WPF_SDK(en).msi&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-6111166137436286029?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/6111166137436286029/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=6111166137436286029&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/6111166137436286029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/6111166137436286029'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/08/microsoft-expression-blend-4-sdk-for.html' title='Microsoft Expression Blend 4 SDK for .NET 4'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8413917424472623648</id><published>2010-08-04T17:08:00.000+08:00</published><updated>2010-08-04T17:10:50.508+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='office 2010'/><title type='text'>昏…Windows Mobile 裝置中心無法和Office 2010 x64 進行同步</title><content type='html'>&lt;p&gt;自從前天將筆電格式化成Windows 7 x64 + Office 2010 x64後，霍然發現…我的 HTC HD 竟然無法再跟筆電進行郵件、通訊錄及行事曆的同步了。究竟發生什麼事。直到剛剛在微軟的網站上看到這篇KB，一整個昏倒…&lt;/p&gt;  &lt;p&gt;&lt;a href="http://support.microsoft.com/kb/980513/zh-tw"&gt;當您嘗試將 Windows Mobile 裝置中心和 Outlook 2010 64 位元版本或 Outlook 2010「隨選即用」安裝進行同步處理時收到錯誤訊息：「沒有預設的郵件用戶端，或是目前的郵件用戶端無法完成郵件傳遞」&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8413917424472623648?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8413917424472623648/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8413917424472623648&amp;isPopup=true' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8413917424472623648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8413917424472623648'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/08/windows-mobile-office-2010-x64.html' title='昏…Windows Mobile 裝置中心無法和Office 2010 x64 進行同步'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-2274704352990963374</id><published>2010-08-04T01:30:00.000+08:00</published><updated>2010-08-04T01:32:17.224+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>如何將 Dll 放入 Visual Studio 2010 的 Add Reference Dialog？</title><content type='html'>&lt;p&gt;我的環境是Windows 7 Ultimate x64 bit，安裝了Visual Studio 2010。作了一個安裝檔，希望安裝後在Visual Studio 2010的專案裏，可以用Add Reference的方式加入 Dll。&lt;/p&gt;  &lt;p&gt;在Register 中修改了很多位置，Add Reference Dialog中都無法顯示。後來才發現應該修改的位置是：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;x86 (只要修改其中一個就好)&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;[HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\&amp;lt;version&amp;gt;\AssemblyFoldersEx\MyAssemblies]@=&amp;quot;&amp;lt;AssemblyLocation&amp;gt;&amp;quot;       &lt;br /&gt;&lt;font color="#00ff00"&gt;--&amp;gt;指定現有的使用者&lt;/font&gt;&lt;/li&gt;      &lt;li&gt;[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\&amp;lt;version&amp;gt;\AssemblyFoldersEx\MyAssemblies]@=&amp;quot;&amp;lt;AssemblyLocation&amp;gt;&amp;quot;       &lt;br /&gt;&lt;font color="#00ff00"&gt;--&amp;gt;指定這台機器&lt;/font&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Win7 x64 &lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;HKLM\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30128\AssemblyFoldersEx\MyAppHere&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-2274704352990963374?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/2274704352990963374/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=2274704352990963374&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2274704352990963374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2274704352990963374'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/08/dll-visual-studio-2010-add-reference.html' title='如何將 Dll 放入 Visual Studio 2010 的 Add Reference Dialog？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-2942870733088306937</id><published>2010-06-30T10:04:00.000+08:00</published><updated>2010-06-30T10:05:10.973+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><title type='text'>TFS 2010 Bug 03：TFS 2010 中文版產生Excel 報表時發生錯誤</title><content type='html'>&lt;p&gt;TFS 2010 中文版，在這段時間的測試後，感覺似乎不是那麼穩定。下列這個bug，基本上我看了一些國外的線上 Demo，也都不會發生。&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TCqmUpFQBDI/AAAAAAAAEhY/O8fEE4GfUrw/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TCqmVUi9qXI/AAAAAAAAEhc/fZIQ9Kf1XMo/image_thumb%5B2%5D.png?imgmax=800" width="574" height="363" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;就我個人的看法，這應該是中文版造成的問題，只得等Service Pack出來後，才會知道是否已 bug fix. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-2942870733088306937?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/2942870733088306937/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=2942870733088306937&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2942870733088306937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/2942870733088306937'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/06/tfs-2010-bug-03tfs-2010-excel.html' title='TFS 2010 Bug 03：TFS 2010 中文版產生Excel 報表時發生錯誤'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/TCqmVUi9qXI/AAAAAAAAEhc/fZIQ9Kf1XMo/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-1256005984078141635</id><published>2010-06-28T03:39:00.000+08:00</published><updated>2010-06-28T03:40:20.978+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><title type='text'>TFS 2010 Bug 02：Excel Report</title><content type='html'>&lt;p&gt;TFS 2010 除了保留原本的Work Item 匯入 Excel的功能之外，另外提供了一個新的功能：Excel Report。它可以讓你在Excel 中產生報表。如下圖所示：   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TCepGdGD8EI/AAAAAAAAEhE/Z-aUDXc9pyE/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TCepHcgJGpI/AAAAAAAAEhI/v63XsiPp0vA/image_thumb%5B1%5D.png?imgmax=800" width="417" height="369" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;但是卻發現在中文正式版中，無法使用這個功能…難道是因為我用的是Office 2010嗎？(尚未找到答案)   &lt;br /&gt;若有任何發現，再update給各位知道    &lt;br /&gt;錯誤訊息如下：    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TCepIAjtgpI/AAAAAAAAEhM/9CLnlE5lCaY/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TCepI7n3v8I/AAAAAAAAEhQ/2qrIGVQRYsQ/image_thumb%5B3%5D.png?imgmax=800" width="476" height="279" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-1256005984078141635?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/1256005984078141635/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=1256005984078141635&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1256005984078141635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1256005984078141635'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/06/tfs-2010-bug-02excel-report.html' title='TFS 2010 Bug 02：Excel Report'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_BiAIh45tOHE/TCepHcgJGpI/AAAAAAAAEhI/v63XsiPp0vA/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8537201041201676170</id><published>2010-06-28T02:23:00.000+08:00</published><updated>2010-06-28T02:25:04.560+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><title type='text'>TFS 2010 Bug 01：開啟共用文件的問題</title><content type='html'>&lt;p&gt;TFS 2010 在 Agile 上做了最新的改良加上了時間的概念，更讓人興奮的是加上了Excel (共用文件)的操作方式。&lt;/p&gt;  &lt;p&gt;無論如何，使用TFS 2010的第一步就是建立使用者故事。於是，開啟在Team 總管目錄中的文件\共用文件下「產品計畫.xlsm」，準備開始編寫使用者故事。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TCeXPyVa3uI/AAAAAAAAEgk/9s-CXH7S3gA/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TCeXQ2RRt_I/AAAAAAAAEgo/EklVZm4j7a8/image_thumb%5B2%5D.png?imgmax=800" width="193" height="413" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;由於是網路上的Excel檔案且必須執行巨集，所以Excel 會主動跳出警示訊息   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TCeXRg2PKzI/AAAAAAAAEgs/QzGw7cttOuY/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TCeXSU_IWzI/AAAAAAAAEgw/UOGvqz89oKg/image_thumb%5B4%5D.png?imgmax=800" width="579" height="330" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;此時直接點選「啟用編輯」就會出現以下的錯誤訊息   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TCeXTVS25nI/AAAAAAAAEg0/xgvMJJsxi_c/s1600-h/image%5B13%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TCeXUAVlORI/AAAAAAAAEg4/CvZDwHgxXis/image_thumb%5B7%5D.png?imgmax=800" width="581" height="350" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;更神奇的是它並不是每次都會發生，但是發生的頻率很高(至少我的環境中是如此)。   &lt;br /&gt;經過多方測試，結果發現如果在開啟Excel檔案後，先將游標移至每個欄位上，再按下「啟用編輯」就OK囉。至於為什麼，我也不清楚…哈&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TCeXfIJ8TyI/AAAAAAAAEg8/A9t55urMQRs/s1600-h/image%5B17%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TCeXfzw4ZuI/AAAAAAAAEhA/wZsUFZShFIA/image_thumb%5B9%5D.png?imgmax=800" width="554" height="352" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8537201041201676170?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8537201041201676170/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8537201041201676170&amp;isPopup=true' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8537201041201676170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8537201041201676170'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/06/tfs-2010-bug-01.html' title='TFS 2010 Bug 01：開啟共用文件的問題'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BiAIh45tOHE/TCeXQ2RRt_I/AAAAAAAAEgo/EklVZm4j7a8/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-4118864683790150807</id><published>2010-06-21T16:08:00.001+08:00</published><updated>2010-06-21T16:08:40.370+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft C# 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 3.5'/><title type='text'>const 與 readonly 的差異</title><content type='html'>&lt;p&gt;const 關鍵字是用來修改 column 或是 local variant的宣告。它所指定的 column 或是 local variant 的值是常數，也就是說它是無法修改的。例如：&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;//宣告 x = 0 且無法變更&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; x = 0;&lt;br /&gt;&lt;br /&gt;x = 1; &lt;span class="rem"&gt;//此行會error，因為已經在宣告時加入 const 關鍵字&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;另外，也不可以寫成：&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// 由於b是一個變數，顯然無法在compiler時就得到結果，&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;// 所以常數是不可以用變數來初始化的&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; a = b + 1; &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;readonly 卻允許 local variant 設定常數，同時經過一些運算後，才確定它的初始值。它則是可以在宣告或是在建構函式中初始化。因此， readonly 可以根據使用的建構函式而產生不同的值。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; ReadOnlyTest&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;{&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;readonly&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; i = 0;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;//建構子&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ReadOnlyTest()&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #008000"&gt;//readonly 可以在建構函式中初始化&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        i = 1;        &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ReadOnlyTest(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; arg)&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    {&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &lt;span style="color: #008000"&gt;//readonly 可以在建構函式中初始化&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        i = 5;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;}&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;由於 readonly 是在計算時執行，所以它才可以用某些變數初始化的動作。且readonly 是一個 instance member，所以不同的instance 可以有不同的常數值，這使得 readonly 在使用上更靈活。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;&lt;font color="#0000ff" size="3" face="微軟正黑體"&gt;const 與 readonly 關鍵不同處&lt;/font&gt;&lt;/h5&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#0080ff"&gt;const&lt;/font&gt; 只能在宣告處進行初始化。 &lt;font color="#0080ff"&gt;readonly&lt;/font&gt; 則可以在宣告或是建構函式中初始化。因此 &lt;font color="#0080ff"&gt;readonly&lt;/font&gt; 會因為根據的建構函式不同，而產生不同的值。 &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#0080ff"&gt;const&lt;/font&gt; 是編輯階段的常數，而 &lt;font color="#0080ff"&gt;readonly&lt;/font&gt; 是執行時常數。 &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;font color="#0080ff"&gt;const&lt;/font&gt; 預設是 static ，而 &lt;font color="#0080ff"&gt;readonly&lt;/font&gt; 如果需要是 static ，則必須是事先聲明。 &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;常數運算式是指雖然 const 不可以有一般運算式，但是常數運算式仍是可以的。所以，你可以利用 string or int 作一個常數運算式。例如：&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; str = &lt;span class="str"&gt;&amp;quot;aa&amp;quot;&lt;/span&gt; + &lt;span class="str"&gt;&amp;quot;bb&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; fixAmt = 100 + 200;&lt;/pre&gt;&lt;br /&gt;  &lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-4118864683790150807?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/4118864683790150807/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=4118864683790150807&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4118864683790150807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4118864683790150807'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/06/const-readonly.html' title='const 與 readonly 的差異'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-1637965057970605399</id><published>2010-06-21T16:05:00.001+08:00</published><updated>2010-06-21T16:05:39.364+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft C# 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Active Direcotry (include ADSI)'/><title type='text'>如何使用C# 在Active Directory上驗證帳號、密碼？</title><content type='html'>&lt;p&gt;有幾個還不錯的網站，我想應該會給大家一個還不錯的想法…&lt;/p&gt;  &lt;p&gt;&lt;a title="http://stackoverflow.com/questions/290548/c-validate-a-username-and-password-against-active-directory" href="http://stackoverflow.com/questions/290548/c-validate-a-username-and-password-against-active-directory"&gt;http://stackoverflow.com/questions/290548/c-validate-a-username-and-password-against-active-directory&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://stackoverflow.com/questions/400872/active-directory-check-username-password" href="http://stackoverflow.com/questions/400872/active-directory-check-username-password"&gt;http://stackoverflow.com/questions/400872/active-directory-check-username-password&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.codeproject.com/KB/system/everythingInAD.aspx#40a" href="http://www.codeproject.com/KB/system/everythingInAD.aspx#40a"&gt;http://www.codeproject.com/KB/system/everythingInAD.aspx#40a&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-1637965057970605399?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/1637965057970605399/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=1637965057970605399&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1637965057970605399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1637965057970605399'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/06/c-active-directory.html' title='如何使用C# 在Active Directory上驗證帳號、密碼？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8573223282520696241</id><published>2010-06-11T01:10:00.000+08:00</published><updated>2010-06-11T01:11:09.002+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010 Beta 2'/><title type='text'>Visual Studio 2010 的 Task List Comments</title><content type='html'>&lt;p&gt;在 Visual Studio 2005 開始，Task List 視窗其實就有提供一個貼心的功能。你可以試試看，在你的程式碼加上一行&lt;/p&gt; &lt;style type="text/css"&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;  &lt;pre&gt;&lt;pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #008000"&gt;// TODO : 公式需等客戶確認後才實作&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;此時，你可以在 Visual Studio 的 Task List 視窗內看到你的註解，而且直接點兩下會自動跳到該行程式碼。&lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TBEcouKzA_I/AAAAAAAAEgU/sR--Tw4sP0g/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TBEcpcpD_BI/AAAAAAAAEgY/HBuKbb3bJEo/image_thumb%5B1%5D.png?imgmax=800" width="453" height="132" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;記住，如上圖，你必須在下拉式選單中選擇 Comments，下面的Grid才會顯示出這樣的效果。&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;想當然，一定可針對這些 comment tags 進行客製化。如下圖所示&lt;br /&gt;  &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TBEcqDcbbsI/AAAAAAAAEgc/nJGcwqJSItw/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TBEcq49l2XI/AAAAAAAAEgg/UYcgDvDrRXE/image_thumb%5B3%5D.png?imgmax=800" width="457" height="292" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;你可以在Name的欄位，輸入要顯示在Task List中的註解關鍵字。接下來，指定這個Tag 代表的 Priority，再按下「Add」就可以多顯示一組程式碼註解。例如，圖中的NOTE 就是我自已新增的。&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8573223282520696241?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8573223282520696241/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8573223282520696241&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8573223282520696241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8573223282520696241'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/06/visual-studio-2010-task-list-comments.html' title='Visual Studio 2010 的 Task List Comments'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_BiAIh45tOHE/TBEcpcpD_BI/AAAAAAAAEgY/HBuKbb3bJEo/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-4648608468958958560</id><published>2010-06-05T02:54:00.000+08:00</published><updated>2010-06-05T02:56:49.387+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft C# 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 3.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 3.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Documentation Generate'/><title type='text'>Sandcastle &amp; 建議的C#註解用 Tag</title><content type='html'>&lt;p&gt;Sandcastle 的讀取程式碼中的註解，並且產生成chm檔案的說明文件，是一套類似早期OpenSource中的NDoc功能的軟體，就個人的使用經驗來看是一套很方便很好用的軟體，重點是又不用錢。&lt;/p&gt;  &lt;p&gt;使用這套軟體，首先你的電腦上必須安裝 &lt;a href="http://www.microsoft.com/downloads/details.aspx?familyid=00535334-C8A6-452F-9AA0-D597D16580CC" target="_blank"&gt;Microsoft HTML Help Workshop&lt;/a&gt;，然後安裝 &lt;a href="http://sandcastle.codeplex.com/" target="_blank"&gt;Sandcastle - Documentation Compiler for Managed Class Library&lt;/a&gt; 。由於Sandcastle library 只支援 command line的操作方式，非常的不方便，目前有幾套 OpenSource 的 Sandcastle GUI軟體，其中以 &lt;a href="http://docproject.codeplex.com/wikipage?title=About%20DocProject&amp;amp;referringTitle=Sandcastle%20Help" target="_blank"&gt;DocProject&lt;/a&gt; 及 &lt;a href="http://shfb.codeplex.com/" target="_blank"&gt;Sandcastle Help file Builder&lt;/a&gt; 使用起來最方便。兩者最大的不同之處是Sandcastle Help File Builder 使用獨立的介面，而 DocProject 則整合Visual Studio ，你可以在Visual Studio 的Project Template中發現有 DocProject的Project Template。     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TAlLzsV01WI/AAAAAAAAEec/yiNWzcfnjYk/s1600-h/image14.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Sandcastle Help File Builder" border="0" alt="Sandcastle Help File Builder" src="http://lh5.ggpht.com/_BiAIh45tOHE/TAlL0cdWx0I/AAAAAAAAEeg/m-dTi8s5jsY/image_thumb12.png?imgmax=800" width="244" height="196" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TAlL1XwEnUI/AAAAAAAAEek/VdH69HEOcFo/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DocProject" border="0" alt="DocProject" src="http://lh6.ggpht.com/_BiAIh45tOHE/TAlL2CQsamI/AAAAAAAAEeo/xeP1W9TGYew/image_thumb%5B1%5D.png?imgmax=800" width="244" height="167" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;接下來，我們來認識一下C#的註解標籤及其效果：   &lt;br /&gt;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="433"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="118"&gt;XML Tag&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用途&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;summary&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;摘要性的描述，通常為簡短的一個段落。如果要撰寫較長的備註可以使用&amp;lt;remarks&amp;gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;remarks&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;詳細的備註說明。&amp;lt;remarks&amp;gt;內可以包含其它的XML標籤，例如：&amp;lt;list&amp;gt;、&amp;lt;seealso&amp;gt;等。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;para&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用來為說明文字分段落(paragraph)，通常包含於&amp;lt;remarks&amp;gt;或&amp;lt;returns&amp;gt;標籤中。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;list&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;項目符號。         &lt;br /&gt;格式分成三種：bullet、number和table這三種。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;example&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;可提供method、property或是其它類別庫成員的使用範例。通常&amp;lt;example&amp;gt;標籤裏，還會包含多個&amp;lt;code&amp;gt;標籤。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;code&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用來標示出一段程式碼範例，在&amp;lt;code&amp;gt;區段中的程式碼，將會使用與一般文字不同格式、不同字體，字型大小、樣式或色彩，顯示在製作完成的說明文件上。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;c&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用來標示出現在一段文字段落內的程式碼。         &lt;br /&gt;&amp;lt;code&amp;gt;用來標示多行、整段的程式碼，而&amp;lt;c&amp;gt;通常用在只有一或兩個字詞的簡短程式碼中。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;see cref=&amp;quot;member&amp;quot;&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用來提供參考其它類別庫成員的鏈結方式，將來會以超鏈結(HyperText)的形式顯示在文件上。         &lt;br /&gt;程式編譯時，編譯器會自動檢查類別庫中是否有指定的成員可以參考。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;seealso cref=&amp;quot;member&amp;quot;&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;與&amp;lt;see&amp;gt;大同小異。不過在說明文件中，&amp;lt;seealso&amp;gt;裏的文字通常會被獨立置於一個區域中。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;exception&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用來提供對Exception類別的描述&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;include&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;可以從指定的檔案匯入說明文件。         &lt;br /&gt;當文件與程式碼是由不同的團隊維護時，這個標籤就很方便。&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;param&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用來描述method的參數(parameter)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;returns&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用來描述method的回傳值&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="118"&gt;&amp;lt;value&amp;gt;&lt;/td&gt;        &lt;td valign="top" width="313"&gt;用來描述property&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;舉例而言：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&amp;lt;list&amp;gt;：type = table / bullet 的差異     &lt;br /&gt;&amp;#160;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TAlL2SOG8sI/AAAAAAAAEes/YeDoNNWUVsg/s1600-h/image%5B40%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TAlL3KTOO3I/AAAAAAAAEew/AACYtR2nCz0/image_thumb%5B23%5D.png?imgmax=800" width="326" height="416" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TAlL31uRKWI/AAAAAAAAEe0/hRi_JhnHx9E/s1600-h/image%5B39%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TAlL4XfzspI/AAAAAAAAEe4/V9reMzOEPxY/image_thumb%5B22%5D.png?imgmax=800" width="432" height="208" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TAlL57_PJDI/AAAAAAAAEe8/XLCzDeQSVrs/s1600-h/image%5B31%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TAlL6cTqzSI/AAAAAAAAEfA/8S7r3iGMm9A/image_thumb%5B18%5D.png?imgmax=800" width="425" height="281" /&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&amp;lt;example&amp;gt;區段，而且內含&amp;lt;code&amp;gt;     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TAlL7NzfwlI/AAAAAAAAEfE/xaxmRcM8g-8/s1600-h/image%5B41%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/TAlL8BB_LvI/AAAAAAAAEfI/_IyTqGzVM-c/image_thumb%5B24%5D.png?imgmax=800" width="299" height="387" /&gt;&lt;/a&gt;       &lt;br /&gt;&amp;#160;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TAlL843FlqI/AAAAAAAAEfM/TXhX8CiGTLc/s1600-h/image%5B45%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TAlL9ai04II/AAAAAAAAEfQ/Z-Ni__TT7sk/image_thumb%5B26%5D.png?imgmax=800" width="413" height="285" /&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;註解本身就支援 HTML 相關標籤     &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/TAlL96CkHrI/AAAAAAAAEfU/N31mN40Ufw4/s1600-h/image%5B49%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TAlL-zwiUFI/AAAAAAAAEfY/K-bt9vcIhrY/image_thumb%5B28%5D.png?imgmax=800" width="326" height="422" /&gt;&lt;/a&gt;&amp;#160;&amp;#160; &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TAlL_iLb2sI/AAAAAAAAEfc/1plPp-P8r74/s1600-h/image%5B53%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TAlMAkSc5bI/AAAAAAAAEfg/xQEpfv9pjnw/image_thumb%5B30%5D.png?imgmax=800" width="421" height="290" /&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&amp;lt;see cref=&amp;quot;member&amp;quot;&amp;gt;：記住member，不需要額外再定義。在產生文件的過程中會自行判斷，所以填入的是真的存在的成員。例如：method, property...     &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TAlMBKFJxEI/AAAAAAAAEfk/kcpdFVW2VT4/s1600-h/image%5B57%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TAlMBwfj2rI/AAAAAAAAEfo/nsfXMbjBWNc/image_thumb%5B32%5D.png?imgmax=800" width="426" height="176" /&gt;&lt;/a&gt;      &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/TAlMCuYP5gI/AAAAAAAAEfs/PPLLH5Bm9Eg/s1600-h/image%5B61%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TAlMDAsFQuI/AAAAAAAAEfw/ieGddjLMiTg/image_thumb%5B34%5D.png?imgmax=800" width="413" height="286" /&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&amp;lt;seealso cref=&amp;quot;member&amp;quot;&amp;gt;：與&amp;lt;see&amp;gt;雷同，唯一的差別只在於，使用&amp;lt;seealso&amp;gt;會獨立在一個區段內     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TAlMFPA8nwI/AAAAAAAAEf0/pTVShpFys7U/s1600-h/image%5B65%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TAlMFtQG4nI/AAAAAAAAEf4/J-yJtCPz5TQ/image_thumb%5B36%5D.png?imgmax=800" width="421" height="174" /&gt;&lt;/a&gt;      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/TAlMGStXzpI/AAAAAAAAEf8/Hrp4bUvT8_U/s1600-h/image%5B69%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/TAlMG7Z6UHI/AAAAAAAAEgA/o65NlTD_VWA/image_thumb%5B38%5D.png?imgmax=800" width="411" height="283" /&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&amp;lt;exception&amp;gt;     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TAlMHS1tc6I/AAAAAAAAEgE/2q22NEqKrAU/s1600-h/image%5B73%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/TAlMIHGIw8I/AAAAAAAAEgI/lrZ-Sr49Mgk/image_thumb%5B40%5D.png?imgmax=800" width="416" height="172" /&gt;&lt;/a&gt;      &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/TAlMIphkY1I/AAAAAAAAEgM/Cc7xtwGARhs/s1600-h/image%5B77%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/TAlMJTMlNUI/AAAAAAAAEgQ/MIF8_VW8BU8/image_thumb%5B42%5D.png?imgmax=800" width="382" height="264" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Sandcastle可以讓你透過程式碼註解，產生說明文件，真的是一個很好用的工具，也可以節省很多撰寫文件的時間，建議大家可以用用看。   &lt;br /&gt;不過呢？目前只支援到 Visual Studio 2005/2008，並不支援 Visual Studio 2010，要注意一下。雖然目前不支援Visual Studio 2010，大家不用擔心，目前該專案已在修改支援 Visual Studio 2010的版本，預期很快就可以看到支援 Visual Studio 2010的版本了。(&lt;a href="http://blogs.msdn.com/b/sandcastle/archive/2010/05/25/sandcastle-version-supporting-vs-2010-net-4-and-microsoft-help-viewer.aspx" target="_blank"&gt;原文&lt;/a&gt;)    &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-4648608468958958560?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/4648608468958958560/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=4648608468958958560&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4648608468958958560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4648608468958958560'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/06/sandcastle-c-tag.html' title='Sandcastle &amp;amp; 建議的C#註解用 Tag'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/TAlL0cdWx0I/AAAAAAAAEeg/m-dTi8s5jsY/s72-c/image_thumb12.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-3849964176963190356</id><published>2010-05-10T00:10:00.000+08:00</published><updated>2010-05-10T00:11:10.206+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Team Foundation Server 2010 敏捷開發方法論 – MSF for Agile Software Development v 5.0</title><content type='html'>&lt;p&gt;Scrum不是一方法論，它是一個框架(Framework)。也就是說Scrum不會馬上告訴你，你應該怎麼做。而Scrum的強處和痛苦之處，就是你必須被迫根據妳自己特殊的狀況，來進行調整。對於大部份的開發人員而言，Scrum只是一個時髦術語，但是對於他們的日常工作來言，並沒有任何的關聯或是影響。然而，真正試著去導入Scrum開發流程，無論是決定團隊的大小(3-12人)、不同的Sprint長短(2-6星期)，定義不同的”作完”，不同的Product backlog及Sprint backlog紀錄方式(Excel、索引卡)、不同的測試策略、不同的展示方式及不同的方法來同步多個Scrum團隊的訊息…等等。這會一個持續學習及調整的過程，才能形成專屬於自已最佳的Scrum流程。如果你對於Scrum或Agile Process很陌生，可以參考下列資料：&lt;/p&gt;  &lt;p&gt;l &lt;a href="http://www.xprogramming.com/xpmag/whatisxp.htm"&gt;http://www.xprogramming.com/xpmag/whatisxp.htm&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;l &lt;a href="http://www.scrumalliance.org/learn_about_scrum"&gt;http://www.scrumalliance.org/learn_about_scrum&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;l &lt;a href="http://www.scrumforteamsystem.com/en/default.aspx"&gt;http://www.scrumforteamsystem.com/en/default.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Team Foundation Server 2010中MSF for Agile Development Process v5.0的專案範本已經支援Scrum開發流程，在這個框架之下可以節省並減少在導入過程中需要學習及調整的時間，讓專案更加順利的進行及成功。   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-beZU5c_gI/AAAAAAAAEdU/g9ePASzOk_4/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-beaJTYaXI/AAAAAAAAEdY/XmYogC24mBQ/image_thumb%5B1%5D.png?imgmax=800" width="444" height="297" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;產品規劃&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Product backlog是整個Scrum中的核心，也是所有東西的起源。基本上來說，它是由需求、故事或是功能組成的，裡面用的是客戶的術語來描述客戶想要的東西，我們一般稱為「User Story」或是「Backlog Item」   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bebO3xRAI/AAAAAAAAEdc/VkPhxnmPrXg/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-beb3WFyRI/AAAAAAAAEdg/x1L7QNgybA4/image_thumb%5B4%5D.png?imgmax=800" width="449" height="274" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;以Team Foundation Server 2010的User Story為例說明幾個重要的欄位：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Iteration：用來代表Sprint，一個2-6週的反覆循環。&lt;/li&gt;    &lt;li&gt;Work Item ID：唯一識別碼。避免之後變更故事名稱，它可以避免我們找不到。&lt;/li&gt;    &lt;li&gt;Title：指故事名稱。用簡潔、敘述性的句子來代表故事。例如「查詢目前線上人數」，一般而言大約2-10個字左右。&lt;/li&gt;    &lt;li&gt;Stack Rank：產品負責人要評估故事的重要性，數字愈高代表愈重要。與Team Foundation Server 2005/2008中的順位欄位(優先順序)不同，因為順位通常1代表最高優先順序，若之後有更重要的事情，則會有所謂插件的困擾。(難道要給0或是-1嗎？)&lt;/li&gt;    &lt;li&gt;Story Point：指Scrum的初始估算，指這個故事與其它的故事相比，完成這個故事需要的代價是多少。最小單位是用Story Point來表示，通常代表人-天(man-day)，重點是非絕對值(2 point不代表2個人-天)，而是取一個比例值。&lt;/li&gt;    &lt;li&gt;Description with Acceptance Criteria：大略描述這個故事，類似一個簡單的測試規格書。如果專案有實作TDD開發，那你也可以在Test Cases頁籤中將對應的Test Case Work Item連結進來。&lt;/li&gt;    &lt;li&gt;All Links / Attachments：連結一些其它的相關資訊、解釋或是參考資料…等等。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Sprint&lt;/strong&gt;&lt;strong&gt;規劃及工作指派     &lt;br /&gt;&lt;/strong&gt;有了Product backlog之後，接下來，我們要開始規劃Sprint。Sprint規劃會議是一個非常重要的會議，甚至算是Scrum裏面最重要的活動。事前我們必須先定義出每個Sprint的長度，究竟需要幾個星期？接下來，召開Sprint規劃會議，會議最主要的目的是產出一些有用的成果：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Sprint的目的&lt;/li&gt;    &lt;li&gt;團隊成員的名單(如果他們不是100%的投入這個Sprint，一定要列出他們的投入程度)&lt;/li&gt;    &lt;li&gt;Sprint backlog&lt;/li&gt;    &lt;li&gt;事先訂好的展示時間&lt;/li&gt;    &lt;li&gt;對於Scrum的每日會議，事先好舉行的時間及地點&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;大部份的Sprint規劃會議會花很多時間在討論產品backlog的細節，需要評估它們，決定重要性，以及進一步分解它們…等等。而拆解出來的工作，則利用Team Foundation Server 2010上的Task實作，如下圖所示：   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-becQfMNqI/AAAAAAAAEdk/7MfiXemFhQ8/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bedFM2lhI/AAAAAAAAEdo/JwPdIo_bdg8/image_thumb%5B6%5D.png?imgmax=800" width="452" height="262" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Team Foundation Server 2010也提供Burndown報表，Scrum master可以馬上知道目前Sprint的狀況，並確認團隊是否會對這些警訊採取行動。   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-beeMQw8UI/AAAAAAAAEds/0hvXPQbFQXo/s1600-h/image%5B15%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-befDzoYAI/AAAAAAAAEdw/Je_laaIp9mY/image_thumb%5B7%5D.png?imgmax=800" width="168" height="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;下圖是Burndown報表：   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bef_NLzTI/AAAAAAAAEd0/mBrykeKIDRI/s1600-h/image%5B19%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-begmapAEI/AAAAAAAAEd4/uBFvho0ASj4/image_thumb%5B9%5D.png?imgmax=800" width="453" height="344" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;你會發現在Burndown報表上有一條直線由左上一直到右下角，代表是Sprint進行的理想值，而數值部份你可以用人時(man-hour)或是工作項目數量來進行分析，了解現行Sprint進行的狀況是否異常。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Daily Meeting&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;每日例行性會議也是一個很重要的會議，它的用意是每天早上規劃當天要完成的事項目，並且讓專案成員的人彼此進行溝通及要求協助。所以會議結束後，一定要把會議結論(變更的user story)更新到Sprint backlog。當然，理論上應該是scrum master更新整個Sprint backlog或是Product backlog，但是我們會希望scrum master能更專注在產品管理及解決整個專案的問題上，所以Team Foundation Server 2010允許所有有權限的專案成員都可以很方便的更新user story或是Task。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;成果展示&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;當Sprint結束時，無論好或壞，我們會要將成果展示給其它人，這是一種宣告也是一種壓力，會讓整個專案成員都動起來。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;回顧會議&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;回顧會議是Scrum中另一個很重要的會議。回顧為什麼很重要，因為如果沒有回顧，你會發現團隊會一而再的犯同樣的問題。檢討這次的Sprint問題在哪裏，你會發現下一次的Sprint會更好。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;     &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;產品的品質管理&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;試著Scrum和XP結合後，可以帶來很多好處，原因是Scrum著重在管理以及組織的實踐，而XP大多著重於實際的程式碼開發，它們互相解決不同領域的問題，並且互補對方的不足。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;測試驅動開發(TDD)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;測試驅動開發意味著，你要先寫自動測試，然後你再寫足夠的程式碼去通過測試，接著再重構你的程式嗎，主要是去改進可讀性和移除重複的地方，一直反覆進行這樣的事情。TDD對於系統設計而言，大家都是抱持正面的看法，但是導入真的很難，程式設計師要花一段時間才能掌握它。&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 &amp;amp; Team Foundation Server 2010提供完整的測試工具及環境支援TDD，例如：&lt;/p&gt;  &lt;p&gt;Visual Studio 2010提供單元測試、資料庫單元測試、自動程式碼UI測試、Web效能測試及負載測試…等等，讓整個開發團隊對於產出的程式碼更加有品質。   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-behWcvqpI/AAAAAAAAEd8/hgEkm8TIoW0/s1600-h/image%5B23%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-beikDvgDI/AAAAAAAAEeA/S39hu2WI3s8/image_thumb%5B11%5D.png?imgmax=800" width="445" height="238" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Team Foundation Server 2010則提供Test Case的工作項目，在專案管理及系統設計上幫助整個團隊。   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bejUH02kI/AAAAAAAAEeE/DssVia-FzQw/s1600-h/image%5B27%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bekFiRcOI/AAAAAAAAEeI/27RNROgwoJU/image_thumb%5B13%5D.png?imgmax=800" width="447" height="269" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Test Case的工作項目同時可以連接Microsoft Test Manager 2010，利用「測試中心」可以控管整個測試計劃、測試及事後的追蹤。   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-belBzQw3I/AAAAAAAAEeM/I6QSF1kQZJg/s1600-h/image%5B31%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bel-577aI/AAAAAAAAEeQ/cvDJCU5Miig/image_thumb%5B15%5D.png?imgmax=800" width="453" height="214" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;同時透過「測試中心」再連結「實驗室中心」，可依據設定將程式部署至不同Hyper-V伺服器上進行不同環境(例如：作業系統、瀏覽器種類及版本)的模擬及測試。Visual Studio 2010所提供的的測試工具，能讓你的每個Sprint的產出程式碼更加穩定及更高的品質。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bemiQRIAI/AAAAAAAAEeU/fckN_ABI5XI/s1600-h/image%5B35%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-benU6w4II/AAAAAAAAEeY/vdEbV1k3Hf0/image_thumb%5B17%5D.png?imgmax=800" width="445" height="321" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Scrum master的檢查清單     &lt;br /&gt;&lt;/strong&gt;Scrum master的檢查清單，通常會列出Scrum master最常見的管理事務。通常繁鎖又固定的事務，很容易就被人遺忘，所以準備一份檢查清單是能幫助你，適時的記起一些事情。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;i&gt;結論&lt;/i&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;還是要再提醒一下，Scrum開發流程是一個框架，它必須依據不同的環境，加以特別的客製化，所以在一般的狀況下很難會有一個最佳的實作範本。捉住一件事，開發過程裏的溝通非常的重要，好好利用每次的會議。另外，決定Sprint時間的長短及product backlog及Sprint backlog的重要性也是一個關鍵點。&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-3849964176963190356?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/3849964176963190356/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=3849964176963190356&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/3849964176963190356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/3849964176963190356'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/team-foundation-server-2010-msf-for.html' title='Team Foundation Server 2010 敏捷開發方法論 – MSF for Agile Software Development v 5.0'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_BiAIh45tOHE/S-beaJTYaXI/AAAAAAAAEdY/XmYogC24mBQ/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-561932012338590388</id><published>2010-05-09T23:54:00.000+08:00</published><updated>2010-05-09T23:57:37.522+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Team Foundation Server 2010 - 統一版本與流程管理</title><content type='html'>&lt;p&gt;軟體生命週期管理一直是軟體開發上一門很大的學問，怎麼做？如何做？導入一個好的開發流程，可以避免很多專案上遇到的問題。例如，一直在往返無法通過使用者測試的程式、重覆的管理、團隊效能一直低落而成本卻一直降不下來…等。微軟提出Microsoft Solution Framework (MSF)，並且在Team Foundation Server上利用這個軟體框架設計出兩種不同的開發流程，分別是「MSF for CMMI Process Improvement」及「MSF for Agile Software Development」，甚至你也可以外掛或客製化其它不同的開發流程。   &lt;br /&gt;為什麼要使用Team Foundation Server 呢？前面提到專案使用一個完整的開發流程進行開發是非常重要的，而開發流程會在專案裏定義出不同的角色，每個角色有各自被賦予的責任以及需要執行的功能及系統，例如：原始檔控制、Bug Tracing、Task Assignment、Build…等，如下圖所示    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bax-NVokI/AAAAAAAAEZ0/mrngtwOEgVQ/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bayZJoHfI/AAAAAAAAEZ4/pYPEXg5imME/image_thumb%5B1%5D.png?imgmax=800" width="439" height="206" /&gt;&lt;/a&gt;     &lt;br /&gt;而你可以把Team Foundation Server當成是一個中央存儲庫，並且整合軟體開發生命週期中各種角色會應用到的系統，讓專案中所有成員及角色可以透過一個預設或是統一的工作流來建製軟體。如下圖所示：    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bazNAt0hI/AAAAAAAAEZ8/jFWpdajfxec/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bazgb6ZgI/AAAAAAAAEaA/Ncr5dYtqeps/image_thumb%5B3%5D.png?imgmax=800" width="440" height="314" /&gt;&lt;/a&gt;     &lt;br /&gt;有很多方法可以使用Team Foundation Server 2010，包含Web Access、JAVA開發工具(TeamPrise)、Delphi(TeamPrise)。其中，若你是一個軟體開發人員，最簡單的方法就是用Visual Studio 2010任一版本；若你是測試人員，你也可以安裝另一套新產品：Test and Lab Manager (不需要安裝Visual Studio 2010) ；若你是一個專案經理，你還可以使用Microsoft Project、Microsoft Excel、Web Access或是MOSS上的數位儀表版。&lt;/p&gt;  &lt;p&gt;Team Foundation Server 2010分成三大主題進行改善及加強。&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;在系統管理方面，Team Foundation Server簡化了安裝步驟，除了提供精靈簡化安裝步驟、自動檢查並安裝相關的必要元件之外，同時你也可以在安裝過程中決定是否要安裝Reporting Service及Sharepoint, 在某些狀況下甚至你可以將Team Foundation Server安裝在Vista及Windows 7。另外，也改善了Team Foundation Server的擴充性，並提供Team Project資料的移動、還原等功能。&lt;/li&gt;    &lt;li&gt;在測試方面，則提供開發及測試之間更好的協合工作平台及持續性品質驗證功能。例如：測試個案的管理、需求追蹤、更精細的品質控管報表、Manual test runner、Record &amp;amp; playback、自動化UI測試、IntelliTrace及加強版的簽入機制。&lt;/li&gt;    &lt;li&gt;在專案管理方面，Team Foundation Server提供一個呈現豐富專案資訊的數位儀表版，讓專案管理人員或是高階主管以更快速、更直覺的方式了解整個專案的所有狀況。另外，也提供更方便的追蹤工具及報表，讓管理人員輕易的掌握整個專案狀況。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;稍微了解Team Foundation Server的設計概念及Team Foundation Server 2010的改善及加強的部份後，我們直接看一下操作及實例，可以讓大家更加了解如何應用Visual Studio 2010搭配Team Foundation Server 2010實作一個設計好的開發流程。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;連接Team Foundation Server 2010&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;點選小組-&amp;gt;連接到Team Foundation Server，出現「連接到Team 專案」的對話視窗。點選「伺服器」按鈕後，在「新增/移除 Team Foundation Server」視窗中，按下「加入」按鈕，出現「加入Team Foundation Server」視窗，在「Team Foundation Server的名稱或URL」欄位中輸入Team Foundation Server名稱，按下OK鈕。   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-ba0btvU6I/AAAAAAAAEaE/butsuAoiqIs/s1600-h/image%5B13%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-ba1SDgfWI/AAAAAAAAEaI/PLB2qT5eQxI/image_thumb%5B7%5D.png?imgmax=800" width="420" height="285" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;你會發現「連接到Team Foundation Server」視窗會出現Team 專案。與前兩版的Team Foundation Server不同的是Team Foundation Server 2010多了Team 專案集合。專案集合除了可以設定權限外，另外一個用途是可以將Team 專案進行分類的動作。一般而言會依專案性質或專案所屬部門進行分割，如此一來，除了可以減少管理上的負擔之外，也可以增加伺服器效能。(因為每一個專案集合都有一個專屬的資料庫)。   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-ba230OXVI/AAAAAAAAEaM/xopHZxyzh5Q/s1600-h/image%5B17%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-ba3l0vABI/AAAAAAAAEaQ/p1cbIAX60oI/image_thumb%5B9%5D.png?imgmax=800" width="430" height="293" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;建立一個Team 專案&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;連接Team Foundation Server 2010之後，你可以在Team總管的專案集合上按右鍵，點選 New Team Project。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-ba4Q4NNYI/AAAAAAAAEaU/d-kFmzr7VOg/s1600-h/image%5B20%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-ba5OfCSeI/AAAAAAAAEaY/Gj2AQsvoLHQ/image_thumb%5B10%5D.png?imgmax=800" width="244" height="181" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;基本上新增Team 專案與之前的版本沒有太大的差異，只有一個地方需注意一下：在選取流程範本時範本做了些更新。如下圖所示     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-ba5kxxN1I/AAAAAAAAEac/ND3eeHAnHd8/s1600-h/image%5B24%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-ba6mgMEYI/AAAAAAAAEag/1ClE-tLQCHM/image_thumb%5B12%5D.png?imgmax=800" width="409" height="346" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;你可以發現「選取流程範本」中預設的範本，已經由MSF 4.0 / 4.1，升級至MSF 5.0 。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;程式碼管理 – 版本管理&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;要將程式碼放入Team Foundation Server是很容易的，你只要在方案總管內方案上按右鍵，選擇「將方案加入原始檔控制」。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-ba7eS1yjI/AAAAAAAAEak/Bt_r5W7Ia84/s1600-h/image%5B27%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-ba8f1rdhI/AAAAAAAAEao/BKAgYFa71JE/image_thumb%5B13%5D.png?imgmax=800" width="256" height="218" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;若你確定這份程式碼已經完全沒有問題，可以放進原始檔控制中時，在要簽入的程式碼上按右鍵選擇「Check In…」簽入程式碼。    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-ba884exTI/AAAAAAAAEas/XVAd4mE7xzA/s1600-h/image%5B34%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-ba9oUbCoI/AAAAAAAAEaw/P19jOjtijuQ/image_thumb%5B16%5D.png?imgmax=800" width="244" height="238" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;當你成功的簽入程式後，方案總管內針對每支已放入原始檔控制的程式，前面的圖形會變成是鎖頭。    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-ba-YSPDzI/AAAAAAAAEa0/myf_WuRKJ0E/s1600-h/image%5B37%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-ba_cvy_9I/AAAAAAAAEa4/oF8dyyYV-tM/image_thumb%5B17%5D.png?imgmax=800" width="244" height="166" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;分支與合併&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;接下來，我們來看看Team Foundation Server 2010所提供的「分支與合併」功能。   &lt;br /&gt;相較於前面的版本，Team Foundation Server 2010新增一個非常有幫助的功能：檢視階層架構，它會用圖形化的方式表達你目前這份原始碼的各個版本相互間的關聯性，而產生的圖形也可以儲存成圖檔，分享給專案內的所有成員。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;檢視階層架構     &lt;br /&gt;&lt;/strong&gt;要使用檢視階層架構的功能，你必須先在原始檔控制中要分支的目錄上按右鍵，點選「分支與合併」à「轉換成分支」。完成後，你會發現原本的轉換成分支的功能會變成是「檢視階層架構」。    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbAbmFBSI/AAAAAAAAEa8/0GlLCBk5Smo/s1600-h/image%5B40%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbBErtqkI/AAAAAAAAEbA/Q9Vhbo8nlzU/image_thumb%5B18%5D.png?imgmax=800" width="192" height="84" /&gt;&lt;/a&gt; &lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbBvlzqXI/AAAAAAAAEbE/7BIsVYu8WPw/s1600-h/image%5B43%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bbCb3rwHI/AAAAAAAAEbI/Ro13jWNr9DU/image_thumb%5B19%5D.png?imgmax=800" width="195" height="84" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;點選「檢視階層架構」，會以圖形的方式顯示目錄的整個分支情況，如下圖    &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbDYFBR1I/AAAAAAAAEbM/DIQk12tupzA/s1600-h/image%5B47%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbEJNFo3I/AAAAAAAAEbQ/awUawvyBS5w/image_thumb%5B21%5D.png?imgmax=800" width="434" height="427" /&gt;&lt;/a&gt;     &lt;br /&gt;專案中分支階層架構這張圖，對於程式碼版本的管理有非常大的幫助。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;建立簽入原則&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;原始檔控制上的程式碼是整個專案最重要的產出，程式碼的品質其實就代表專案所有成員的努力及表現，所以嚴格管控原始檔控制上的程式碼就是必須的。Team Foundation Server 2010提供更彈性化的簽入原則來控管將要簽入的程式碼。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbFMD-AyI/AAAAAAAAEbU/fZA5OyBL9bQ/s1600-h/image%5B50%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bbF820HyI/AAAAAAAAEbY/AoEpNkrc_bc/image_thumb%5B22%5D.png?imgmax=800" width="232" height="244" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;組建：要求簽入之前最後一次編譯必須是成功的。     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbGVxMUKI/AAAAAAAAEbc/479rXniU0NA/s1600-h/image%5B53%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbGzRPDtI/AAAAAAAAEbg/XC7lvw6_PjU/image_thumb%5B23%5D.png?imgmax=800" width="208" height="121" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;程式碼分析：在簽入之前必須進行程式碼分析，預設提供多樣且彈性的規則集。     &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbHtonHjI/AAAAAAAAEbk/z4s7PofqMvU/s1600-h/image%5B56%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bbIVDrIcI/AAAAAAAAEbo/02ZXHVnT7yQ/image_thumb%5B24%5D.png?imgmax=800" width="202" height="244" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;測試原則：     &lt;br /&gt;&amp;#160;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bbI8DBMGI/AAAAAAAAEbs/lEbMXCAxtjM/s1600-h/image%5B63%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bbJvvpS6I/AAAAAAAAEbw/FgcfHbRChys/image_thumb%5B27%5D.png?imgmax=800" width="404" height="314" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;工作項目&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;除了程式碼的管理(原始檔控制)外，在軟體開發流程中還有一環-工作管理(工作項目)也是非常重要。依照不同的開發流程，會定義出不同的角色及不同的工作內容，所以Team Foundation Server 2010可以依據不同的開發流程範本，定義出不同的工作項目。例如：MSF for Agile Software Development 5.0有六種工作項目，而MSF for CMMI Process Improvement 5.0有九種工作項目，而Scrume則有十種工作項目…等，每種開發流程中的工作項目工作流也都不盡相同，甚至可以再做進階的客製化，為公司或專案打造專屬的流程。為整個專案的工作管理保留了最大的彈性。那工作項目種類這麼多，一個專案成員也不少，工作量又是出奇的高，想當然Team Foundation Server上會有很多很多的工作項目，我們來看看究竟Team Foundation Server 2010如何支援工作項目的管理(以MSF for Agile Software Development的專案為例 )。&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;階層式工作項目       &lt;br /&gt;最常見的用途是將一個工作分解成多個子工作項目。Team Foundation Server 2010可以讓使用者很方便安排及管理層次結構，例如：&lt;/li&gt;      &lt;ul&gt;       &lt;li&gt;在查詢編輯器上方的下拉式選單選擇「工作項目的樹狀目錄」。&lt;/li&gt;        &lt;li&gt;在Team總管中工作目錄下有一種圖示 代表是「樹狀工作目錄」的查詢&lt;/li&gt;        &lt;li&gt;在查詢結果中標題會依階層呈現縮排，並允許展開及折疊結果。&lt;/li&gt;        &lt;li&gt;你也可以在樹狀查詢結果內用拖曳的方式連結兩個原本沒有關係的工作項目。&lt;/li&gt;     &lt;/ul&gt;      &lt;li&gt;支援Microsoft Excel       &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bbKrreemI/AAAAAAAAEb0/xH-H83E1rY4/s1600-h/image%5B67%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbLoxLfxI/AAAAAAAAEb4/4MCP_OWOUjw/image_thumb%5B29%5D.png?imgmax=800" width="407" height="301" /&gt;&lt;/a&gt;         &lt;br /&gt;&lt;/li&gt;      &lt;li&gt;支援Microsoft Project       &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbMbKhN2I/AAAAAAAAEb8/S5DqFuSiKNY/s1600-h/image%5B73%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbNNkB3LI/AAAAAAAAEcA/Am4AXsPbZCA/image_thumb%5B33%5D.png?imgmax=800" width="412" height="235" /&gt;&lt;/a&gt;         &lt;br /&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Build Support&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;為了保證原始檔控制內程式碼的品質，組建機制是不可或缺。在Team Foundation Server 2010對於組建有很大的改善。主要改善的部份是：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;組建控制器讓你可以共享組建&lt;/strong&gt;。在Team Foundation Server 2010你可以將Team組建指派給一個組建控制器，而組建控制器包含多個組建代理服務，你可以選擇其中一個代理服務來執行。      &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbOH4qrZI/AAAAAAAAEcI/dMSmIIqQYpU/s1600-h/image%5B77%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbOx5XKBI/AAAAAAAAEcM/lbbi8TQzZhw/image_thumb%5B35%5D.png?imgmax=800" width="430" height="239" /&gt;&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;通常你必須有幾個不同設定的組建代理服務。例如：某些應用系統需要在Microsoft .NET 3.5 (不包含SP1)，而另外一個應用系統需要Microsoft .NET 3.5 + SP1，也有可能是Microsoft .NET 4.0。在Team Foundation Server 2010中，你可以使用標籤告訴Team組，該組建代理服務的設定。       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bbPnQxMQI/AAAAAAAAEcQ/50nZ0mnM6gU/s1600-h/image%5B81%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbQkrPTQI/AAAAAAAAEcU/jm4fk7pTH8Y/image_thumb%5B37%5D.png?imgmax=800" width="418" height="395" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;組建定義支援Windows Workflow Foundation 4.0&lt;/strong&gt;      &lt;br /&gt;Team Build完全支援windows workflow foundation 4.0。在大部份的狀況，你不需要調整預設範本的流程，只需要透過修改幾個組屬性。      &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bbRCKE_rI/AAAAAAAAEcY/Bc8Vyf2kHaw/s1600-h/image%5B84%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbRz4eL4I/AAAAAAAAEcc/1Ya9USAA3lE/image_thumb%5B38%5D.png?imgmax=800" width="244" height="105" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;當然你可以透過範本來重覆使用組建設定      &lt;br /&gt;甚至利用windows workflow foundation 4.0針對組建流程進行客製化      &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbSohbnlI/AAAAAAAAEcg/MtMiyxJlMTY/s1600-h/image%5B87%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbTYhk9qI/AAAAAAAAEck/Me1Xz9ECNFI/image_thumb%5B39%5D.png?imgmax=800" width="174" height="244" /&gt;&lt;/a&gt; &lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bbUhupK6I/AAAAAAAAEco/eocrKlOHkFU/s1600-h/image%5B93%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbVUDIh1I/AAAAAAAAEcs/4m6yTG_n8pc/image_thumb%5B41%5D.png?imgmax=800" width="137" height="244" /&gt;&lt;/a&gt;       &lt;br /&gt;在Team Foundation Server 2010中預設有兩個範本：DefaultTemplate及UpgradeTemplate。DefaultTemplate是目前標準的組建設定，而UpgradeTemplate則是提供給TFS 2005/2008的Team Build升級用。      &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bbWEnY9PI/AAAAAAAAEc0/weuSoYnc0LM/s1600-h/image%5B97%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbW2GmzSI/AAAAAAAAEc4/RLcvM4mJ8xo/image_thumb%5B43%5D.png?imgmax=800" width="437" height="124" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;完整且可以快速讀取的組建結果的摘要及紀錄日誌&lt;/strong&gt;。組建結果的資訊非常的完整，所以在找尋問題很方便。但是也因為資料量很大，所以Team Foundation Server 2010在讀取組建結果的效能上做了很大的調整。      &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbXn64YQI/AAAAAAAAEc8/6ZqgwLj8tOg/s1600-h/image%5B101%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bbY3TzZfI/AAAAAAAAEdA/a5YHNwpFixY/image_thumb%5B45%5D.png?imgmax=800" width="439" height="304" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;閘道簽入組建(Gated Builds)：&lt;/strong&gt;這其實算是一種功能，用來確認簽入的程式碼沒有錯誤，不會造成專案開發上任何中斷的風險。當專案成員將程式碼簽入時，將發觸發閘道簽入組建。若閘道簽入組建成功，才會完成簽入動作，若失敗，則簽入動作不會成功。      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bbZwWg50I/AAAAAAAAEdE/uz-8vtCu8Hs/s1600-h/image%5B105%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bban81vBI/AAAAAAAAEdI/T41C5BwQBJo/image_thumb%5B47%5D.png?imgmax=800" width="435" height="284" /&gt;&lt;/a&gt;      &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bbbLqFMKI/AAAAAAAAEdM/TrDaSRhb56Q/s1600-h/image%5B108%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bbcIyoIKI/AAAAAAAAEdQ/HgWNrpDfKXg/image_thumb%5B48%5D.png?imgmax=800" width="244" height="157" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;組建提示(Build Notification)：&lt;/strong&gt;當啟動組建後，無論成功或是失敗使用者都會出現提示視窗。      &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;結論：&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;專案使用哪一種開發流程基本上佔了整個專案成功或失敗超過一半的原因。所以使用對的開發流程是很重要的，然而在專案管理整個開發流程更是複雜的工作，Team Foundation Server 2010為專案提供一個最好的選擇。它除了提供現行較常見的開發流程範本，也有Third-Party廠商提供不同的開發流程解決方案，甚至你也可以為自己的企業量身打造自己專屬的開發流程範本。同時，提供工作管理模組，也提供原始碼控制模組，更讓兩個模組無縫的整合。你可以由原始碼連結到工作項目(無論是bug單，工作單或是需求單)，也可以由工作項目連結到相關的程式碼。最後，為了專案管理提供各式的工作項目管理介面及專案成員使用的入口網站，完整可客製化的報表提供高階主管及專案管理人員一目瞭然的專案資訊。Team Build則會提升整個系統的品質。&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-561932012338590388?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/561932012338590388/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=561932012338590388&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/561932012338590388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/561932012338590388'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/team-foundation-server-2010.html' title='Team Foundation Server 2010 - 統一版本與流程管理'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BiAIh45tOHE/S-bayZJoHfI/AAAAAAAAEZ4/pYPEXg5imME/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-4634161482792352672</id><published>2010-05-09T23:39:00.000+08:00</published><updated>2010-05-09T23:42:32.409+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Visual Studio 2010 - 建構應用程式藍圖</title><content type='html'>&lt;p&gt;在開發一個應用系統的系統實作階段，第一步就是要想辦法建立整個系統的藍圖。然而，萬事起頭難，稍不留意就會失之毫釐、差之千里，於是像蓋房子的設計圖一樣，應用程式藍圖就非常的重要。下面，筆者用一個N-Tier架構的網頁應用程式為例，來看看如何利用Visual Studio 2010提供的功能來建構整個應用程式藍圖。&lt;/p&gt;  &lt;p&gt;Visual Studio 2010這個版本已經支援UML。UML可以幫助理解、澄清使用者需求，並且與其它人溝通你的程式碼設計概念。例如，你可以使用UML中的使用案例圖表、活動圖表、類別圖表及順序圖表來描述使用者需求。另外，你可以使用元件圖表、類別圖表、活動圖表以及順序圖表來表達你的系統。   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXQ-GdzsI/AAAAAAAAEWc/L4Y3gDDViDA/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bXRbRMQGI/AAAAAAAAEWg/gjxQ_GY8A-s/image_thumb%5B1%5D.png?imgmax=800" width="448" height="295" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;軟體及系統架構分析&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;首先，先使用Visual Studio 2010所提供UML相關圖表來設計及說明系統，並且建構整個N-Tier網頁應用程式的架構藍圖。&lt;/p&gt;  &lt;p&gt;活動圖表&lt;/p&gt;  &lt;p&gt;表達商業流程中的參與者及其動作的工作流。簡而言之，類似現在的業務流程圖或系統流程。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXSTDyMrI/AAAAAAAAEWk/uNPRRVdKzd8/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXS6sBuGI/AAAAAAAAEWo/NJto_-bLIZc/image_thumb%5B4%5D.png?imgmax=800" width="350" height="362" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;元件圖表&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;使用視覺化的方式概述整個系統以及服務之間的溝通，可以讓你了解系統的設計及軟體架構。元件圖表重視系統內不同物件之間如何進行溝通的設計，此時不需要考量實作面。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXTkRh3tI/AAAAAAAAEWs/EENncfhmWIA/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXUfRCn1I/AAAAAAAAEWw/JQEzPYbM3nM/image_thumb%5B6%5D.png?imgmax=800" width="437" height="248" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;類別圖表&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;此處的類別圖，指的是UML類別圖，不同於.NET的類別圖。UML類別圖，在於表達類別設計時的概念，著重於描述類別的類型、屬性、操作及關聯，並非是.NET類別所強調的程式碼視覺化，也就是說Visual Studio 2010中UML類別圖表是不能產生程式碼的，若你想要的是自動產生程式碼的類別圖，請使用.NET類別圖表。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXVBFHevI/AAAAAAAAEW0/lhiq5UxV2ok/s1600-h/image%5B16%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXVnZNlxI/AAAAAAAAEW4/x1MtS2qSIp0/image_thumb%5B8%5D.png?imgmax=800" width="444" height="264" /&gt;&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXWVR3yQI/AAAAAAAAEW8/8UFq8TQDTZU/s1600-h/image%5B23%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bXXCeZ23I/AAAAAAAAEXA/BnsHTG9kp8s/image_thumb%5B13%5D.png?imgmax=800" width="447" height="361" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;順序圖表&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;順序圖表是用來表示類別、元件、子系統或是角色(流程中的參與者)實例之間，以時間為基礎彼此互動的先後順序。請注意，它表達的是實例，不是類別，所以同一個類別可以重覆出現在同一張圖表上，它代表是同一個類別，但是是不同的物件。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXYG8-h6I/AAAAAAAAEXE/nfBFjsxcCKU/s1600-h/image%5B27%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXY9Y1h_I/AAAAAAAAEXI/Lo2yhNm1TLw/image_thumb%5B15%5D.png?imgmax=800" width="450" height="324" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;使用案例圖表&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;總結究竟是誰在使用你的系統或是應用程式，以及他們能用它來做什麼。它可以充當使用者需求的描述的一個焦點，描述要求、使用者和主要元件之間的關係，但是不詳細說明使用者需求。   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXZUIL-II/AAAAAAAAEXM/2090NFNFeY0/s1600-h/image%5B31%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXaBTMgQI/AAAAAAAAEXQ/HRQwpug-v0s/image_thumb%5B17%5D.png?imgmax=800" width="447" height="373" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;使用SketchFlow建構System Prototyping&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;當整個應用系統的硬體、軟體架構都透過UML圖表進行溝通及確認後，接下來我們將開始進行整個系統的Prototyping。Prototyping是讓你成功地快速探索多種構想和概念，卻不用過度投入時間或資源的有效方法。你可以透過Microsoft Expression Blend中的SketchFlow功能迅速建立使用者介面的Prototyping。它提供一種方便又快速的方法可以與你的使用者溝通、甚至保留彼此溝通的紀錄，讓你探索、反覆修改和建立使用者介面案例的Prototyping。&lt;/p&gt;  &lt;p&gt;首先，開啟Microsoft Expression Blend，並新增一個WPF SketchFlow Application專案。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXa2jk6jI/AAAAAAAAEXU/hTPCq6fLvgI/s1600-h/image%5B35%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bXbs3jq0I/AAAAAAAAEXY/zDDwLIAlPEU/image_thumb%5B19%5D.png?imgmax=800" width="456" height="373" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;開啟SketchFlow Map視窗，在這裏你可以迅速且有效的對應和試驗應用程式UI的流程、個別畫面的版面配置，以及應用程式如何轉變狀態。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXc6HHW1I/AAAAAAAAEXc/zR7pGNg0vj8/s1600-h/image%5B39%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXdj_xlfI/AAAAAAAAEXg/Yuobyw5-m9c/image_thumb%5B21%5D.png?imgmax=800" width="451" height="282" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;在SketchFlow Map視窗建立每個畫面時，方案內會主動建立每個畫面的實體檔案，你不需要在繪製SketchFlow Map後，再依圖重新建立每個畫面的實體檔案。另外，你也可以做出共用畫面的效果，上圖中Header這個綠色元件被虛線分別指向「登入」及「檢查帳號、密碼」，代表這兩個畫面都引用「Header 」的畫面。   &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXeZqXe-I/AAAAAAAAEXk/6j-6ojlIeLo/s1600-h/image%5B43%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXfHPaJ8I/AAAAAAAAEXo/k8kOr-M6Gbs/image_thumb%5B23%5D.png?imgmax=800" width="273" height="377" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;使用內建「草稿」樣式控制項和元件、自黏便箋，以及匯入的影像，迅速反覆修改構想並將之視覺化。這種快速又流暢的工作方式表示你可以接連快速地建立、測試、反覆修改和放棄構想，讓你以最低的成本探索方案中各種可能。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXgI8H3GI/AAAAAAAAEXs/qxEyOcEm7yA/s1600-h/image%5B47%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXgpLMgZI/AAAAAAAAEXw/ZcnGZDWQ-qw/image_thumb%5B25%5D.png?imgmax=800" width="461" height="191" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;SketchFlow Prototyping能夠快速示範應用程式的流程以及應用程式如何在不同狀態間轉換，也就是說雖然看起來線條及畫面都是草稿型式，但是SketchFlow Prototyping是會動的，是可以做操作示範的，可以讓你的客戶在設計初期就能明顯的感覺到使用者經驗，並在開發程式初期就能指出瀏覽和應用程式流程的問題，幫助你的客戶不會到了最後一刻改變想法所造成的麻煩及嚴重的損失。&lt;/p&gt;  &lt;p&gt;從客戶端收集有效且及時的意見反應，跟建立Prototyping一樣的重要。你建製的Prototyping可打包成一份示範用的執行檔，透過免費的SketchFlow播放程式能確保客戶無論身在何方，都可以透過標準的瀏覽器向你的客戶呈現你的設計概念。   &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXhfBa_dI/AAAAAAAAEX0/3MRMW-rkVGg/s1600-h/image%5B51%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXibsi_HI/AAAAAAAAEX4/76VrxVSwGlg/image_thumb%5B27%5D.png?imgmax=800" width="461" height="307" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;而客戶可以在他們的瀏覽器中檢閱整個Prototyping，或是測試多種不同的案例，並隨著他們瀏覽不同的畫面提供註解回饋他們的想法，提供開發小組他們的意見。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXiz0kNUI/AAAAAAAAEX8/vP1d6KHOndg/s1600-h/image%5B56%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXj5_YAXI/AAAAAAAAEYA/N7UCx30PbsA/image_thumb%5B30%5D.png?imgmax=800" width="453" height="306" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;當開發小組收到Prototyping執行檔(內含客戶回饋的意見)，可以將它直接匯回Microsoft Expression Blend。客戶的註解一樣會呈現在設計介面的相關畫面上看到，方便立即檢閱及修正。最後，雖然概念上我們使用SketchFlow建製Prototyping，可是實質上它們是真正的Silverlight或是WPF專案，這表示從一開始我們就在建製一個真正的專案了。&lt;/p&gt;  &lt;p&gt;額外說明一件事，SketchFlow可以讓你匯入Adobe Photoshop、Adobe Illustrator或是Microsoft Powerpoint的檔案。完成後，也允許你匯出成Microsoft Word。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXkjjYcxI/AAAAAAAAEYE/_BEylkIGi70/s1600-h/image%5B60%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXla2BMHI/AAAAAAAAEYI/TlL6LI4yDUs/image_thumb%5B32%5D.png?imgmax=800" width="283" height="359" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;「匯出至Microsoft Word」這個功能會建立完整的專案說明文件，它會建立一個專案文件大綱，包含目錄、應用程式流程的擷取畫面，以及專案內不同的畫面。這可以替開發小組省下好幾個小時建立文件的時間，並讓你在應用程式迅速、反覆在修正時，也能輕鬆保持專案文件的最新狀態。&lt;/p&gt;  &lt;p&gt;從由低精準度視覺效果的線條及框線構成的簡單Prototyping，到SketchFlow的高精確度、完全互動式再加上資料導向的Prototyping。SketchFlow擁有相當的彈性讓你用最有效的方式試驗、發展概念和構想，最後呈現給客戶。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;驗證您的系統要求與設計目標&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;當你已經針對你的系統進行詳細的設計，包含程式碼、資料庫和使用者介面。你必須要能驗證程式碼是否符合系統的需求與設計的目標。所以，我們可以使用Visual Studio 2010所提供的UML圖表功能來規範實作的範圍及設計的原則，甚至限制。再利用Visual Studio 2010的強大的Test功能來撰寫單元測試、測試個案，確認程式設計師都有按照原先的使用案例進行設計及實作。最後，再利用Visual Studio 2010的圖層圖表(目前只是Visual Studio 2010 企業旗艦版及Visual Studio 2010 企業版提供這個功能)來描述應用程式的元件彼此之間的關係，甚至利用圖層圖表來驗證在程式碼中實際的依賴關係是符合當初的設計。接下來我們來談談如何利用圖層圖表驗證程式碼。&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;首先，在你的專案中新增一個新專案：模型專案     &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXmEnP6UI/AAAAAAAAEYM/LkEbur20ZwI/s1600-h/image%5B64%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bXmwaqI0I/AAAAAAAAEYQ/o55gxYx0NwI/image_thumb%5B34%5D.png?imgmax=800" width="432" height="298" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;在模型專案內新增圖層圖表     &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXnhYGXrI/AAAAAAAAEYU/FosML2_WR8Y/s1600-h/image%5B68%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bXpHDhVgI/AAAAAAAAEYY/EEei5ScskJE/image_thumb%5B36%5D.png?imgmax=800" width="435" height="300" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;開啟架構總管，加入圖層     &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXpz04WoI/AAAAAAAAEYc/qKLMU5qAadM/s1600-h/image%5B73%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXqrbQf0I/AAAAAAAAEYg/Z77OpQqvti0/image_thumb%5B39%5D.png?imgmax=800" width="437" height="133" /&gt;&lt;/a&gt;       &lt;br /&gt;你可以點選方案檢視，並選取不同的方案、專案或是類別拖曳到圖層圖表上      &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXrALqWMI/AAAAAAAAEYk/S1of9bfV9YQ/s1600-h/image%5B77%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXsEqzCEI/AAAAAAAAEYo/8d7DXXZHz_c/image_thumb%5B41%5D.png?imgmax=800" width="430" height="229" /&gt;&lt;/a&gt;       &lt;br /&gt;在圖層圖表上任一處按右鍵，點選「產生相依性」      &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bXs8KSboI/AAAAAAAAEYs/R5A7ZeEAGN8/s1600-h/image%5B80%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXtpF2zaI/AAAAAAAAEYw/ocOEKMKHTV0/image_thumb%5B42%5D.png?imgmax=800" width="195" height="196" /&gt;&lt;/a&gt; &lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXuStOw9I/AAAAAAAAEY0/IVBExMXXGX4/s1600-h/image%5B83%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXu1zIKPI/AAAAAAAAEY4/y1Z6CQlCRGI/image_thumb%5B43%5D.png?imgmax=800" width="244" height="114" /&gt;&lt;/a&gt;       &lt;br /&gt;圖層圖表會自動產生每個圖層相互間的相依性，得到目前程式碼的真實相依性，可以用來檢查是否異常或是符合當初設計的原則。      &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXvTnrdTI/AAAAAAAAEY8/2Tl5CLXX2FA/s1600-h/image%5B86%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXwBviJwI/AAAAAAAAEZA/PaE5dOL7z7o/image_thumb%5B44%5D.png?imgmax=800" width="244" height="173" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;若圖層圖表是已經存在的(可能是當初設計時保存下來的設計原則)，你也可以隨時隨地開啟圖層圖表，在圖層圖表上任一處按右鍵，點選「驗證架構」, 驗證目前程式碼是否符合設計原則     &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bXwxvcUBI/AAAAAAAAEZE/CxsQmGK2iCI/s1600-h/image%5B90%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bXxzvtWtI/AAAAAAAAEZI/tnvRR82-b3Q/image_thumb%5B46%5D.png?imgmax=800" width="247" height="248" /&gt;&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bXySh1n2I/AAAAAAAAEZM/hZSZtNU98HM/s1600-h/image%5B94%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bXzXYghgI/AAAAAAAAEZQ/5wrmeh9n2QI/image_thumb%5B48%5D.png?imgmax=800" width="436" height="141" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;當你的應用系統愈來愈大，愈來愈複雜，常常會有相依性的問題，也會因為相依性而產生其它不同的問題，所以你也可以利用Visual Studio 2010的相依性報表，整理出一份現行系統的相依性圖形，至少你會很清楚知道這顆元件究竟被哪些元件使用到或是使用到哪些元件&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;在Visual Studio 2010的下拉式選單上點選「架構」下的「產生相依性圖形」     &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bXz0VGSaI/AAAAAAAAEZU/rahozsNeasc/s1600-h/image%5B98%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bX0RvzFAI/AAAAAAAAEZY/rrz3n2zf2ig/image_thumb%5B50%5D.png?imgmax=800" width="436" height="139" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;產生的相依性報表如下：&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bX1KnjxGI/AAAAAAAAEZc/lnBCRrjTm_g/s1600-h/image%5B103%5D.png"&gt;       &lt;br /&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bX2SEmqII/AAAAAAAAEZg/2wsPdXPwQb8/image_thumb%5B53%5D.png?imgmax=800" width="431" height="281" /&gt;&lt;/a&gt;當然你可以展開到細項      &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bX3BJ86-I/AAAAAAAAEZk/4SxS8v3r4GA/s1600-h/image%5B106%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bX38JnVLI/AAAAAAAAEZo/9dNBIMj7JiA/image_thumb%5B54%5D.png?imgmax=800" width="244" height="153" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;讓你可以很清楚了解目前方案中所有程式碼相互間的關係。&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;結論&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;如下圖所示，Visual Studio 2010 在整個軟體開發生命週期提供一套完整的工具及方法論，讓開發團隊可以用更方便、更精確的方式進行整個專案。Visual Studio 2010此次版本尤其針對塑模工具，以及建構整個應用系統藍圖提供許多功能，無論是UML塑模工具、圖層圖表、相依性報表…等等，都會讓你能很快速、精確的建構出你的應用系統藍圖。&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bX4j4D32I/AAAAAAAAEZs/ke0ufUcVsD4/s1600-h/image%5B110%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-bX5hvYMLI/AAAAAAAAEZw/3FvDv5n7Ij4/image_thumb%5B56%5D.png?imgmax=800" width="438" height="421" /&gt;&lt;/a&gt; &lt;strong&gt;     &lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;參考圖形來自：&lt;/strong&gt;&lt;a href="http://blogs.msdn.com/camerons/archive/2008/12/09/layer-validation-with-the-vsts-2010-ctp.aspx"&gt;http://blogs.msdn.com/camerons/archive/2008/12/09/layer-validation-with-the-vsts-2010-ctp.aspx&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-4634161482792352672?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/4634161482792352672/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=4634161482792352672&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4634161482792352672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4634161482792352672'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/visual-studio-2010.html' title='Visual Studio 2010 - 建構應用程式藍圖'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BiAIh45tOHE/S-bXRbRMQGI/AAAAAAAAEWg/gjxQ_GY8A-s/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5032531700057485915</id><published>2010-05-09T23:25:00.000+08:00</published><updated>2010-05-09T23:27:18.580+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Visual Studio 2010 - 整合式開發環境快速開發技巧 (產品導覽 &amp; IDE增強)</title><content type='html'>&lt;p&gt;&lt;a href="http://dotnetslackers.com/articles/net/Visual-Studio-2010-and-NET-Framework-4-IDE-Enhancements-Part3.aspx"&gt;&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;產品導覽&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Microsoft Visual Studio 2010終於上市了，大家準備好了嗎？做為一個新版本的Visual Studio，當然會提供不同的以往的全新功能。接下來，跟大家介紹Visual Studio 2010上比較大的改變及全新功能的全覽。首先，我們先看回顧一下Microsoft Visual Studio Team System2008各版本的功能。   &lt;br /&gt;Visual Studio Team System 2008，一共有五個不同的版本，如下圖所示：&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bUC9SvMhI/AAAAAAAAEVQ/J4NehMOIArQ/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bUEKg8CNI/AAAAAAAAEVU/09OPjIVFVZA/image_thumb%5B1%5D.png?imgmax=800" width="431" height="329" /&gt;&lt;/a&gt; 圖表 1&lt;/p&gt;  &lt;p&gt;每個版本的Visual Studio Team System 2008都是建構在Visual Studio 2008 Professional Edition之上，並提供額外的功能。這麼多不同的版本，很容易造成大家的混淆。&lt;/p&gt;  &lt;p&gt;現在，Visual Studio 2010簡化了SKU名稱，如下圖：&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bUFdhhN2I/AAAAAAAAEVY/wbd0p_tfjUY/s1600-h/image%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bUGcivqHI/AAAAAAAAEVc/SDOm-TQ1h4U/image_thumb%5B3%5D.png?imgmax=800" width="434" height="332" /&gt;&lt;/a&gt; &lt;a name="_Ref257724717"&gt;圖表 &lt;/a&gt;2&lt;/p&gt;  &lt;p&gt;Visual Studio 2010的基本版本就是Visual Studio 2010 專業版，它提供了基本撰寫各式平台程式碼，並且編釋程式碼的能力外，另外也提供單元測試的功能。進階的版本是Visual Studio 2010 企業版，這個版本則提供大量幫助軟體開發人員撰寫程式碼的工具，其中包含靜態程式碼分析、程式碼度量、程式碼分析、資料庫的變更管理、和測試影響分析等。你可以把它當成Visual Studio 2008 for Software Developer和Visual Studio 2008 for Database Professionals兩個版本的合併版。&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 品管人員版，則是一個全新的版本，它是專門為測試專業人員而設計，其中包含測試案例的管理工具及手動測試元素。這個版本的Visual Studio是無法撰寫程式碼的，它專門為了測試而設計的。&lt;/p&gt;  &lt;p&gt;最後，代替Visual Studio Team Suite 2008的是Visual Studio 2010企業旗艦版。它包含了Visual Studio 企業版 及Visual Studio 品管人員版的所有功能。同時，它提供全新的架構驗證工具、UML塑模工具、Web測試以及負載測試工具。&lt;/p&gt;  &lt;p&gt;Team Foundation Server 2010也做了一些重要的改變，包含版本控制系統的改變、新增階層式的工作項目，以及改善專案管理的相關功能。而Team Foundation Server 2010的Build功能也因加入了Windows Workflow 4.0得到大幅的躍升。在本身的管理結構上，Team Foundation Server 2010提供一個統一的介面：Team Foundation Server Administration Console，解決在Team Foundation Server 2005/2008中必須分別在不同位置、不同帳號來啟動各類型伺服器或服務(例如：WSS, Reporting Service…等)的問題。&lt;/p&gt;  &lt;p&gt;最後， 在Visual Studio 2010這個版本中，各位可能已經發現，找不到「Team System」這個名詞了。這不代表「Team System」這套工具已經消失了，正好相反，正如圖表 2所示，這些功能都已經納入Visual Studio 2010 企業版, Visual Studio 2010 品管人員版及Visual Studio 2010 企業旗艦版的版本中。Visual Studio 2010和Team Foundation Server 2010將這些強大的、全新的功能整合在一起，讓整個開發團隊的所有成員都能利用這些功能，提高開發的生產力、軟體的品質，也可以為整個公司帶來更好的利潤。&lt;/p&gt;  &lt;p&gt;接下來，我們來了解Visual Studio 2010在IDE上究竟改善，並提供了哪些全新的功能？Visual Studio IDE是一個整合性的開發環境工具，它可以用來開發新的NET Framework 4.0，同時它也支援前期的版本，例如 .NET Framework 3.5, .NET Framework 3.0, .NET Framework 2.0。先來看看，在新版Visual Studio 2010在IDE上改進及新功能：&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Zoom&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;在Visual Studio IDE的程式碼編輯視窗或是文字編輯視窗，你都可以利用CTRL+滑鼠滾輪或點選左下角下拉式選單，快速放大及縮小視窗。   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bUHsnfjPI/AAAAAAAAEVg/F2vRGha99sQ/s1600-h/image%5B11%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bUImXXgBI/AAAAAAAAEVk/s2Fi4QHihgU/image_thumb%5B5%5D.png?imgmax=800" width="445" height="361" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;從程式碼自動生成&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;從程式碼中自動生成這個功能，讓你可以在定義類別及其屬性、方法之前就可以先使用它。它支援你可以自動生成任何的類別、建構函式、方法、屬性、欄位及列舉，所以你可以將焦點放在你的程式碼中，而在你不需要離開當前程式碼的情況下，生成你需要的新的類別及其類別成員，將中斷你的工作流的情況降到最低。同時，也支援測試趨動(TDD)的開發模型。你可以在程式碼中按下「CTRL + . 」 顯示智慧標籤以及相對應的自動生成的選項。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Call Hierarchy&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;在C# 的類別成員名稱上，按下CTRL + K，CTRL+T或是按下滑鼠右鍵選擇「View Call Hierarchy」，可以呼叫Call Hierarchy 視窗。視窗內會主要會先分成兩個目錄，分別是「誰呼叫這個成員」(Call To …)及「這個成員會呼叫哪些其它的類別成員」(Call From …)。   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bUJ6q42xI/AAAAAAAAEVo/OAaqADah2Pw/s1600-h/image%5B15%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bUK4C52vI/AAAAAAAAEVs/6BQ-6u9hZS4/image_thumb%5B7%5D.png?imgmax=800" width="447" height="320" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;你可以利用這個功能來瀏覽程式碼內所有可能會執行的路徑，尤其在共用性很高或複雜的程式上是相當有幫助的。    &lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_BiAIh45tOHE/S-bUMAqkstI/AAAAAAAAEVw/XOlWMFiGVJ4/s1600-h/image%5B19%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bUNXvXnqI/AAAAAAAAEV0/GWR1OgKF3M4/image_thumb%5B9%5D.png?imgmax=800" width="456" height="282" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;瀏覽到(Navigate To)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Navigate To是Visual Studio 2010 新的搜尋功能，它具備模糊搜尋的功能。例如：你可以輸入「AOD」，找到「AddOrderDetail」這個方法。   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-bUOgHDbxI/AAAAAAAAEV4/eYUKSMnmglU/s1600-h/image%5B23%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-bUPtgjIKI/AAAAAAAAEV8/2xU8eOGuyBQ/image_thumb%5B11%5D.png?imgmax=800" width="460" height="295" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;突顯引用&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;當你將游標移到原始程式碼中某一個字彙時， Visual Studio 2010 會自動將這個字彙的所有實例都反白突顯出來。你可以利用CTRL+SHIFT+↑或是CTRL+SHIFT+↓來瀏覽。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Box Selection&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;首先先來看一下，在圈選這個功能上的改善。Visual Studio 2005/2008在圈選文字後，預設都是藍底白字，但是在Visual Studio 2010卻會保留原本程式碼關鍵字的用色，如圖所示：   &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bUQjZJ9ZI/AAAAAAAAEWA/zFIwIxUdRe8/s1600-h/image%5B29%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bURp1CjPI/AAAAAAAAEWI/y2XXXnlLsKE/image_thumb%5B13%5D.png?imgmax=800" width="244" height="149" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-bUS6lkxyI/AAAAAAAAEWM/QCCCoGW434c/s1600-h/image%5B26%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-bUTuf2glI/AAAAAAAAEWQ/MSe1pBmLaow/image_thumb%5B12%5D.png?imgmax=800" width="231" height="185" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;在Visual Studio 2008就已經提供Box Selection的功能，你可以利用ALT+滑鼠拖曳功能達到Box Selection的功能。而在Visual Studio 2010中針對Box Selection新增三項功能：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;插入文字：你可以先用ALT+滑鼠拖曳圈選需要修改的區塊，然後在區塊內輸入欲取代的文字來取代被圈選的文字。&lt;/li&gt;    &lt;li&gt;貼上功能：你可以先複製欲取代的文字，在區塊內用CTRL+V(貼上)，將文字取代。&lt;/li&gt;    &lt;li&gt;長度為零的區塊：可以建立長度為零的垂直區塊。這個區塊就可以變成是多行插入點。     &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-bUUY4FstI/AAAAAAAAEWU/IvmtQeGW0-g/s1600-h/image%5B33%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-bUVM7PLKI/AAAAAAAAEWY/B7NF0-3F08c/image_thumb%5B15%5D.png?imgmax=800" width="437" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;支援多螢幕&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;你可以將Visual Studio IDE程式碼編輯器或是屬性視窗拖到螢幕上的任何一個位置，不再限制在Visual Studio IDE內。要將拖出Visual Studio IDE的視窗放回上一次在Visual Studio IDE中的位置，可以按下CTRL鍵，然後點兩下視窗的標題列。&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;結論&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Visual Studio 2010 全系列版本整合Team System的功能，支援整個軟體開發生命週期所需要的各項功能。同時，Visual Studio IDE也做了大幅的改善及增強，讓軟體開發人員能增加生產力、軟體的品質能提升，降低整個應用系統的開發成本。&lt;/p&gt;  &lt;p&gt;而在使用Visual Studio 2010後，感覺Visual Studio 2010 整體而言做了大幅的改善及加強，其功能之強大及操作的順暢感真的很令筆者驚艷，限於篇幅只能針對筆者覺得很重要的功能做一些簡介。若有興趣，可以連結到下列網址：   &lt;br /&gt;&lt;a href="http://dotnetslackers.com/articles/net/Visual-Studio-2010-and-NET-Framework-4-IDE-Enhancements-Part1.aspx"&gt;http://dotnetslackers.com/articles/net/Visual-Studio-2010-and-NET-Framework-4-IDE-Enhancements-Part1.aspx&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotnetslackers.com/articles/net/Visual-Studio-2010-and-NET-Framework-4-IDE-Enhancements-Part2.aspx"&gt;http://dotnetslackers.com/articles/net/Visual-Studio-2010-and-NET-Framework-4-IDE-Enhancements-Part2.aspx&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://dotnetslackers.com/articles/net/Visual-Studio-2010-and-NET-Framework-4-IDE-Enhancements-Part3.aspx"&gt;http://dotnetslackers.com/articles/net/Visual-Studio-2010-and-NET-Framework-4-IDE-Enhancements-Part3.aspx&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5032531700057485915?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5032531700057485915/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5032531700057485915&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5032531700057485915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5032531700057485915'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/visual-studio-2010-ide.html' title='Visual Studio 2010 - 整合式開發環境快速開發技巧 (產品導覽 &amp;amp; IDE增強)'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_BiAIh45tOHE/S-bUEKg8CNI/AAAAAAAAEVU/09OPjIVFVZA/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-1138404465510298302</id><published>2010-05-07T04:17:00.000+08:00</published><updated>2010-05-07T04:18:10.872+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Enterprise Library'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Logging Application Block (Microsoft Enterprise Library 5.0) - Rolling Flat File Trace Listener</title><content type='html'>&lt;p&gt;如圖所示，Microsoft Enterprise Library 5.0 Console的畫面如下，我們看一下有關Rolling Flat File Trace Listener的設定   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-Mj9GzJAhI/AAAAAAAAEU4/-I984cB8WzI/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-Mj-B8BAdI/AAAAAAAAEU8/oH0HqEEZLm0/image_thumb%5B1%5D.png?imgmax=800" width="451" height="295" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;其中幾個比較重要的設定，稍微解釋一下   &lt;br /&gt;File Exists Behavior：Overwrite / Increment    &lt;br /&gt;Roll Interval：None/Minute/Hour/Day/Week/Month/Year/Midnight    &lt;br /&gt;Roll Size KB：預設是0    &lt;br /&gt;Timestamp Pattern：預設是yyyy-MM-dd&lt;/p&gt;  &lt;p&gt;這幾個參數必須一起搭配才會出現，我們預期的效果。我們舉幾個例子說明：&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;File Exists Behavior = Overwrite     &lt;br /&gt;Roll Interval = Day      &lt;br /&gt;Roll Size KB = 10      &lt;br /&gt;Timestamp Pattern = yyyy-MM-dd      &lt;br /&gt;這樣的設定產生的結果是      &lt;br /&gt;當持續發生錯誤訊息時，log file 會增加，當log file 到達設定的Roll Size KB 的大小時，會依Timestamp Pattern 為格式建立一個檔案：rolling.2010-05-07.log，如圖所示：      &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-Mj-3WqQiI/AAAAAAAAEVA/LFDYvjgLGfA/s1600-h/image%5B6%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-Mj_RgGIyI/AAAAAAAAEVE/MJimKCA9qEo/image_thumb%5B2%5D.png?imgmax=800" width="244" height="72" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;由於將 File Exists Behavior設定成overwrite，當已經產生當天的log file後，仍然一直發生錯誤必須寫log file，此時的機制是會移除當天最早的資料，只保留最新的訊息。      &lt;br /&gt;切記：一般而言，以當天的log file其內容保留的應該都是前一天的資料。最新的資料會放在沒有帶時間格式的log file。&lt;/li&gt;    &lt;li&gt;File Exists Behavior = Increment     &lt;br /&gt;Roll Interval = Day      &lt;br /&gt;Roll Size KB = 10      &lt;br /&gt;Timestamp Pattern = yyyy-MM-dd      &lt;br /&gt;它與上一項的設定唯一不同的地方，在於File Exists Behavior的設定值不同。Increment的檔案格式 = 原本的規格 + 日期或時間 + 流水號編碼。所以就算在同一天裏面，也可以有多個log file，如圖所示：      &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-Mj_8YvsZI/AAAAAAAAEVI/45NungdHQ_g/s1600-h/image%5B9%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-MkAmPCbaI/AAAAAAAAEVM/JFN8bQbOlNY/image_thumb%5B3%5D.png?imgmax=800" width="244" height="211" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;在同一天裏，若超過設定的Roll Size KB的大小，系統會自動產生一個檔案，這種作法才能保留系統的完整性及遇到的問題。建議使用第二項的內官容？我      &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-1138404465510298302?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/1138404465510298302/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=1138404465510298302&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1138404465510298302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/1138404465510298302'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/logging-application-block-microsoft.html' title='Logging Application Block (Microsoft Enterprise Library 5.0) - Rolling Flat File Trace Listener'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/S-Mj-B8BAdI/AAAAAAAAEU8/oH0HqEEZLm0/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-327729954126992739</id><published>2010-05-06T14:26:00.001+08:00</published><updated>2010-05-06T14:26:02.163+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ReSharper'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Code Snippets for Visual Studio 2010</title><content type='html'>&lt;p&gt;兩篇還不錯的文章。第一篇在介紹 Visual Studio 2010 的Code Snippets。而第二篇是介紹ReSharper這套工具裏的更強化的Code Snippet功能，其中令人驚喜的部份是：它的Snippet Designer 及它的Snippet會自動整合至Visual Studio 2010的Intelli-sesnse中，而不需要額外再點選Insert Snippet的選項。&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.code-magazine.com/article.aspx?quickid=0601081&amp;amp;page=1"&gt;CODE Magazine - Article: Having Fun with Code Snippets&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.matthidinger.com/archive/2008/10/02/code-snippets-with-snippet-designer-and-resharper-live-templates.aspx"&gt;Code Snippets with Snippet Designer and ReSharper Live Templates&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-327729954126992739?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/327729954126992739/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=327729954126992739&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/327729954126992739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/327729954126992739'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/code-snippets-for-visual-studio-2010.html' title='Code Snippets for Visual Studio 2010'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-6953182883249626140</id><published>2010-05-06T03:08:00.001+08:00</published><updated>2010-05-06T03:10:59.552+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF 4.0'/><title type='text'>WPF vs ASP.NET</title><content type='html'>&lt;p&gt;稍微整理了一下WPF 及 ASP.NET的想法列出一個比較表&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="0" width="420"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td width="84" align="center"&gt;項目&lt;/td&gt;        &lt;td width="206" align="center"&gt;WPF&lt;/td&gt;        &lt;td width="128" align="center"&gt;ASP.NET&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;技術能力         &lt;br /&gt;(開發門檻、生產力)&lt;/td&gt;        &lt;td width="206"&gt;WPF及C#&lt;/td&gt;        &lt;td width="128"&gt;HTML、DHTML、Java Script、ASP.NET、Jquery、C#、AJAX、CSS…相關技術&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;開發工具&lt;/td&gt;        &lt;td width="206"&gt;Visual Studio 2010 / Blend Studio&lt;/td&gt;        &lt;td width="128"&gt;Visual Studio 2010&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;本機存取能力&lt;/td&gt;        &lt;td width="206"&gt;部份&lt;/td&gt;        &lt;td width="128"&gt;無&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;動畫效果&lt;/td&gt;        &lt;td width="206"&gt;優&lt;/td&gt;        &lt;td width="128"&gt;無&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;執行平台&lt;/td&gt;        &lt;td width="206"&gt;Browser/WindowsForm&lt;/td&gt;        &lt;td width="128"&gt;Browser&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;瀏覽器&lt;/td&gt;        &lt;td width="206"&gt;只支援IE         &lt;br /&gt;不需要相容性測試&lt;/td&gt;        &lt;td width="128"&gt;各式瀏覽器，但是每個版本都必須獨立測試&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;下載程式&lt;/td&gt;        &lt;td width="206"&gt;需下載整個系統的執行程式         &lt;br /&gt;程式需下載更新&lt;/td&gt;        &lt;td width="128"&gt;無&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;啟動速度&lt;/td&gt;        &lt;td width="206"&gt;較慢&lt;/td&gt;        &lt;td width="128"&gt;快&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;執行速度&lt;/td&gt;        &lt;td width="206"&gt;快&lt;/td&gt;        &lt;td width="128"&gt;較慢&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;使用本機資源&lt;/td&gt;        &lt;td width="206"&gt;需要&lt;/td&gt;        &lt;td width="128"&gt;不需要&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width="84"&gt;報表&lt;/td&gt;        &lt;td width="206"&gt;Crystal Report&lt;/td&gt;        &lt;td width="128"&gt;Crystal Report&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-6953182883249626140?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/6953182883249626140/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=6953182883249626140&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/6953182883249626140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/6953182883249626140'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/wpf-vs-aspnet.html' title='WPF vs ASP.NET'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-4953197455476756763</id><published>2010-05-06T02:38:00.000+08:00</published><updated>2010-05-06T02:41:12.715+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WPF Browser'/><category scheme='http://www.blogger.com/atom/ns#' term='Crystal Report For Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF 4.0'/><title type='text'>How to use crystal report in WPF 4.0 browser application ?</title><content type='html'>&lt;p&gt;&lt;font face="微軟正黑體"&gt;Crystal Report 本身一般而言提供兩種viewer：Web版預覽元件及Window版預覽元件，卻沒有silverlight或是WPF / WPF Browser applicatoin…等使用的預覽元件。&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="微軟正黑體"&gt;以WPF Browser application為例，我們可以使用下列的方式，在WPF browser application 中使用 Crystal Report。&lt;/font&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;font face="微軟正黑體"&gt;首先建立一個WPF瀏覽器專案       &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-G7HKva9cI/AAAAAAAAETo/r1e3KPq9a84/s1600-h/image%5B3%5D.png"&gt;&lt;font face="微軟正黑體"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-G7IIhTrbI/AAAAAAAAETs/yuW5VKwV9cI/image_thumb%5B1%5D.png?imgmax=800" width="413" height="272" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="微軟正黑體"&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="微軟正黑體"&gt;加入參考：Windows Form Integration assembly - WindowsFormIntegration.dll       &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-G7I271uzI/AAAAAAAAETw/E5AdeZ_bM58/s1600-h/image%5B10%5D.png"&gt;&lt;font face="微軟正黑體"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-G7JRI8ieI/AAAAAAAAET0/xc0Y3nIczx4/image_thumb%5B4%5D.png?imgmax=800" width="244" height="111" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="微軟正黑體"&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="微軟正黑體"&gt;加入參考：Windows Form assembly - System.Windows.Forms.dll       &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-G7KcwGfVI/AAAAAAAAET4/seajyeb6LyQ/s1600-h/image%5B13%5D.png"&gt;&lt;font face="微軟正黑體"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-G7LEh26QI/AAAAAAAAET8/m9dljAK3P40/image_thumb%5B5%5D.png?imgmax=800" width="244" height="111" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="微軟正黑體"&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="微軟正黑體"&gt;由於.NET Framework 4.0 Client Profile中並不包含Crystal Report 的預覽元件，故需&lt;strong&gt;&lt;font color="#ff0000"&gt;將整個專案的目標 Framework的屬性由.NET Framework 4 Client Profile，改成.NET Framework 4.0。&lt;/font&gt;&lt;/strong&gt;        &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S-G7LRUFxbI/AAAAAAAAEUA/IDt-UFPqqQE/s1600-h/image%5B16%5D.png"&gt;&lt;font face="微軟正黑體"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S-G7MORXoII/AAAAAAAAEUE/HUJiuc4dG1Y/image_thumb%5B6%5D.png?imgmax=800" width="244" height="54" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="微軟正黑體"&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="微軟正黑體"&gt;加入參考：CrystalDecisions.Windows.Forms       &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-G7M6_h84I/AAAAAAAAEUI/8mbg3to8A-c/s1600-h/image%5B19%5D.png"&gt;&lt;font face="微軟正黑體"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-G7OVBseNI/AAAAAAAAEUM/V5rn9HrJCR4/image_thumb%5B7%5D.png?imgmax=800" width="244" height="111" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="微軟正黑體"&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="微軟正黑體"&gt;在方案總管中的Page1.xaml上雙擊滑鼠左鍵，開啟Page1.xaml的畫面。並在工具箱裏找到WindowsFormHost元件，將該元件拖曳至畫面上。       &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-G7PCAvGHI/AAAAAAAAEUQ/CimNwNGG18U/s1600-h/image%5B7%5D.png"&gt;&lt;font face="微軟正黑體"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-G7QKfsUkI/AAAAAAAAEUU/RB5e8j15ISA/image_thumb%5B3%5D.png?imgmax=800" width="418" height="260" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;font face="微軟正黑體"&gt; &lt;/font&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="微軟正黑體"&gt;同時調整畫面上的WindowsFormsHost元件大小，使之與Page1的大小一致。       &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-G7Q3T4j4I/AAAAAAAAEUY/HI_KtW_F2rM/s1600-h/image%5B23%5D.png"&gt;&lt;font face="微軟正黑體"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-G7Rioq1zI/AAAAAAAAEUc/H5qJXYj1dl8/image_thumb%5B9%5D.png?imgmax=800" width="422" height="263" /&gt;&lt;/font&gt;&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;font face="微軟正黑體"&gt;開啟 Xaml的程式碼，分別加入下列程式碼：       &lt;br /&gt;        &lt;br /&gt;        &lt;br /&gt;&lt;/font&gt;&lt;/li&gt;    &lt;pre class="code"&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Page &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Class&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;WpfBrowserApplication2.Page1&amp;quot;&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;mc&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot; &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;d&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot; &lt;br /&gt;&lt;strong&gt;&lt;font color="#ff00ff"&gt;      &lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;font color="#ff00ff"&gt;&lt;span style="color: red"&gt;xmlns&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;cr&lt;/span&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;&lt;strong&gt;&lt;font color="#ff00ff"&gt;=&amp;quot;clr-namespace:CrystalDecisions.Windows.Forms;assembly=CrystalDecisions.Windows.Forms&amp;quot;&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: red"&gt;mc&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Ignorable&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;d&amp;quot; &lt;br /&gt;      &lt;/span&gt;&lt;span style="color: red"&gt;d&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;DesignHeight&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;768&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;d&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;DesignWidth&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;1024&amp;quot;&lt;br /&gt;      &lt;/span&gt;&lt;span style="color: red"&gt;Title&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;Page1&amp;quot;&amp;gt;&lt;br /&gt;    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;WindowsFormsHost &lt;/span&gt;&lt;span style="color: red"&gt;Height&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;768&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Left&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;windowsFormsHost1&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;Top&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;Width&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;=&amp;quot;1024&amp;quot;&amp;gt;&lt;br /&gt;            &lt;strong&gt;&lt;font color="#ff00ff"&gt;&amp;lt;&lt;/font&gt;&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;font color="#ff00ff"&gt;&lt;span style="color: #a31515"&gt;cr&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: #a31515"&gt;CrystalReportViewer &lt;/span&gt;&lt;span style="color: red"&gt;x&lt;/span&gt;&lt;span style="color: blue"&gt;:&lt;/span&gt;&lt;span style="color: red"&gt;Name&lt;/span&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;&lt;strong&gt;&lt;font color="#ff00ff"&gt;=&amp;quot;crCrystalReportViewer&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;        &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;WindowsFormsHost&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Grid&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="1"&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;br /&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;Page&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="微軟正黑體"&gt;&lt;span style="color: blue"&gt;&lt;font size="1"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;br /&gt;    &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&lt;font face="微軟正黑體"&gt;&lt;font color="#000000"&gt;開啟Page1.xaml.cs，在Page1建構子的最後加上一段程式碼&lt;br /&gt;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S-G7SnA-y1I/AAAAAAAAEUg/OrnexVQBGr4/s1600-h/image%5B27%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S-G7TTD8tdI/AAAAAAAAEUk/wjDhotA69Rg/image_thumb%5B11%5D.png?imgmax=800" width="412" height="320" /&gt;&lt;/a&gt; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;br /&gt;    &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&lt;font color="#000000" face="微軟正黑體"&gt;最後記得要調整WPF Browser 專案的安全性屬性，將ClickOnce的權限調整到「&lt;font color="#ff00ff"&gt;完全信任&lt;/font&gt;」&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-G7Uqrl4WI/AAAAAAAAEUo/N9SEA7CuV0s/s1600-h/image%5B31%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S-G7VczzABI/AAAAAAAAEUs/EwM353W5lgY/image_thumb%5B13%5D.png?imgmax=800" width="415" height="335" /&gt;&lt;/a&gt; &lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;  &lt;li&gt;&lt;br /&gt;    &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&lt;font face="微軟正黑體"&gt;&lt;font color="#000000"&gt;按下F5執行程式，你會發現CryStal Report的預覽畫面出現在WPF Browser中，如下圖所示&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S-G7V38I3SI/AAAAAAAAEUw/Qy5DRThdXB8/s1600-h/image%5B35%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/_BiAIh45tOHE/S-G7Wp9YDWI/AAAAAAAAEU0/u1u6KfmObBc/image_thumb%5B15%5D.png?imgmax=800" width="407" height="253" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;  &lt;/li&gt;&lt;br /&gt;  &lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="微軟正黑體"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="微軟正黑體"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="微軟正黑體"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="微軟正黑體"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="微軟正黑體"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="微軟正黑體"&gt;&lt;/font&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;font face="微軟正黑體"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-4953197455476756763?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/4953197455476756763/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=4953197455476756763&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4953197455476756763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/4953197455476756763'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/how-to-use-crystal-report-in-wpf-40.html' title='How to use crystal report in WPF 4.0 browser application ?'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/S-G7IIhTrbI/AAAAAAAAETs/yuW5VKwV9cI/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-3341558587966021213</id><published>2010-05-06T01:30:00.001+08:00</published><updated>2010-05-06T01:30:01.168+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Crystal Report For Visual Studio'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Crystal Report for Visual Studio 2010 ??</title><content type='html'>&lt;p&gt;在微軟的 Visual Studio 2010 英文正式版中，赫然發現不同於以往的版本 Crystal Report 消失了。此次的版本中並沒有Crystal Report for Visual Studio 2010 的存在，不過不用擔心，SAP 仍然支援 Visual Studio 2010會提供Crystal Report for Visual Studio 2010的版本，只是這一次不整合在 visual studio 2010中，而你必須到SAP的網站獨立下載安裝。(&lt;font color="#ff00ff"&gt;放心，這個版本仍然是免費的&lt;/font&gt;)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-3341558587966021213?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/3341558587966021213/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=3341558587966021213&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/3341558587966021213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/3341558587966021213'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/05/crystal-report-for-visual-studio-2010.html' title='Crystal Report for Visual Studio 2010 ??'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-8424313138356994282</id><published>2010-04-13T01:14:00.001+08:00</published><updated>2010-04-13T01:21:12.517+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><title type='text'>Visual Studio 2010 英文正式版 Release 囉</title><content type='html'>&lt;p&gt;剛剛在MSDN Subscription 發現 Visual Studio 2010 英文正式版已經可以下載了，有MSDN帳戶的人可以去下載了 (現在正在下載中…)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-8424313138356994282?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/8424313138356994282/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=8424313138356994282&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8424313138356994282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/8424313138356994282'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/04/visual-studio-2010-release.html' title='Visual Studio 2010 英文正式版 Release 囉'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-5344215799589025714</id><published>2010-04-09T00:26:00.000+08:00</published><updated>2010-04-09T00:27:04.047+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Entity Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft .NET Framework 3.5'/><title type='text'>一個撰寫LINQ語法的開發人員不可或缺的工具 - LINQPad</title><content type='html'>&lt;p&gt;在撰寫LINQ語法時，在初期不熟悉語法的情況下，常常會無法確定語法究竟對不對？取出來的資料是不是自己所想像的。&lt;/p&gt;  &lt;p&gt;現在你可以透過LINQPad，先行撰寫LINQ語法。它可以連線遠端資料庫，執行你的LINQ語法。同時支援Entity Framework 及 WCF Data Services。   &lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_BiAIh45tOHE/S74DzY9pfsI/AAAAAAAAESE/V4Tt55nMIHw/s1600-h/image%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S74D0I9Xt8I/AAAAAAAAESI/ZQcS6hc0yeE/image_thumb%5B1%5D.png?imgmax=800" width="443" height="349" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;而資料來源的部份，除了SQL Server外，也支援SQL CE、Data Services，甚至是Azure   &lt;br /&gt;&amp;#160;&lt;a href="http://lh6.ggpht.com/_BiAIh45tOHE/S74D09pYLVI/AAAAAAAAESM/_g-uXFz-M60/s1600-h/image%5B11%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BiAIh45tOHE/S74D1j5KyJI/AAAAAAAAESQ/-ptX_MLYLEE/image_thumb%5B5%5D.png?imgmax=800" width="375" height="510" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;最重要的是它 Free。你可以在&lt;a href="http://www.linqpad.net/" target="_blank"&gt;官網&lt;/a&gt;上選擇&lt;a href="http://www.linqpad.net/LINQPad.exe" target="_blank"&gt;下載獨立執行檔&lt;/a&gt;或是&lt;a href="http://www.linqpad.net/LINQPadSetup.exe" target="_blank"&gt;安裝檔案&lt;/a&gt;。最新的版本會內附大約500個來自於 &lt;a href="http://www.albahari.com/nutshell/"&gt;C# 3.0/4.0 in a Nutshell&lt;/a&gt; are © O'Reilly Media Inc. 的範例。同時支援 Entity Framework&amp;#160; - 操作方式可以參考這篇文章(&lt;a href="http://www.linqpad.net/EntityFramework.aspx" target="_blank"&gt;Using LINQPad with Entity Framework&lt;/a&gt;)。&lt;/p&gt;  &lt;p&gt;註：目前的版本是支援 c# 3.0 / .NET Framework 3.5。不過呢，我已經在官網上看到支援 C# 4.0 / .NET Framework 4.0的版本。(&lt;a href="http://www.linqpad.net/Beta.aspx" target="_blank"&gt;.NET 4.0的版本&lt;/a&gt;)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-5344215799589025714?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/5344215799589025714/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=5344215799589025714&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5344215799589025714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/5344215799589025714'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/04/linq-linqpad.html' title='一個撰寫LINQ語法的開發人員不可或缺的工具 - LINQPad'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/_BiAIh45tOHE/S74D0I9Xt8I/AAAAAAAAESI/ZQcS6hc0yeE/s72-c/image_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-937633228101139051</id><published>2010-04-01T18:20:00.001+08:00</published><updated>2010-04-01T18:20:06.487+08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Team Foundation Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Team Foundation Server 2010 RC'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010 Beta 2'/><title type='text'>Team Explorer 2005/2008 如何連結 Team Foundation Server 2010？</title><content type='html'>&lt;p&gt;首先，先下載微軟釋放出來的修正檔&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=22215e4c-af6f-4e2f-96df-20e94d762689&amp;amp;displaylang=en" target="_blank"&gt;Visual Studio Team System 2005 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer)&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=cf13ea45-d17b-4edc-8e6c-6c5b208ec54d" target="_blank"&gt;Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010 (Installer)&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;當你安裝完成後，在新增 Team Foundation Server 視窗的 「Team Foundation Server name」欄位輸入：   &lt;br /&gt;http://[tfs_name]:8080/tfs/[projectCollections]    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S7RzTQAC3vI/AAAAAAAAER0/N_nADQx6hx4/s1600-h/image%5B2%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BiAIh45tOHE/S7RzUBLYwQI/AAAAAAAAER4/Sxr-9BFAfC0/image_thumb.png?imgmax=800" width="244" height="142" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;連結的視窗就會變成   &lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_BiAIh45tOHE/S7RzUjURFXI/AAAAAAAAER8/2r-a2rcGkJQ/s1600-h/image%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BiAIh45tOHE/S7RzVe6kShI/AAAAAAAAESA/7L6v8nMRqUY/image_thumb%5B1%5D.png?imgmax=800" width="244" height="212" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;------------------------------------------------------
Kevin,Tsui in Taiwan
mailto:yakevin@gmail.com
msn:yakevin@hotmail.com
------------------------------------------------------&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7084184-937633228101139051?l=dotnetframework.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetframework.blogspot.com/feeds/937633228101139051/comments/default' title='張貼意見'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7084184&amp;postID=937633228101139051&amp;isPopup=true' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/937633228101139051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7084184/posts/default/937633228101139051'/><link rel='alternate' type='text/html' href='http://dotnetframework.blogspot.com/2010/04/team-explorer-20052008-team-foundation.html' title='Team Explorer 2005/2008 如何連結 Team Foundation Server 2010？'/><author><name>KevinTsui</name><uri>http://www.blogger.com/profile/10976518369541440959</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_BiAIh45tOHE/R4EYTHLIvpI/AAAAAAAAAHQ/BXBYoZl3LbE/S220/IMG_1805.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BiAIh45tOHE/S7RzUBLYwQI/AAAAAAAAER4/Sxr-9BFAfC0/s72-c/image_thumb.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7084184.post-1877575861115907650</id><published>2010-04-01T01:22:00.001+08:00</published><updated>2010-04-01T01:22:00.694+08:00</updated><title type='text'>Scrum With Team Foundation Server 2010</title><content type='html'>如上一篇的說明，這是另外一份slide&lt;br /&gt;了解在Team Foundation Server 2010上如何使用scrum&lt;div style="width:425px" id="__ss_2198692"&gt;&lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/aaronbjork/scrum-
