<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Orcon Services Blog</title>
	<atom:link href="http://blog.orconservices.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.orconservices.co.uk</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 22 Dec 2009 10:22:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Help files &#8211; Navigation Canceled</title>
		<link>http://blog.orconservices.co.uk/help-files-navigation-canceled/</link>
		<comments>http://blog.orconservices.co.uk/help-files-navigation-canceled/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 10:22:20 +0000</pubDate>
		<dc:creator>Owen</dc:creator>
				<category><![CDATA[Titbits I should know]]></category>

		<guid isPermaLink="false">http://blog.orconservices.co.uk/?p=103</guid>
		<description><![CDATA[Background Ever since I upgraded to Vista years ago and possibly before on XP, I&#8217;ve had problems with CHM help files I&#8217;ve downloaded. Normally I get frustrated that I can&#8217;t open yet another help file and find the information elsewhere. Problem Solved Today I downloaded a help file that I really needed to be able [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>Ever since I upgraded to Vista years ago and possibly before on XP, I&#8217;ve had problems with CHM help files I&#8217;ve downloaded. Normally I get frustrated that I can&#8217;t open yet another help file and find the information elsewhere.</p>
<h2>Problem Solved</h2>
<p>Today I downloaded a help file that I really needed to be able to use (<a title="Graph# Codeplex site" href="http://graphsharp.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28088" target="_blank">Graph#</a> to be precise); there isn&#8217;t a lot of information available on the Internet about Graph#, so I had no choice but to crack this problem for myself.</p>
<p>Turns out its a simple solution. Go to the properties of the chm file and if you trust the source simply <strong>Unblock.</strong> So simple it&#8217;s a little embarrassing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/help-files-navigation-canceled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickly searching through a SharePoint List</title>
		<link>http://blog.orconservices.co.uk/quickly-searching-through-a-sharepoint-list/</link>
		<comments>http://blog.orconservices.co.uk/quickly-searching-through-a-sharepoint-list/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 11:56:52 +0000</pubDate>
		<dc:creator>Owen</dc:creator>
				<category><![CDATA[SharePoint Code]]></category>

		<guid isPermaLink="false">http://blog.orconservices.co.uk/quickly-searching-through-a-sharepoint-list/</guid>
		<description><![CDATA[Background The project I’m currently working on involves searching through a lot of data as quickly as possible. There are documents around the Internet that detail the fastest returns for querying a SharePoint list, aside from SQL queries which aren’t supported, the next best way is SPQuery. 1 2 3 4 SPQuery query = new [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>The project I’m currently working on involves searching through a lot of data as quickly as possible.</p>
<p>There are documents around the Internet that detail the fastest returns for querying a SharePoint list, aside from SQL queries which aren’t supported, the next best way is <strong>SPQuery</strong>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: teal; font-weight: bold;">SPQuery</span> query <span style="color: #008000;">=</span> <span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SPQuery</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
query.<span style="color: #000000;">Query</span> <span style="color: #008000;">=</span> BuildQuery<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">SPListItemCollection</span> items <span style="color: #008000;">=</span> list.<span style="color: #000000;">GetItems</span><span style="color: #000000;">&#40;</span>query<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>The BuildQuery() method is a place-holder for another project I&#8217;m working. The intention will be able to create CAML queries on the fly. I&#8217;ve done this for the current project but it&#8217;s not really ready to talk about here.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/quickly-searching-through-a-sharepoint-list/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Programmatically set the Approval Status of a SharePoint ListItem</title>
		<link>http://blog.orconservices.co.uk/programmatically-set-the-approval-status-of-a-sharepoint-listitem/</link>
		<comments>http://blog.orconservices.co.uk/programmatically-set-the-approval-status-of-a-sharepoint-listitem/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 20:34:38 +0000</pubDate>
		<dc:creator>Owen</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Code]]></category>

		<guid isPermaLink="false">http://blog.orconservices.co.uk/?p=92</guid>
		<description><![CDATA[Background I&#8217;m working on a project at the moment where the approval of a list item needs to be by a specific person based on the content of the item. Normally this would be a great opportunity to use some Workflow but for other reasons this was decided against. This particular project is involving a [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>I&#8217;m working on a project at the moment where the approval of a list item needs to be by a specific person based on the content of the item. Normally this would be a great opportunity to use some Workflow but for other reasons this was decided against.</p>
<p>This particular project is involving a lot of web service work due to the Infopath component, to this end it seemed prudent to use the Web Service to perform the approval action.</p>
<h2>Approval Status</h2>
<p>The approval status of List Item is held in the ModerationInformation property of the SPListItem object.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: blue;">using</span> <span style="color: #000000;">&#40;</span><span style="color: teal; font-weight: bold;">SPWeb</span> web <span style="color: #008000;">=</span> listItem.<span style="color: #000000;">Web</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
      <span style="color: blue; font-weight: bold;">bool</span> allowUpdates <span style="color: #008000;">=</span> web.<span style="color: #000000;">AllowUnsafeUpdates</span><span style="color: #008000;">;</span>
      web.<span style="color: #000000;">AllowUnsafeUpdates</span> <span style="color: #008000;">=</span> <span style="color: blue;">true</span><span style="color: #008000;">;</span>
      listItem.<span style="color: #000000;">ModerationInformation</span>.<span style="color: #000000;">Status</span> <span style="color: #008000;">=</span> <span style="color: teal; font-weight: bold;">SPModerationStatusType</span>.<span style="color: #000000;">Approved</span><span style="color: #008000;">;</span>
      listItem.<span style="color: #000000;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
      web.<span style="color: #000000;">AllowUnsafeUpdates</span> <span style="color: #008000;">=</span> allowUpdates<span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>So updating the Approval is actually very easy. The options for SPModerationStatusType can be found on the following <a title="SPModerationStatusType page" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spmoderationstatustype.aspx" target="_blank">MSDN page for SPModerationStatusType</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/programmatically-set-the-approval-status-of-a-sharepoint-listitem/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Web Parts and Workflows</title>
		<link>http://blog.orconservices.co.uk/web-parts-and-workflows/</link>
		<comments>http://blog.orconservices.co.uk/web-parts-and-workflows/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 17:13:12 +0000</pubDate>
		<dc:creator>Owen</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Custom Web Parts]]></category>

		<guid isPermaLink="false">http://blog.orconservices.co.uk/?p=73</guid>
		<description><![CDATA[In the coming weeks we will be releasing our new site, Web Parts and Workflow. As an extension of the services provided by Orcon Services Limited, this new site will make high quality off the shelf web parts available for purchase.]]></description>
			<content:encoded><![CDATA[<p>In the coming weeks we will be releasing our new site, Web Parts and Workflow. As an extension of the services provided by Orcon Services Limited, this new site will make high quality off the shelf web parts available for purchase.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/web-parts-and-workflows/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 Beta (and a bit about VHD boot)</title>
		<link>http://blog.orconservices.co.uk/sharepoint-2010-beta-and-a-bit-about-vhd-boot/</link>
		<comments>http://blog.orconservices.co.uk/sharepoint-2010-beta-and-a-bit-about-vhd-boot/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 08:42:47 +0000</pubDate>
		<dc:creator>Owen Rumney</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://www.orconservices.com/blog/?p=68</guid>
		<description><![CDATA[Last week SharePoint 2010 Beta was released to the public, you can register for a copy here. As a developer I am keen to get involved with learning the new features that available as quickly as possible. I&#8217;m very pleased to see that Microsoft have allowed this version to be installed on Windows 7 or Vista [...]]]></description>
			<content:encoded><![CDATA[<p>Last week SharePoint 2010 Beta was released to the public, you can <a title="Register for a copy of SharePoint 2010 Beta" href="http://sharepoint2010.microsoft.com/try-it/Pages/Trial.aspx" target="_blank">register for a copy here</a>.</p>
<p>As a developer I am keen to get involved with learning the new features that available as quickly as possible. I&#8217;m very pleased to see that Microsoft have allowed this version to be installed on Windows 7 or Vista (both need to be x64).</p>
<p>Another great feature to have come out of Microsoft with Windows 7 is the ability to boot from a Virtual Hard Disk. I&#8217;ve set up a Windows 7  (x64) environment on a virtual disk and installed this new beta to fully review it.</p>
<p>Here are the summary steps to installing Windows 7 on a VHD;</p>
<ul>
<li>1. Boot from the Windows 7 DVD</li>
<li>2. When setup has started, press Shift and F10 to access the command line</li>
<li>3. You now need to run DiskPart to create a virtual hard disk</li>
</ul>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="dos" style="font-family:monospace;">diskpart
create vdisk file=e:\windows7dev.vhd maximum=<span style="color: #cc66cc;">50000</span> type=expandable
select vdisk file=e:\windows7dev.vhd
attach vdiskexit</pre></td></tr></table></div>

<ul>
<li>4. You can now exit the command line and continue with the installation</li>
<li>5. When asked which drive to install to, select the newly created disk</li>
<li>6. You will see a warning telling you you can&#8217;t install on this disk &#8211; ignore that</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/sharepoint-2010-beta-and-a-bit-about-vhd-boot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft File Transfer Manager: Trying to Connect</title>
		<link>http://blog.orconservices.co.uk/microsoft-file-transfer-manager-trying-to-connect/</link>
		<comments>http://blog.orconservices.co.uk/microsoft-file-transfer-manager-trying-to-connect/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 09:19:43 +0000</pubDate>
		<dc:creator>Owen Rumney</dc:creator>
				<category><![CDATA[MSDN]]></category>

		<guid isPermaLink="false">http://www.orconservices.com/blog/?p=64</guid>
		<description><![CDATA[Background I currently have an MSDN subscription and found a need to download some software for a project. Every time I started FTM, the download would say &#8220;Interrupted&#8221; and the status &#8220;Trying to Connect&#8221;. Searching the Internet provided lots of disgruntled posts about FTM, but none that helped. Solution This is probably an issue local [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>I currently have an MSDN subscription and found a need to download some software for a project. Every time I started FTM, the download would say &#8220;Interrupted&#8221; and the status &#8220;Trying to Connect&#8221;.</p>
<p>Searching the Internet provided lots of disgruntled posts about FTM, but none that helped.</p>
<h2>Solution</h2>
<p>This is probably an issue local to my pc/network; but if it helps anyone else, it&#8217;s a bonus.</p>
<p>To get it working, I needed to restrict the protocols available for transfer to HTTP. With HTTPS selected, it didn&#8217;t work. This may be my over zealous firewall configuration or it may be an issue, but it&#8217;s fixed for me now.</p>
<p><img class="alignnone size-full wp-image-81" title="ftm" src="http://blog.orconservices.co.uk/wp-content/uploads/2009/12/ftm.png" alt="ftm" width="363" height="448" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/microsoft-file-transfer-manager-trying-to-connect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 is coming to town</title>
		<link>http://blog.orconservices.co.uk/sharepoint-2010-is-coming-to-town/</link>
		<comments>http://blog.orconservices.co.uk/sharepoint-2010-is-coming-to-town/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 20:48:12 +0000</pubDate>
		<dc:creator>Owen Rumney</dc:creator>
				<category><![CDATA[MSDN]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://www.orconservices.com/blog/?p=60</guid>
		<description><![CDATA[SharePoint 2010 Developer Center Over the coming months I imagine there will be many posts about SharePoint 2010. Only this week there was a conference in Las Vegas for developers to get their hands dirty with it. From a developers point of view, if you didn&#8217;t make it (like me) then the Micorosoft SharePoint 2010 [...]]]></description>
			<content:encoded><![CDATA[<h2>SharePoint 2010 Developer Center</h2>
<p>Over the coming months I imagine there will be many posts about SharePoint 2010. Only this week there was a conference in Las Vegas for developers to get their hands dirty with it.</p>
<p>From a developers point of view, if you didn&#8217;t make it (like me) then the Micorosoft SharePoint 2010 Developer Center is worth a look.</p>
<p>There is a <a title="Great Introductory video to SharePoint 2010 for developers" href="http://msdn.microsoft.com/en-us/sharepoint/ee514561.aspx" target="_blank">great introductory video here</a>.  I&#8217;ve always been a fan of MSDN, yes occasionally there are ommisions, but for the most part it is a tremendous resource.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/sharepoint-2010-is-coming-to-town/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Outlook 2007 Add-ins</title>
		<link>http://blog.orconservices.co.uk/outlook-2007-add-ins/</link>
		<comments>http://blog.orconservices.co.uk/outlook-2007-add-ins/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 18:15:58 +0000</pubDate>
		<dc:creator>Owen</dc:creator>
				<category><![CDATA[Outlook]]></category>
		<category><![CDATA[Titbits I should know]]></category>

		<guid isPermaLink="false">http://www.orconservices.com/blog/?p=55</guid>
		<description><![CDATA[Where the heck are they? I&#8217;ve been doing a lot of on an Outlook Add-in (to be blogged later) which will use the Graphing previously mentioned. The problem is, when you build and run the Add-in, it&#8217;s put into Outlook in such a way that it&#8217;s there long after you&#8217;ve finished debugging. In other Office 2007 products [...]]]></description>
			<content:encoded><![CDATA[<h2>Where the heck are they?</h2>
<p>I&#8217;ve been doing a lot of on an Outlook Add-in (to be blogged later) which will use the Graphing previously mentioned. The problem is, when you build and run the Add-in, it&#8217;s put into Outlook in such a way that it&#8217;s there long after you&#8217;ve finished debugging.</p>
<p>In other Office 2007 products I&#8217;ve found it easy to track them down, but Outlook wasn&#8217;t so easy&#8230;..</p>
<p>Even if it helps one person, here&#8217;s the process to remove your work in progress add-ins</p>
<ol>
<li><strong>Tools</strong> &#8211; <strong>Trust Center&#8230;</strong></li>
<li>On the left hand navigation bar select <strong>Add-ins</strong></li>
<li>At the bottom of the right hand pane, select <strong>COM Add-ins</strong> from the drop down box, then press <strong>Go</strong></li>
<li>Find the Add-in that you want to remove and select it</li>
<li>Press the <strong>Remove </strong>button</li>
<li>Press <strong>OK</strong></li>
</ol>
<p>Job done.</p>
<p>It&#8217;s entirely possible that everyone else knew where it was except me&#8230;. and now I do to! <img src='http://blog.orconservices.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/outlook-2007-add-ins/feed/</wfw:commentRss>
		<slash:comments>750</slash:comments>
		</item>
		<item>
		<title>.NET Graphs</title>
		<link>http://blog.orconservices.co.uk/net-graphs/</link>
		<comments>http://blog.orconservices.co.uk/net-graphs/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 08:33:12 +0000</pubDate>
		<dc:creator>Owen Rumney</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C# Code]]></category>
		<category><![CDATA[GLEE]]></category>
		<category><![CDATA[Graphing]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Microsoft GLEE]]></category>

		<guid isPermaLink="false">http://www.orconservices.com/blog/?p=39</guid>
		<description><![CDATA[Background This is not going to be a comprehensive blog post to start with, however I think it will become a subject that sits as a regular fixture on this blog. I&#8217;ve recently been looking at how to graph data, something I became interested some years ago when I saw a SVG diagram of a [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>This is not going to be a comprehensive blog post to start with, however I think it will become a subject that sits as a regular fixture on this blog. I&#8217;ve recently been looking at how to graph data, something I became interested some years ago when I saw a SVG diagram of a network map.</p>
<p>There are several projects I am working on that require some kind of network digram to be displayed specific to the problem domain I&#8217;m working in.</p>
<h2>QuickGraph</h2>
<p>Codeplex has a project that can be used to create the data graphs that will be used to generate the visualisation. Rather that talk about the usage too much here, I&#8217;d strongly recommend that you use the excellent documentation available from this site;</p>
<p style="padding-left: 30px;"><a title="http://www.codeplex.com/quickgraph/" href="http://www.codeplex.com/quickgraph/" target="_blank">http://www.codeplex.com/quickgraph/</a></p>
<p>My example was created using peoples names and the links they represented within a family.</p>
<p>Essentially, it&#8217;s simply a case of adding the people as vertices and their connections as edges. This will represent the data graph.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: green; font-style: italic;">// Create the graph</span>
<span style="color: blue; font-weight: bold;">var</span> <span style="color: teal; font-weight: bold;">graph</span> <span style="color: #008000;">=</span> <span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">AdjacencyGraph</span>&lt;<span style="color: blue; font-weight: bold;">string</span>, <span style="color: teal; font-weight: bold;">SEdge</span>&lt;<span style="color: blue; font-weight: bold;">string</span><span style="color: #008000;">&gt;&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: green; font-style: italic;">// Add Vertices - These are the people</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddVertex</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Owen&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddVertex</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Dan&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddVertex</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Stephanie&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddVertex</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;George&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddVertex</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Alex&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddVertex</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Megan&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: green; font-style: italic;">// Add the Edges - These are the links between the people</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Owen&quot;</span>, <span style="color: red;">&quot;Dan&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Owen&quot;</span>, <span style="color: red;">&quot;Alex&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Owen&quot;</span>, <span style="color: red;">&quot;Megan&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Megan&quot;</span>, <span style="color: red;">&quot;Dan&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Alex&quot;</span>, <span style="color: red;">&quot;Dan&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Owen&quot;</span>, <span style="color: red;">&quot;Stephanie&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Owen&quot;</span>, <span style="color: red;">&quot;George&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Stephanie&quot;</span>, <span style="color: red;">&quot;George&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: teal; font-weight: bold;">graph</span>.<span style="color: #000000;">AddEdge</span><span style="color: #000000;">&#40;</span><span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SEdge</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;Alex&quot;</span>, <span style="color: red;">&quot;Megan&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<h2>Microsoft GLEE</h2>
<p>GLEE is a research project from Microsoft that has since become a commercial product call Microsoft Automatic Graph Layout (MSAGL). GLEE is still available for download, however this may change.</p>
<p style="padding-left: 30px;"><a title="Microsoft GLEE" href="http://research.microsoft.com/en-us/downloads/f1303e46-965f-401a-87c3-34e1331d32c5/default.aspx" target="_blank">Download Microsoft GLEE</a></p>
<p>A GleeGraph Populator is required to fill the GLEE Graph with the vertices from my QuickGraph data graph.</p>
<p><em>At this point, I should say that it may be the case for this example that I don&#8217;t need to use QuickGraph, I&#8217;ll update as I learn more on this subject.</em></p>
<p>Once a the graph populator has been computed, the graph visualisation can be displayed in the GLEE control using the ShowDialog method of GleeGraphExtensions.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: green; font-style: italic;">// Create the GleeGraph Populator</span>
<span style="color: blue; font-weight: bold;">var</span> gleeGraphPopulator <span style="color: #008000;">=</span> <span style="color: teal; font-weight: bold;">GleeGraphExtensions</span>.<span style="color: #000000;">CreateGleePopulator</span>&lt;<span style="color: blue; font-weight: bold;">string</span>, <span style="color: teal; font-weight: bold;">SEdge</span>&lt;<span style="color: blue; font-weight: bold;">string</span><span style="color: #008000;">&gt;&gt;</span><span style="color: #000000;">&#40;</span><span style="color: teal; font-weight: bold;">graph</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
gleeGraphPopulator.<span style="color: #000000;">Compute</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: green; font-style: italic;">// Create the actual Graph from the poulater</span>
<span style="color: teal; font-weight: bold;">Graph</span> renderGraph <span style="color: #008000;">=</span> gleeGraphPopulator.<span style="color: #000000;">GleeGraph</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: green; font-style: italic;">// First attempt to Display graph</span>
<span style="color: teal; font-weight: bold;">GleeGraphExtensions</span>.<span style="color: #000000;">ShowDialog</span><span style="color: #000000;">&#40;</span>renderGraph<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>The end result is shown below, the representation of the vertices and edges can be modified, I&#8217;ll be learning about this along the way and will do further posts.</p>
<div id="attachment_48" class="wp-caption alignnone" style="width: 412px"><img class="size-full wp-image-48" title="Graphing Family" src="http://blog.orconservices.co.uk/wp-content/uploads/2009/12/blogimage1.Png" alt="Output from Microsoft GLEE" width="402" height="353" /><p class="wp-caption-text">Output from Microsoft GLEE</p></div>
<p>As can be seen from this image, you can zoom and drag the graph around. It can also be printed or saved to an image.</p>
<p>Watch this space&#8230;.</p>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">
<p>&lt;pre</p>
<p>dlang=&#8221;csharp&#8221;&gt;</p></div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">// Create the graph</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">var graph = new AdjacencyGraph&lt;string, SEdge&lt;string&gt;&gt;();</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">// Add Vertices &#8211; These are the people</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddVertex(&#8220;Owen&#8221;);</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddVertex(&#8220;Dan&#8221;);</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddVertex(&#8220;Stephanie&#8221;);</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddVertex(&#8220;George&#8221;);</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddVertex(&#8220;Alex&#8221;);</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddVertex(&#8220;Megan&#8221;);</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">// Add the Edges &#8211; These are the links between the people</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Owen&#8221;, &#8220;Dan&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Owen&#8221;, &#8220;Alex&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Owen&#8221;, &#8220;Megan&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Megan&#8221;, &#8220;Dan&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Alex&#8221;, &#8220;Dan&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Owen&#8221;, &#8220;Stephanie&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Owen&#8221;, &#8220;George&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Stephanie&#8221;, &#8220;George&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">graph.AddEdge(new SEdge&lt;string&gt;(&#8220;Alex&#8221;, &#8220;Megan&#8221;));</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">// Create the GleeGraph Populator</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">var gleeGraphPopulator = GleeGraphExtensions.CreateGleePopulator&lt;string, SEdge&lt;string&gt;&gt;(graph);</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">gleeGraphPopulator.Compute();</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">// Create the actual Graph from the poulater</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">Graph renderGraph = gleeGraphPopulator.GleeGraph;</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">// First attempt to Display graph</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">GleeGraphExtensions.ShowDialog(renderGraph);</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 831px; left: -10000px;">&lt;/pre&gt;</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/net-graphs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SharePoint Site Library Size</title>
		<link>http://blog.orconservices.co.uk/sharepoint-site-library-size/</link>
		<comments>http://blog.orconservices.co.uk/sharepoint-site-library-size/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 21:36:15 +0000</pubDate>
		<dc:creator>Owen</dc:creator>
				<category><![CDATA[SharePoint Code]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.orconservices.com/blog/?p=7</guid>
		<description><![CDATA[Background I was recently asked to supply a breakdown of the Document Library sizes within a SharePoint Site Collection (SPSite). I had a look through the SharePoint API and couldn&#8217;t find any obvious information on the SPDocumentLibrary or SPList objects. The first solution I came up with was to use some recursion to enumerate through each SPWeb [...]]]></description>
			<content:encoded><![CDATA[<h2>Background</h2>
<p>I was recently asked to supply a breakdown of the Document Library sizes within a SharePoint Site Collection (SPSite). I had a look through the <a title="SharePoint API" href="http://msdn.microsoft.com/en-us/library/bb931737.aspx" target="_blank">SharePoint API</a> and couldn&#8217;t find any obvious information on the SPDocumentLibrary or SPList objects.</p>
<p>The first solution I came up with was to use some recursion to enumerate through each SPWeb in the Site Collection and then enumerate through each Document Library in the web, adding the file sizes in each library as I went. This approach worked but took a huge amount of time.</p>
<p>At previous clients, it would have been acceptable to dive into the Content Database for the site collection and write a query to do the work, <span style="text-decoration: line-through;">un</span>fortunately at the current site there are decent policies and rules in place to stop this from being done.</p>
<h2>SPSite.StorageManagementInformation</h2>
<p>By chance, I found a method on the SPSite object called StorageManagementInformation</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: blue;">using</span> <span style="color: #000000;">&#40;</span><span style="color: teal; font-weight: bold;">SPSite</span> site <span style="color: #008000;">=</span> <span style="color: blue;">new</span> <span style="color: teal; font-weight: bold;">SPSite</span><span style="color: #000000;">&#40;</span>url<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
       <span style="color: teal; font-weight: bold;">DataTable</span> storageInfo<span style="color: #008000;">;</span>
       storageInfo <span style="color: #008000;">=</span> site.<span style="color: #000000;">StorageManagementInformation</span><span style="color: #000000;">&#40;</span>
       <span style="color: teal; font-weight: bold;">SPSite</span>.<span style="color: #000000;">StorageManagementInformationType</span>.<span style="color: #000000;">DocumentLibrary</span>,
       <span style="color: teal; font-weight: bold;">SPSite</span>.<span style="color: #000000;">StorageManagementSortOrder</span>.<span style="color: #000000;">Decreasing</span>,
       <span style="color: teal; font-weight: bold;">SPSite</span>.<span style="color: #000000;">StorageManagementSortedOn</span>.<span style="color: #000000;">Size</span>, <span style="color: #000000;">2000</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p lang="csharp">From here the data table can be queried as normal to output the information about each Document Library;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: blue;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: teal; font-weight: bold;">DataRow</span> row <span style="color: blue;">in</span> storageInfo.<span style="color: #000000;">Rows</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
      <span style="color: blue; font-weight: bold;">double</span> size <span style="color: #008000;">=</span> Convert.<span style="color: #000000;">ToDouble</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>row<span style="color: #000000;">&#91;</span><span style="color: red;">&quot;Size&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">/</span> <span style="color: #000000;">1024</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">/</span> <span style="color: #000000;">1024</span><span style="color: #008000;">;</span>
      <span style="color: teal; font-weight: bold;">Console</span>.<span style="color: #000000;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: blue; font-weight: bold;">string</span>.<span style="color: #000000;">Format</span><span style="color: #000000;">&#40;</span><span style="color: red;">&quot;{0}/{1}<span style="color: #008080; font-weight: bold;">\t</span>{2}<span style="color: #008080; font-weight: bold;">\t</span>{3}&quot;</span>,
                                       site.<span style="color: #000000;">Url</span>,
                                       row<span style="color: #000000;">&#91;</span><span style="color: red;">&quot;WebUrl&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,
                                       row<span style="color: #000000;">&#91;</span><span style="color: red;">&quot;Title&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #000000;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,
                                       size<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<h2>More Information</h2>
<p>There are several options for <a title="StorageManagementInformationType" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.storagemanagementinformationtype.aspx" target="_blank">StorageManagementInformationType</a> enum. Its worth noting that the row columns will be slightly different for each of them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.orconservices.co.uk/sharepoint-site-library-size/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>
