tag:blogger.com,1999:blog-267878902024-03-14T02:11:51.113+02:00Dot Net PulseRandom thoughts about software development and toolsTarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.comBlogger87125tag:blogger.com,1999:blog-26787890.post-13300142849257812042008-03-27T23:20:00.001+02:002008-03-27T23:20:17.833+02:00Argotic Syndication Framework<p>The Argotic Syndication Framework is a Microsoft .NET class library framework that enables developers to easily consume and/or generate syndicated content from within their own applications. The framework makes the reading and writing syndicated content in common formats such as RSS, Atom, OPML, APML, BlogML, and RSD very easy while still remaining extensible enough to support common/custom extensions to the syndication publishing formats. The framework includes out-of-the-box implementations of the most commonly used syndication extensions, network clients for sending and receiving peer-to-peer notification protocol messages; as well as HTTP handlers, modules, services and controls that provide rich syndication functionality to ASP.NET developers. </p> <p><a href="http://www.codeplex.com/Argotic" target="_blank">Download Argotic Syndication Framework</a></p> <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a868f768-e489-465e-9381-8daddb8b8e58" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/rss" rel="tag">rss</a>,<a href="http://technorati.com/tags/opml" rel="tag">opml</a>,<a href="http://technorati.com/tags/syndication" rel="tag">syndication</a>,<a href="http://technorati.com/tags/dotnet" rel="tag">dotnet</a></div> Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-12147318790222738802008-03-25T15:42:00.001+02:002008-03-25T15:42:47.275+02:00VisualSVN Server 1.1 is available for download<p>VisualSVN Server is a package that contains everything you need to easily setup, configure and manage SVN server on Windows.<br>It contains Subversion, Apache and a management application. <p><strong>What's new in 1.1 release of VisualSVN Server: </strong></p> <ul> <li>Added support for authentication via Windows domain. </li> <li>Implemented VisualSVN Server dashboard. </li> <li>Edit server configuration without reinstallation. </li> <li>Implemented "Import Existing Repository" command. </li> <li>New user-defined configuration file named httpd-custom.conf has been added. </li> <li>URL of the selected node is now displayed in the description bar. </li> <li>New toolbar for the "VisualSVN Server" node has been added. </li></ul> <p><a href="http://www.visualsvn.com/server/" target="_blank">Download VisualSVN Server</a></p> <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:30f184b5-e1be-474e-b95e-5e00887fbcdc" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/svn" rel="tag">svn</a>, <a href="http://technorati.com/tags/subversion" rel="tag">subversion</a>, <a href="http://technorati.com/tags/development" rel="tag">development</a></div> Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-39117644701055679932008-03-24T21:15:00.001+02:002008-03-24T21:15:50.070+02:00NPlot - freeware .Net charting library<p>NPlot  is a freeware charting library for .NET. It boasts an elegant and flexible API. NPlot includes controls for Windows Forms, ASP.NET and a class for creating Bitmaps.</p> <p>Take look at some <a href="http://netcontrols.org/nplot/wiki/index.php?n=Main.DownloadArea" target="_blank">examples</a> </p> <p>Download the current version of NPlot <a href="http://netcontrols.org/nplot/wiki/index.php?n=Main.DownloadArea" target="_blank">here</a></p> <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:5d3b4ee3-53b6-4d72-bebf-e0c34dfd908c" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/charting" rel="tag">charting</a>,<a href="http://technorati.com/tags/freeware" rel="tag">freeware</a>,<a href="http://technorati.com/tags/dotnet" rel="tag">dotnet</a></div> Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-70491197039505156642008-01-31T23:49:00.001+02:002008-01-31T23:49:53.844+02:00System.Reflection - MethodInfo class (usage)<p>A MethodInfo class provides detailed information about a single method of a class or an interface. The reflected method may be a static method or an instance method. The MethodInfoSpy example shows how to obtain the method information of a class including the access modifiers, type or input parameters:</p> <p> </p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">using</span> System;<br /><span style="color: #0000ff">using</span> System.Collections.Generic;<br /><span style="color: #0000ff">using</span> System.Linq;<br /><span style="color: #0000ff">using</span> System.Text;<br /><span style="color: #0000ff">using</span> System.Drawing;<br /><span style="color: #0000ff">using</span> System.Reflection;<br /><br /><span style="color: #0000ff">namespace</span> MethodInfoSpy<br />{<br /> <span style="color: #0000ff">class</span> Program<br /> {<br /><br /> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> Main(<span style="color: #0000ff">string</span>[] args)<br /> {<br /> Type type = <span style="color: #0000ff">typeof</span>(Program);<br /> MethodInfo [] methodInfos = type.GetMethods();<br /> <span style="color: #0000ff">foreach</span> (MethodInfo methodInfo <span style="color: #0000ff">in</span> methodInfos)<br /> {<br /> <span style="color: #008000">// retrive method information</span><br /> Console.WriteLine(<span style="color: #006080">"Name: {0}, Public: {1}, Is Static: {2}, Return Type: {3}"</span>,<br /> methodInfo.Name,<br /> methodInfo.IsPublic,<br /> methodInfo.IsStatic,<br /> methodInfo.ReturnType.FullName);<br /><br /> <span style="color: #008000">// retrive method parameters information</span><br /> ParameterInfo [] paramInfos = methodInfo.GetParameters();<br /> <span style="color: #0000ff">foreach</span> (ParameterInfo paramInfo <span style="color: #0000ff">in</span> paramInfos)<br /> {<br /> Console.WriteLine(<span style="color: #006080">"Parameter Name: {0}, Parameter Type: {1}"</span>,<br /> paramInfo.Name, paramInfo.ParameterType.FullName);<br /> }<br /> }<br /> Console.ReadLine();<br /> }<br /><br /><br /> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> DoNothing()<br /> {<br /> }<br /><br /> <span style="color: #0000ff">public</span> <span style="color: #0000ff">int</span> Add(<span style="color: #0000ff">int</span> x, <span style="color: #0000ff">int</span> y)<br /> {<br /> <span style="color: #0000ff">return</span> x + y;<br /> }<br /> }<br />}</pre><br /></div><br /><br /><p>A sample of the output follows:</p><br /><br /><table cellspacing="0" cellpadding="2" width="400" border="1"><tbody><br /> <tr><br /> <td valign="top" width="400"><br /> <p>Name: DoNothing, Public: True, Is Static: False, Return Type: System.Void<br /> <br />Name: Add, Public: True, Is Static: False, Return Type: System.Int32<br /><br /> <br />Parameter Name: x, Parameter Type: System.Int32<br /><br /> <br />Parameter Name: y, Parameter Type: System.Int32<br /><br /> <br />Name: GetType, Public: True, Is Static: False, Return Type: System.Type<br /><br /> <br />Name: ToString, Public: True, Is Static: False, Return Type: System.String<br /><br /> <br />Name: Equals, Public: True, Is Static: False, Return Type: System.Boolean<br /><br /> <br />Parameter Name: obj, Parameter Type: System.Object<br /><br /> <br />Name: GetHashCode, Public: True, Is Static: False, Return Type: System.Int32</p><br /> </td><br /> </tr><br /> </tbody></table><br /><br /><p> </p><br /><br /><div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:489c60ba-0f66-4a7e-a813-99aefda31b4e" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/c#" rel="tag">c#</a>,<a href="http://technorati.com/tags/reflection" rel="tag">reflection</a></div> Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-52888768434826697052008-01-31T22:57:00.001+02:002008-01-31T22:57:12.106+02:00How to support != and == operations for C# struct<p>Sometimes we prefer to use structs instead classes .The C# is a convenient way to store coordinates ,complex number etc . <br />In an example below I'm presenting how to support == and != operators in case we want to check if our structs are equal.</p> <p> </p> <div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #008000">// <summary></span><br /><span style="color: #008000">/// Circle</span><br /><span style="color: #008000">/// </summary></span><br /><span style="color: #0000ff">struct</span> Circle<br />{<br /> <span style="color: #0000ff">public</span> Point Center;<br /> <span style="color: #0000ff">public</span> <span style="color: #0000ff">double</span> Radius;<br /><br /> <span style="color: #008000">/// <summary></span><br /> <span style="color: #008000">/// Compares two Circle objects. The result specifies whether the values</span><br /> <span style="color: #008000">/// of the Center or Radius properties of the two Circle objects are equal.</span><br /> <span style="color: #008000">/// </summary></span><br /> <span style="color: #008000">/// <param name="left">A Circle to compare.</param></span><br /> <span style="color: #008000">/// <param name="right">A Circle to compare.</param></span><br /> <span style="color: #008000">/// <returns>true if the the Center properties or the Radius properties </span><br /> <span style="color: #008000">/// of left and right are equal; otherwise, false.</returns></span><br /> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">bool</span> <span style="color: #0000ff">operator</span> ==(Circle left, Circle right)<br /> {<br /> <span style="color: #0000ff">return</span> (left.Center == right.Center) && (left.Radius == right.Radius);<br /> }<br /><br /> <span style="color: #008000">/// <summary></span><br /> <span style="color: #008000">/// Compares two Circle objects. The result specifies whether the values</span><br /> <span style="color: #008000">/// of the Center or Radius properties of the two Circle objects are unequal.</span><br /> <span style="color: #008000">/// </summary></span><br /> <span style="color: #008000">/// <param name="left">A Circle to compare.</param></span><br /> <span style="color: #008000">/// <param name="right">A Circle to compare.</param></span><br /> <span style="color: #008000">/// <returns>true if the values of either the Center properties </span><br /> <span style="color: #008000">/// or the Radius properties of left and right differ; otherwise, false.</returns></span><br /> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">bool</span> <span style="color: #0000ff">operator</span> !=(Circle left, Circle right)<br /> {<br /> <span style="color: #0000ff">return</span> !(left == right);<br /> }<br /><br /><br /> <span style="color: #008000">/// <summary></span><br /> <span style="color: #008000">/// Specifies whether this Circle contains the same Center and Radius as </span><br /> <span style="color: #008000">/// the specified Object.</span><br /> <span style="color: #008000">/// </summary></span><br /> <span style="color: #008000">/// <param name="obj">Another object to compare to.</param></span><br /> <span style="color: #008000">/// <returns></span><br /> <span style="color: #008000">/// true if obj is a Point and has the same Center and Radius as this Circle.</span><br /> <span style="color: #008000">/// </returns></span><br /> <span style="color: #0000ff">public</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">bool</span> Equals(<span style="color: #0000ff">object</span> obj)<br /> {<br /> <span style="color: #0000ff">if</span> (!(obj <span style="color: #0000ff">is</span> Circle))<br /> {<br /> <span style="color: #0000ff">return</span> <span style="color: #0000ff">false</span>;<br /> }<br /> Circle circle = (Circle)obj;<br /> <span style="color: #0000ff">return</span> (circle.Center == <span style="color: #0000ff">this</span>.Center) && (circle.Radius == <span style="color: #0000ff">this</span>.Radius);<br /> }<br /><br /> <span style="color: #008000">/// .... You need to overload GetHashCode and ToString methods</span><br /><br />}</pre><br /></div><br /><br /><p>Testing our struct ...</p><br /><br /><div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"><br /> <pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> Main(<span style="color: #0000ff">string</span>[] args)<br /><br /><br /> Circle circle1 = <span style="color: #0000ff">new</span> Circle();<br /> circle1.Center = <span style="color: #0000ff">new</span> Point(10, 10);<br /> circle1.Radius = 20;<br /><br /><br /> Circle circle2 = <span style="color: #0000ff">new</span> Circle();<br /> circle2.Center = <span style="color: #0000ff">new</span> Point(10, 10);<br /> circle2.Radius = 20;<br /><br /><br /> <span style="color: #0000ff">bool</span> result = (circle1==circle2);<br /> Console.WriteLine(<span style="color: #006080">"Is circle1 equal to circle2? [{0}]"</span>, result );<br /><br /> circle2.Center = <span style="color: #0000ff">new</span> Point(14, 10);<br /> result = (circle1 == circle2);<br /> Console.WriteLine(<span style="color: #006080">"Is circle1 equal to circle2? [{0}]"</span>, result);<br /><br /> Console.ReadLine();</pre><br /></div><br /><br /><p> </p><br /><br /><div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d1f37537-165e-4abe-b37b-3508e5cb77c4" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/struct" rel="tag">struct</a>,<a href="http://technorati.com/tags/c#" rel="tag">c#</a>,<a href="http://technorati.com/tags/data-structures" rel="tag">data-structures</a></div> Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-32188806023837301922008-01-15T21:39:00.001+02:002008-01-15T21:39:20.206+02:00How to test your applications using WPF UI automation<p> </p> <li><a href="http://msdn2.microsoft.com/en-us/library/ms747327.aspx" target="_blank">UI Automation Overview</a></li> <li><a href="http://msdn2.microsoft.com/en-us/library/aa348551.aspx" target="_blank">Using UI Automation for Automated Testing</a></li> <li><a href="http://msdn2.microsoft.com/en-us/library/ms727247.aspx" target="_blank">UI Spy (UISpy.exe)</a></li> <li><a href="http://wpf.netfx3.com/files/folders/developer/entry5155.aspx" target="_blank">UI Automation Stress</a></li> <li><a href="http://miketwo.blogspot.com/2007/03/unit-testing-wpf-controls-with.html" target="_blank">Unit Testing WPF controls with Automation Peers</a></li> <li><a href="http://www.hedgate.net/articles/2007/01/08/instantiating-a-wpf-control-from-an-nunit-test" target="_blank">Instantiating a WPF control from an NUnit test</a></li> <li><a href="http://www.codeproject.com/WPF/UIAutomation2.asp">NumericUpDown Custom Control with Theme and UI Automation Support Sample</a> (UI Automation support to a custom control )</li> <li><a href="http://www.codeplex.com/uapp" target="_blank">.NET UI Automation Extension for Automation Testing</a></li> <p>[Via <a href="http://blogs.msdn.com/llobo" target="_blank">Lester's WPF blog</a>]</p> <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:cafa3658-26ca-4b18-9d17-68a1ebe0d34d" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/UI" rel="tag">UI</a>,<a href="http://technorati.com/tags/Automation" rel="tag">Automation</a>,<a href="http://technorati.com/tags/WPF" rel="tag">WPF</a>,<a href="http://technorati.com/tags/.Net" rel="tag">.Net</a></div> Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-64241876975263958622007-12-02T23:29:00.001+02:002007-12-02T23:29:46.784+02:00SHA1 hash calculation in C#<p>The SHA1 algorithm can be used to calculate check sum, that very useful when you want to ensure the string is not broken .Also for simple  password verification.The example below show how to calculate SHA1 for given string .</p> <p> </p> <pre class="csharpcode"><span class="rem">/// <summary></span><br /><span class="rem">/// Calculates SHA1 hash</span><br /><span class="rem">/// </summary></span><br /><span class="rem">/// <param name="text">input string</param></span><br /><span class="rem">/// <param name="enc">Character encoding</param></span><br /><span class="rem">/// <returns>SHA1 hash</returns></span><br /><span class="kwrd">public</span> <span class="kwrd">static</span> <span class="kwrd">string</span> CalculateSHA1(<span class="kwrd">string</span> text, Encoding enc)<br />{<br /> <span class="kwrd">byte</span>[] buffer = enc.GetBytes(text);<br /> SHA1CryptoServiceProvider cryptoTransformSHA1 = <br /> <span class="kwrd">new</span> SHA1CryptoServiceProvider();<br /> <span class="kwrd">string</span> hash = BitConverter.ToString(<br /> cryptoTransformSHA1.ComputeHash(buffer)).Replace(<span class="str">"-"</span>, <span class="str">""</span>);<br /><br /> <span class="kwrd">return</span> hash;<br />}</pre><br /><br /><p>The result SHA1 hash for the string "first string":<style type="text/css"><br />.csharpcode, .csharpcode pre<br />{<br /> font-size: small;<br /> color: black;<br /> font-family: consolas, "Courier New", courier, monospace;<br /> background-color: #ffffff;<br /> /*white-space: pre;*/<br />}<br />.csharpcode pre { margin: 0em; }<br />.csharpcode .rem { color: #008000; }<br />.csharpcode .kwrd { color: #0000ff; }<br />.csharpcode .str { color: #006080; }<br />.csharpcode .op { color: #0000c0; }<br />.csharpcode .preproc { color: #cc6633; }<br />.csharpcode .asp { background-color: #ffff00; }<br />.csharpcode .html { color: #800000; }<br />.csharpcode .attr { color: #ff0000; }<br />.csharpcode .alt <br />{<br /> background-color: #f4f4f4;<br /> width: 100%;<br /> margin: 0em;<br />}<br />.csharpcode .lnum { color: #606060; }</style></p><br /><br /><p><a href="http://lh4.google.com/tarasn/R1Mjxk5CefI/AAAAAAAAAEg/NleZbMsopnk/image%5B7%5D"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="49" alt="image" src="http://lh3.google.com/tarasn/R1MjyU5CegI/AAAAAAAAAEo/zh-JpreLT0Y/image_thumb%5B3%5D" width="329" border="0" /></a> </p><br /><br /><div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:904a1253-e08e-4d70-9e00-3af3befb8611" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/hash" rel="tag">hash</a>,<a href="http://technorati.com/tags/security" rel="tag">security</a>,<a href="http://technorati.com/tags/dotnet" rel="tag">dotnet</a>,<a href="http://technorati.com/tags/SHA1" rel="tag">SHA1</a></div> Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com10tag:blogger.com,1999:blog-26787890.post-48957333330813748202007-11-20T13:05:00.000+02:002007-11-20T13:10:30.557+02:00Visual Studio 2008 and .NET Framework 3.5 Training Kit containing Labs, Demos and Powerpoint PresentationsThe Visual Studio 2008 and .NET Framework 3.5 Training Kit includes powerpoint presentations, hands-on labs, and demos. This training kit is designed to help you learn how to utilize the Visual Studio 2008 features and a variety of framework technologies including: LINQ, C# 3.0, Visual Basic 9, WCF, WF, WPF, ASP.NET AJAX, VSTO, CardSpace, SilverLight, Mobile and Application Lifecycle Management.<br /><br /><a href="http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=8bdaa836-0bba-4393-94db-6c3c4a0c98a1&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fa%2fa%2f2%2faa24aa27-3e51-4d52-b223-6c3dc40efe42%2fVisualStudio2008TrainingKit.exe">Download Visual Studio 2008 and .NET Framework 3.5 Training Kit</a>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-24509406562572070132007-08-22T18:50:00.001+03:002007-08-22T18:50:29.706+03:00Free tool that allows administrators to schedule various SQL jobs for SQL Server Express and other versions of SQL Server<p>SQLScheduler is a fully functional client/server application written in C# that allows administrators to schedule various SQL jobs for SQL Server Express and other versions of SQL Server. <h4><strong>Features</strong>:</h4> <ul> <li>Supports all versions of SQL Server 2000 and 2005 <li>Supports unlimited SQL Server instances with an unlimited number of jobs. <li>Allows to easily schedule SQL Server maintenance tasks: backups, index rebuilds, integrity checks, etc. <li>Runs as Windows Service <li>Email notifications on job success and failure </li></ul> <p><a href="http://www.lazycoding.com/downloads/SQLScheduler_LatestVersion.zip" target="_blank">Download SQLScheduler</a></p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-40274374728401135912007-07-23T23:04:00.001+03:002007-07-23T23:04:19.175+03:00JavaScript SyntaxHighlighter<p><a href="http://code.google.com/p/syntaxhighlighter/wiki/Overview" target="_blank">SyntaxHighlighter</a> is here to help a developer/coder to post code snippets online with ease and have it look pretty. It's 100% Java Script based and it doesn't care what you have on your server.The idea behind <a href="http://code.google.com/p/syntaxhighlighter/wiki/Overview" target="_blank">SyntaxHighlighter</a> is to allow insertion of colored code snippets on a web page without relying on any server side scripts.</p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com2tag:blogger.com,1999:blog-26787890.post-24155854323183131982007-07-02T18:32:00.000+03:002007-07-02T23:04:03.995+03:00Fiddler 2.1 Released<p>Fiddler v2 is a new version of the Fiddler Debugging proxy. Fiddler2 is freeware and can debug traffic from virtually any application, including IE, Firefox, Safari.<br>Fiddler2 supports viewing and tampering with HTTPS traffic.Read a quick summary of <a href="http://www.developer.com/lang/jscript/article.php/3631066" target="_blank">getting started with Fiddler</a>. <br><a href="http://www.fiddler2.com/Fiddler/version.asp" target="_blank">Download Fiddler2</a></p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-84250174130056219832007-06-29T19:40:00.001+03:002007-06-29T19:40:12.888+03:00Manage Subversion servers on Windows.<p><b>PainlessSVN </b>provides you with the ability to completely manage your Subversion Repositories & Server conviently and effectively without the using of command line interface.</p> <p><strong>PainlessSVN Features</strong></p> <ol> <li>Creates and Deletes Repositories <li> Creates and Deletes Directories <li> Creates and Deletes Users <li> Creates Dump Files <li> Creates Hot Copies <li> Manages access to repositories <li>Uses the Microsoft Management Console.</li></ol> <p><a href="http://www.systemwidgets.com/Downloads/PainlessSVN/tabid/76/Default.aspx" target="_blank">Download PainlessSVN Professional Preview 3</a></p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-31594108058645963412007-06-25T22:34:00.001+03:002007-06-25T22:34:50.023+03:00.NET Framework 3.0 Virtual Labs<p>.NET Framework version 3.0 is Microsoft’s managed-code programming model for developing software on the Windows platform. .NET Framework 3.0 includes Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation, and Windows CardSpace technologies.Today you can learn these new technologies through a series of guided, hands-on labs which can be completed in 90 minutes or less. <p> <p><strong>Windows CardSpace Virtual Labs</strong> <p><a href="http://go.microsoft.com/?linkid=5606430">Core Features of Windows CardSpace</a> <p><strong>Windows Presentation Foundation Virtual Labs</strong> <p><a href="http://go.microsoft.com/?linkid=6012928" target="_blank">Building Windows Presentation Foundation Applications C# Part 1</a><br><a href="http://go.microsoft.com/?linkid=6012929" target="_blank">Building Windows Presentation Foundation Applications C# Part 2</a><br><a href="http://go.microsoft.com/?linkid=6012930" target="_blank">Building Windows Presentation Foundation Applications VB Part 1</a><br><a href="http://go.microsoft.com/?linkid=6012931" target="_blank">Building Windows Presentation Foundation Applications VB Part 2</a> <p><strong>Windows Communication Foundation Virtual Labs</strong> <p><a href="http://go.microsoft.com/?linkid=6650615" target="_blank">A Server Scenario Lab with Windows Communication Foundation</a> <br><a href="http://go.microsoft.com/?linkid=5667557" target="_blank">Understanding Windows Communication Foundation</a><br><a href="http://go.microsoft.com/?linkid=4554218" target="_blank">The Fundamentals of Programming the Windows Communication Foundation</a><br><a href="http://go.microsoft.com/?linkid=4554219" target="_blank">Reliable and Transacted Messaging with the Windows Communication Foundation</a> <p><strong>Windows Workflow Foundation Virtual Labs</strong> <p><a href="http://go.microsoft.com/?linkid=6614908" target="_blank">A Server Scenario Lab with Windows Workflow Foundation</a><br><a href="http://go.microsoft.com/?linkid=4267495" target="_blank">Getting Started with Windows Workflow Foundation</a> <p>You get a downloadable manual and a 90-minute block of time for each module. You can sign up for additional 90-minute blocks at any time.</p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-50218392291336632102007-06-20T23:56:00.001+03:002007-06-20T23:56:51.366+03:00Building Silverlight Applications using .NET Talk (by ScottGu )<p>Scott used a few slides to explain each programming model concept in Silverlight, and then showed a very base sample for each concept that helped present concretely how it worked.</p> <p> </p> <p>In the talk Scott covered fallowing Silverlight concepts: <ul> <li>XAML <li>Using Shapes and Text <li>Using Controls <li>Layout (Canvas and Layout Managers) <li>Brushes <li>Transforms <li>Handling Events and Writing Code <li>Building Custom UI Controls <li>Reaching out and Programming the HTML of a page from a Silverlight control <li>Handling HTML Events in Managed Code (e.g. html button click handled in C#/VB on the client) <li>Exposing managed APIs to HTML JavaScript in the browser <li>Using the File Open Dialog support <li>Using the HTTP Network APIs <li>Using the Web Service APIs <li>Isolated Storage for local data caching</li></ul> <p> </p> <p>You can download the slides + demos of this talk below: <ul> <li><a href="http://www.scottgu.com/blogposts/silverlighteurope/silverlighttalkeurope2007.zip" target="_blank">Slides in Office 2007 format</a> (1.3MB) <li><a href="http://www.scottgu.com/blogposts/silverlighteurope/silverlighttalkeurope.zip" target="_blank">Slides in Office 2003 format</a> (21MB) <li><a href="http://www.scottgu.com/blogposts/silverlighteurope/silverlightsamples.zip" target="_blank">Samples</a> (300KB)</li></ul> <p>Included in the .zip download are readme instructions on how to run all of the samples on your own machine.</p> <div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:92d238e4-a8eb-42a8-a756-9713204aac03" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati tags: <a href="http://technorati.com/tags/silverlight" rel="tag">silverlight</a>, <a href="http://technorati.com/tags/microsoft" rel="tag">microsoft</a>, <a href="http://technorati.com/tags/dotnet" rel="tag">dotnet</a></div>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-54646111645966413552007-06-14T22:20:00.001+03:002007-06-14T22:20:16.082+03:00Updated utilities from Mark Russinovich<p>Updated utilities are ZoomIt, Streams, String, PsExec, SigCheck and DiskExt. <p>List of changes: <ul> <li> <p><strong>ZoomIt</strong> - you can type text while zoomed and you can also create scratch pad by clearing screen. </p> <li> <p><strong>Streams</strong> - Streams now supports printing and deleting streams on volume root directories. There is also new -accepteula switch - hope so it will be included with every single utility :(</p> <li> <p><strong>String</strong> - improving performance by limiting no. of bytes that it is reading</p> <li> <p><strong>PsExec</strong> - Officially this release to <strong>PsExec</strong>, a utility for running programs on remote systems, corrects a buffer overflow bug caused by long command line arguments. Unofficially as I found out - it also fixes bug with running PsExec against local computer (PsExec <a>\\%ComputerName%</a> cmd is giving you error regarding user name or password). Finally :) This is quite pain when you got automated processing.</p> <li> <p><strong>SigCheck</strong> - new switches -a and -m (more version data and manifests)</p> <li> <p><strong>DiskExt</strong> - now reports the mappings for volume that have not been mounted by a file system.</p></li></ul> <p> <p>[Via <a href="http://msmvps.com/blogs/martinzugec" target="_blank">MartinZugec's blog</a> ]</p> <div class="wlWriterSmartContent" id="0767317B-992E-4b12-91E0-4F059A8CECA8:bb10e5b1-7738-405c-906c-6ca21ce4eec5" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati tags: <a href="http://technorati.com/tags/microsoft" rel="tag">microsoft</a>, <a href="http://technorati.com/tags/tools" rel="tag">tools</a></div>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-41564815429389664862007-05-24T20:49:00.001+03:002007-05-24T20:49:50.203+03:00Developing with Microsoft® ASP.NET AJAX Extensions<p> <p>In <a href="https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=73568" target="_blank">this</a> 2-hour clinic you will learn about the rich functionality that ASP.NET AJAX Extensions provides for building highly responsive and enhanced web applications. In addition to learning about the different server and client components of ASP.NET AJAX, you will also learn how to build new ASP.NET AJAX applications and how to upgrade existing ASP.NET applications to take advantage of ASP.NET AJAX.</p> <p><br><strong>Clinic Content</strong></p> <p>Clinic Overview<br>Navigation Overview<br>Overview of ASP.NET AJAX<br>Introduction to AJAX and ASP.NET AJAX<br>Introduction to the Architecture of ASP.NET AJAX<br>Programming with ASP.NET AJAX<br>Building a Simple ASP.NET AJAX Application<br>Using the AJAX Library to Enhance Web User Interfaces<br>Calling Web Services and Web Methods from the Client<br>Additional InformationTarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-9316961104534394982007-05-24T20:44:00.001+03:002007-05-24T20:44:31.545+03:00Learn WPF,WCF,WWF for free<p></p> <p>This collection of 3 2-hour premium clinics teaches about the new capabilities provided by the .NET Framework 3.0. These clinics are for experienced(2 years) Developers and SW Architects who are looking to integrate Microsoft's next generation technology within their projects. <p>Topics covered within the offer include: <p><a href="https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=68394" target="_blank">Clinic 5135: Introduction to Developing with Windows® Presentation Foundation and Visual Studio® 2005</a> <p><a href="https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=67819" target="_blank">Clinic 5136: Introduction to Developing with Windows® Workflow Foundation and Visual Studio® 2005</a> <p><a href="https://www.microsoftelearning.com/eLearning/courseDetail.aspx?courseId=68396" target="_blank">Clinic 5137: Introduction to Developing with Windows® Communication Foundation and Visual Studio® 2005</a></p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-21898653587743145112007-03-06T23:36:00.001+02:002007-03-06T23:36:10.292+02:00DataBatcher<p></p> <p>With DataBatcher you can perform the following tasks in a batch-processed manner: <ul> <li>Copy files / folders from one location to another <li>Create new files / folders <li>Delete files / folders <li>Create shortcuts to files / folders <li>Change the attributes of files / folders <li>Touch files / folders (i.e. change their modified, created, accessed times) <li>Execute a batch file (.bat; .cmd) in the Cmd.exe command interpreter (e.g. to rename files) <li>Convert image files from one format to another <li>Run a Windows PowerShell 1.0 script that is able to interact with DataBatcher's runtime environment. </li></ul> <p><strong>Features</strong></p> <ul> <li>Set up and run (and re-run) batch-processed jobs </li> <li>Configure each step in a job to behave exactly as you wish </li> <li>Process sets of files on an assembly line basis </li> <li>Full logging of all activity when a job runs </li> <li>Pre-prepare collections of files to be processed when a job runs </li> <li>Minimize the GUI application to the task bar or system tray when a job runs </li> <li>Run jobs in a hands-free manner using DataBatcher's console application </li> <li>Set up portable jobs that run correctly on different machines </li> <li>Full undo / redo for all editable documents </li> <li>Open, XML-based formats are used for all of DataBatcher's own files (e.g. job files), allowing them to be processed by other programs </li> <li>An SDK (software development kit) for writing your own plugin modules is included with each installed copy of DataBatcher. </li></ul> <p><a href="http://www.databatcher.com/download/index.html" target="_blank">Download DataBatcher for free</a></p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-67353810167811258142007-02-28T00:55:00.001+02:002007-02-28T00:55:05.598+02:00How To Print a DataGridView in C# and .NET<p>The DataGridView control in .NET 2.0 is an incredible data representation control, and contains many features that you could benefit from. The only thing that is not supported by this control is the printing feature.Salan Al-Ani created the <a href="http://www.codeproject.com/csharp/datagridviewprinter.asp" target="_blank">class</a> for this feature and share it with others.</p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com1tag:blogger.com,1999:blog-26787890.post-1398884694785412042007-02-28T00:41:00.003+02:002007-02-28T00:42:12.111+02:00PowerShell Editor and Analyzer<blockquote> <p><a href="http://www.powershellanalyzer.com/" target="_blank">PowerShell Analyzer</a> is a rich interactive environment for Windows PowerShell. Its goal is to be the PowerShell host of choice for IT professionals and system administrators. It has all the typical editor and IDE functionality that you would expect when working on a modern language, but it focuses on the real time interactive experience as if you were at the console, helping you compose the commands you want to use, and also giving you rich graphical visualization of the results. PowerShell may seem to just return text like the average Unix shell, but in reality, it is returning rich self describing Dotnet objects. PowerShell Analyzer not only helps you with the INPUT, but also with the output. It shows you the properties of the rich objects that the commands return, as well as specific visualizers to help you interact with output such as XML, HTML, charts, tables, and hierarchical data structures.</p></blockquote> <p> </p> <p><a href="http://www.powershellanalyzer.com/download.html" target="_blank">Download PowerShell Analyzer</a></p> <p><a href="http://www.powershellanalyzer.com/demos/index.html" target="_blank">Video Demos</a></p> <p><a href="http://www.karlprosser.com/coder/?cat=8" target="_blank">Author's Blog</a></p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-55428012214258889852007-02-18T01:47:00.000+02:002007-02-18T01:48:00.381+02:00Change font style for specific cell in datagridview<p>The way to change font for a single cell in an unbound datagridview.</p><br /><p> </p><br /><p></p><br /><div class="wlWriterEditableSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:8c7bd47c-8aaa-4591-b580-23db37ac6c11" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color: white"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000ff">int</span><span style="color: #000000"> columnIndex </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">1</span><span style="color: #000000">;<br /></span><span style="color: #0000ff">int</span><span style="color: #000000"> rowIndex </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">2</span><span style="color: #000000">;<br /></span><span style="color: #008000">//</span><span style="color: #008000"> create bold font based on the default font </span><span style="color: #008000"><br /></span><span style="color: #000000">Font newFont </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> Font(dataGridView1.Font, FontStyle.Bold);<br />dataGridView1[columnIndex, rowIndex].Style.Font </span><span style="color: #000000">=</span><span style="color: #000000"> newFont;<br /></span></div></pre></div><br /><p></p><br /><p> </p><br /><p>Using this simple technique you can change foreground or background color ( and many more style related properties ) for specific cell .</p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com11tag:blogger.com,1999:blog-26787890.post-1170711132106779772007-02-05T23:32:00.000+02:002007-02-05T23:32:12.110+02:00Propertygrid: How to show and edit "aggregated" property<p>Sometimes we need to edit aggregated property - I mean the property that represents object with few properties .The simple way to do this - we can use <i><b>TypeConverter</b></i> with <strong><em>ExpandableObjectConverter as shown </em></strong>in the example</p> <p> </p> <p> </p> <p> <div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:98797aef-8d4e-4649-9041-d0330a7b2264" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">[TypeConverter(</span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; ">(ExpandableObjectConverter))]<br /></span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">class</span><span style="color: #000000; "> FullName<br />{<br /> </span><span style="color: #0000FF; ">private</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> _FirstName;<br /> </span><span style="color: #0000FF; ">private</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> _LastName;<br /><br /><br /> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> FullName(</span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> _FirstName, </span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> _LastName)<br /> {<br /> </span><span style="color: #0000FF; ">this</span><span style="color: #000000; ">._FirstName </span><span style="color: #000000; ">=</span><span style="color: #000000; "> _FirstName;<br /> </span><span style="color: #0000FF; ">this</span><span style="color: #000000; ">._LastName </span><span style="color: #000000; ">=</span><span style="color: #000000; "> _LastName;<br /> }<br /><br /> [DisplayName(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">First Name</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)]<br /> [Description(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">First name of the person</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)]<br /> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> FirstName<br /> {<br /> </span><span style="color: #0000FF; ">get</span><span style="color: #000000; "><br /> {<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> _FirstName;<br /> }<br /> </span><span style="color: #0000FF; ">set</span><span style="color: #000000; "><br /> {<br /> _FirstName </span><span style="color: #000000; ">=</span><span style="color: #000000; "> value;<br /> }<br /> }<br /><br /> [DisplayName(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Last Name</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)]<br /> [Description(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Last name of the person</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)]<br /> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> LastName<br /> {<br /> </span><span style="color: #0000FF; ">get</span><span style="color: #000000; "><br /> {<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> _LastName;<br /> }<br /> </span><span style="color: #0000FF; ">set</span><span style="color: #000000; "><br /> {<br /> _LastName </span><span style="color: #000000; ">=</span><span style="color: #000000; "> value;<br /> }<br /> }<br /><br /><br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "><summary></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; ">Returns a </span><span style="color: #808080; "><see cref="T:System.String"></see></span><span style="color: #008000; "> <br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "> that represents the current </span><span style="color: #808080; "><see cref="T:System.Object"></see></span><span style="color: #008000; ">.<br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "></summary></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "><returns></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; ">A </span><span style="color: #808080; "><see cref="T:System.String"></see></span><span style="color: #008000; "> <br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "> that represents the current </span><span style="color: #808080; "><see cref="T:System.Object"></see></span><span style="color: #008000; ">.<br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "></returns></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "><filterpriority></span><span style="color: #008000; ">2</span><span style="color: #808080; "></filterpriority></span><span style="color: #808080; "><br /></span><span style="color: #000000; "> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> ToString()<br /> {<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> _FirstName </span><span style="color: #000000; ">+</span><span style="color: #000000; "> </span><span style="color: #000000; ">"</span><span style="color: #000000; "> </span><span style="color: #000000; ">"</span><span style="color: #000000; "> </span><span style="color: #000000; ">+</span><span style="color: #000000; "> _LastName;<br /> }<br />}</span></div></pre></div></p><br /><p> </p><br /><p> </p><br /><p><br /><div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:9e91a495-a171-41c1-8629-a218640798fa" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">[DisplayName(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Full Name</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)]<br />[Description(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Full name of the person</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)]<br /></span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> FullName FullName<br />{<br /> </span><span style="color: #0000FF; ">get</span><span style="color: #000000; "><br /> {<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> _FullName;<br /> }<br /> </span><span style="color: #0000FF; ">set</span><span style="color: #000000; "><br /> {<br /> _FullName </span><span style="color: #000000; ">=</span><span style="color: #000000; "> value;<br /> }<br />}</span></div></pre></div></p><br /><p>Result - the editor for aggregated object</p><br /><p><img src="http://devintelligence.com/blog-images/dotnetpulse/PropertyGrid-ExpandableObjectConverter.png"> </p><br /><p><a href="http://rsdn.ru/article/dotnet/PropertyGridFAQ.xml#EMNAG" target="_blank">Source( russian )</a></p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com1tag:blogger.com,1999:blog-26787890.post-1170709654406369252007-02-05T23:07:00.000+02:002007-02-05T23:11:36.306+02:00Propertygrid: How to display combo with icons for enum type?<p>We need to cretate new type inhereted from <i><b>UITypeEditor</b></i> with custom painting( in our case the images located in resource file - where each image name equals to memeber of the enum ) as shown below</p> <p> </p> <p> <div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:743996da-b2d9-487b-bfb1-567e873f89f9" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">class</span><span style="color: #000000; "> CountryEditor : UITypeEditor<br />{<br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "><summary></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; ">Indicates whether the specified context supports <br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "> painting a representation of an object's value within the specified context.<br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "></summary></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "><returns></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; ">true if <br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "> </span><span style="color: #808080; "><see cref="M:System.Drawing.Design.UITypeEditor.PaintValue(System.Object,System.Drawing.Graphics,System.Drawing.Rectangle)"></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "> </span><span style="color: #808080; "></see></span><span style="color: #008000; "> is implemented; otherwise, false.<br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "></returns></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "><param name="context"></span><span style="color: #008000; ">An </span><span style="color: #808080; "><see cref="T:System.ComponentModel.ITypeDescriptorContext"></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "> </span><span style="color: #808080; "></see></span><span style="color: #008000; "> that can be used to gain additional context information. </span><span style="color: #808080; "></param></span><span style="color: #808080; "><br /></span><span style="color: #000000; "> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">bool</span><span style="color: #000000; "> GetPaintValueSupported(ITypeDescriptorContext context)<br /> {<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">true</span><span style="color: #000000; ">;<br /> }<br /><br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "><summary></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; ">Paints a representation of the value of an <br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "> object using the specified </span><span style="color: #808080; "><see cref="T:System.Drawing.Design.PaintValueEventArgs"></see></span><span style="color: #008000; ">.<br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "></summary></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #808080; "><param name="e"></span><span style="color: #008000; ">A </span><span style="color: #808080; "><see cref="T:System.Drawing.Design.PaintValueEventArgs"></span><span style="color: #008000; "><br /> </span><span style="color: #808080; ">///</span><span style="color: #008000; "> </span><span style="color: #808080; "></see></span><span style="color: #008000; "> that indicates what to paint and where to paint it. </span><span style="color: #808080; "></param></span><span style="color: #808080; "><br /></span><span style="color: #000000; "> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">void</span><span style="color: #000000; "> PaintValue(PaintValueEventArgs e)<br /> {<br /> </span><span style="color: #0000FF; ">string</span><span style="color: #000000; "> resourcename </span><span style="color: #000000; ">=</span><span style="color: #000000; "> Enum.GetName(</span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; "> (Country), e.Value);<br /><br /> </span><span style="color: #008000; ">//</span><span style="color: #008000; "> retrive image from resource file</span><span style="color: #008000; "><br /></span><span style="color: #000000; "> Bitmap countryImage </span><span style="color: #000000; ">=</span><span style="color: #000000; "><br /> (Bitmap)Resources.ResourceManager.GetObject(resourcename);<br /> Rectangle destRect </span><span style="color: #000000; ">=</span><span style="color: #000000; "> e.Bounds;<br /> countryImage.MakeTransparent();<br /><br /> </span><span style="color: #008000; ">//</span><span style="color: #008000; "> paint</span><span style="color: #008000; "><br /></span><span style="color: #000000; "> e.Graphics.DrawImage(countryImage, destRect);<br /><br /> }<br />}</span></div></pre></div></p><br /><p></p><br /><p> </p><br /><p>Create new EnumTypeConverter</p><br /><div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:dc3bcd5c-8811-4aaa-bd64-d125bbc71cbd" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">class</span><span style="color: #000000; "> EnumTypeConverter : EnumConverter<br />{<br /> </span><span style="color: #0000FF; ">private</span><span style="color: #000000; "> Type _enumType;<br /> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> EnumTypeConverter(Type type)<br /> : </span><span style="color: #0000FF; ">base</span><span style="color: #000000; ">(type)<br /> {<br /> _enumType </span><span style="color: #000000; ">=</span><span style="color: #000000; "> type;<br /> }<br /><br /> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">bool</span><span style="color: #000000; "> CanConvertTo(ITypeDescriptorContext context,<br /> Type destType)<br /> {<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> destType </span><span style="color: #000000; ">==</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; ">(</span><span style="color: #0000FF; ">string</span><span style="color: #000000; ">);<br /> }<br /><br /> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">object</span><span style="color: #000000; "> ConvertTo(ITypeDescriptorContext context,<br /> CultureInfo culture,<br /> </span><span style="color: #0000FF; ">object</span><span style="color: #000000; "> value, Type destType)<br /> {<br /> FieldInfo fi </span><span style="color: #000000; ">=</span><span style="color: #000000; "> _enumType.GetField(Enum.GetName(_enumType, value));<br /> DescriptionAttribute dna </span><span style="color: #000000; ">=</span><span style="color: #000000; "><br /> (DescriptionAttribute)Attribute.GetCustomAttribute(<br /> fi, </span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; ">(DescriptionAttribute));<br /><br /> </span><span style="color: #0000FF; ">if</span><span style="color: #000000; "> (dna </span><span style="color: #000000; ">!=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">null</span><span style="color: #000000; ">)<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> dna.Description;<br /> </span><span style="color: #0000FF; ">else</span><span style="color: #000000; "><br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> value.ToString();<br /> }<br /><br /> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">bool</span><span style="color: #000000; "> CanConvertFrom(ITypeDescriptorContext context,<br /> Type srcType)<br /> {<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> srcType </span><span style="color: #000000; ">==</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; ">(</span><span style="color: #0000FF; ">string</span><span style="color: #000000; ">);<br /> }<br /><br /> </span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">override</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">object</span><span style="color: #000000; "> ConvertFrom(ITypeDescriptorContext context,<br /> CultureInfo culture,<br /> </span><span style="color: #0000FF; ">object</span><span style="color: #000000; "> value)<br /> {<br /> </span><span style="color: #0000FF; ">foreach</span><span style="color: #000000; "> (FieldInfo fi </span><span style="color: #0000FF; ">in</span><span style="color: #000000; "> _enumType.GetFields())<br /> {<br /> DescriptionAttribute dna </span><span style="color: #000000; ">=</span><span style="color: #000000; "><br /> (DescriptionAttribute)Attribute.GetCustomAttribute(<br /> fi, </span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; ">(DescriptionAttribute));<br /><br /> </span><span style="color: #0000FF; ">if</span><span style="color: #000000; "> ((dna </span><span style="color: #000000; ">!=</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">null</span><span style="color: #000000; ">) </span><span style="color: #000000; ">&&</span><span style="color: #000000; "> ((</span><span style="color: #0000FF; ">string</span><span style="color: #000000; ">)value </span><span style="color: #000000; ">==</span><span style="color: #000000; "> dna.Description))<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> Enum.Parse(_enumType, fi.Name);<br /> }<br /><br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> Enum.Parse(_enumType, (</span><span style="color: #0000FF; ">string</span><span style="color: #000000; ">)value);<br /> }<br /><br /><br />}</span></div></pre></div><br /><p> </p><br /><p> </p><br /><p>Then use attribute Editor </p><br /><p> </p><br /><p></p><br /><div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:36298602-a498-4e6e-a5ea-b3113decbd21" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;white-space:-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #000000; ">[DisplayName(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Country</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)]<br />[Description(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">Country</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)]<br />[TypeConverter(</span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; ">(EnumTypeConverter))]<br />[Editor(</span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; ">(CountryEditor), </span><span style="color: #0000FF; ">typeof</span><span style="color: #000000; ">(UITypeEditor))]<br /></span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> Country Country<br />{<br /> </span><span style="color: #0000FF; ">get</span><span style="color: #000000; "><br /> {<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> _Country;<br /> }<br /> </span><span style="color: #0000FF; ">set</span><span style="color: #000000; "><br /> {<br /> _Country </span><span style="color: #000000; ">=</span><span style="color: #000000; "> value;<br /> }<br />}</span></div></pre></div><br /><p></p><br /><p> </p><br /><p> Now we can see the combo box as editor for our Enum type</p><br /><p> <img src="http://devintelligence.com/blog-images/dotnetpulse/PropertyGridEnum.png"> </p><br /><p><a href="http://rsdn.ru/article/dotnet/PropertyGridFAQ.xml#EMNAG" target="_blank">Source ( russian )</a></p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-1168598248359939802007-01-12T12:37:00.000+02:002007-01-12T12:40:54.943+02:00Open source C# SourceForge implementation<p><b>SharpForge</b> supports collaborative development and management of multiple software projects. Similar to <a href="http://www.vasoftware.com/sourceforge/" target="_blank">SourceForge</a> or <a href="http://www.codeplex.com/" target="_blank">CodePlex</a> but for your own team or organisation. The software is written in C# for .NET 2.0 is integrates with Subversion for source control and is released under the New BSD License.</p> <p> </p> <p><b>Features</b> <ul> <li>Multi Portal <li>Multi Project <li>Subversion Administration <li>Work Item Tracking <li>Project Forums <li>Release Management <li>Subversion Wiki <li>Browse Source Code <li>News Feed Aggregation </li></ul> <p> </p> <p><a href="http://www.projxpert.com/Forums/ShowForum.aspx?ForumID=2519" target="_blank">Download SharpForge</a></p> <p>[Via <a href="http://www.larkware.com/" target="_blank">Larkware News</a>]</p>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com0tag:blogger.com,1999:blog-26787890.post-1168341996060481042007-01-09T13:26:00.000+02:002007-01-09T13:26:36.310+02:00A function to calculate the opposite color of given color<p></p> <div class="wlWriterSmartContent" id="57F11A72-B0E5-49c7-9094-E3A15BD5B5E6:bd90cd88-101d-4b41-8004-1718014313c6" contenteditable="false" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"><pre style="background-color:White;"><div><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #808080; ">///</span><span style="color: #008000; "> </span><span style="color: #808080; "><summary></span><span style="color: #008000; "><br /></span><span style="color: #808080; ">///</span><span style="color: #008000; "> Calculates the opposite color<br /></span><span style="color: #808080; ">///</span><span style="color: #008000; "> </span><span style="color: #808080; "></summary></span><span style="color: #008000; "><br /></span><span style="color: #808080; ">///</span><span style="color: #008000; "> </span><span style="color: #808080; "><param name="clr"></span><span style="color: #008000; ">Given color</span><span style="color: #808080; "></param></span><span style="color: #008000; "><br /></span><span style="color: #808080; ">///</span><span style="color: #008000; "> </span><span style="color: #808080; "><returns></returns></span><span style="color: #808080; "><br /></span><span style="color: #0000FF; ">public</span><span style="color: #000000; "> </span><span style="color: #0000FF; ">static</span><span style="color: #000000; "> Color CalculateOppositeColor(Color clr)<br />{<br /> </span><span style="color: #0000FF; ">return</span><span style="color: #000000; "> Color.FromArgb(</span><span style="color: #000000; ">255</span><span style="color: #000000; "> </span><span style="color: #000000; ">-</span><span style="color: #000000; "> clr.R, </span><span style="color: #000000; ">255</span><span style="color: #000000; "> </span><span style="color: #000000; ">-</span><span style="color: #000000; "> clr.G, </span><span style="color: #000000; ">255</span><span style="color: #000000; "> </span><span style="color: #000000; ">-</span><span style="color: #000000; "> clr.B);<br />}</span></div></pre></div>Tarashttp://www.blogger.com/profile/08190352805764968698noreply@blogger.com3