<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Thinq Development</title>
  <link rel="alternate" type="text/html" href="http://www.thinqdev.com/" />
  <link rel="self" href="http://www.thinqdev.com/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2009-04-15T20:46:47.7096933+01:00</updated>
  <author>
    <name>Kristian Sølve Ravndal</name>
  </author>
  <subtitle>a blog about Development and Tech stuff by Kristian S. Ravndal</subtitle>
  <id>http://www.thinqdev.com/</id>
  <generator uri="http://dasblog.info/" version="2.2.8279.16125">DasBlog</generator>
  <entry>
    <title>Steve Ballmer @ MSDN Live 30.09.2008</title>
    <link rel="alternate" type="text/html" href="http://www.thinqdev.com/2009/08/20/SteveBallmerMSDNLive30092008.aspx" />
    <id>http://www.thinqdev.com/PermaLink,guid,5eb8a8d1-8be6-40e7-b2c2-17593e125fb1.aspx</id>
    <published>2009-08-20T15:23:37.405+01:00</published>
    <updated>2008-10-28T15:47:57.1297257+00:00</updated>
    <category term="Information" label="Information" scheme="http://www.thinqdev.com/CategoryView,category,Information.aspx" />
    <category term="MSDN Live" label="MSDN Live" scheme="http://www.thinqdev.com/CategoryView,category,MSDNLive.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
MSDN Live will end as useal in Oslo, the 30 sep ... and holding the Keynote: Steve
Ballmer :) 
</p>
        <p>
Im really looking forward to this, and hope to see you all there. 
</p>
        <img width="0" height="0" src="http://www.thinqdev.com/aggbug.ashx?id=5eb8a8d1-8be6-40e7-b2c2-17593e125fb1" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Finally C# gets optional/default parameters!</title>
    <link rel="alternate" type="text/html" href="http://www.thinqdev.com/2009/04/15/FinallyCGetsOptionaldefaultParameters.aspx" />
    <id>http://www.thinqdev.com/PermaLink,guid,03c97aab-dbb9-47a6-981f-8053e090aef3.aspx</id>
    <published>2009-04-15T20:34:51.441+01:00</published>
    <updated>2009-04-15T20:46:47.7096933+01:00</updated>
    <category term="C#" label="C#" scheme="http://www.thinqdev.com/CategoryView,category,C.aspx" />
    <category term="Tips&amp;amp;Tricks" label="Tips&amp;amp;Tricks" scheme="http://www.thinqdev.com/CategoryView,category,TipsTricks.aspx" />
    <category term="Visual Studio" label="Visual Studio" scheme="http://www.thinqdev.com/CategoryView,category,VisualStudio.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <h1>Finally C# gets optional/default parameters!
</h1>
        <p>
One of the things I missed most, when moving from PHP to C#, was the way PHP let you
pass along default parameters for any function. Now it look like C# 4.0 gets the same
feature. Now I often find myself writing lots of overloaded methods, just because
I want it to be easier to use the methods later on in the project 
</p>
        <p>
So this is how it is done today: 
<br /><img alt="Illustation image" src="http://www.thinqdev.com/content/binary/currentway.png" /></p>
        <p>
However, with the new feature in C#4.0, you can now put default values directly into
the method: 
<br /><img alt="Illustation image" src="http://www.thinqdev.com/content/binary/foofoobar.png" /></p>
        <p>
That little line of code, covers all of the methods I wrote with C#3.5. The only thing
to note, is that when you use similar input types for the parameters, it always used
the first default values it finds. In the next example, using “foo(“s string”, false,10)”
will set b = false, since it’s the first of 2 boolean default values. 
<br /><img alt="Illustation image" src="http://www.thinqdev.com/content/binary/thenewway.png" /></p>
        <img width="0" height="0" src="http://www.thinqdev.com/aggbug.ashx?id=03c97aab-dbb9-47a6-981f-8053e090aef3" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Some Visual Studio tweaking tips!</title>
    <link rel="alternate" type="text/html" href="http://www.thinqdev.com/2008/10/25/SomeVisualStudioTweakingTips.aspx" />
    <id>http://www.thinqdev.com/PermaLink,guid,24111571-b3ce-49f0-9bfe-190540f96802.aspx</id>
    <published>2008-10-25T22:53:50.136+01:00</published>
    <updated>2008-10-28T15:26:35.4638492+00:00</updated>
    <category term="Visual Studio" label="Visual Studio" scheme="http://www.thinqdev.com/CategoryView,category,VisualStudio.aspx" />
    <category term="Tips&amp;amp;Tricks" label="Tips&amp;amp;Tricks" scheme="http://www.thinqdev.com/CategoryView,category,TipsTricks.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <h1>Some Visual Studio tweaking tips!
</h1>
        <p>
I spend a lot of time in Visual Studio, and most of the default settings are usually
ok. But I there is always something you can do to improve your experience with the
IDE. This is more of a follow up to the blogpost of Gøran Hansen &lt;a href="http://blog.goeran.no/PermaLink,guid,ab922a6a-702e-4ec8-8437-c643b5e6939c.aspx"&gt;”Pimp
my Visual Studio 2008 and developer tool belt!“&lt;/a&gt; . But this will cover some
basic tweaking for people new to Visual Studio.<br /><br /><em>In this article I’ll cover some basic “tweaks” to Visual Studio:</em></p>
        <ol>
          <li>
            <a href="#_colors">Colors</a>
          </li>
          <li>
            <a href="#_recent">Recent Projects</a>
          </li>
          <li>
            <a href="#_projects">Default Project Location</a>
          </li>
          <li>
            <a href="#_text_editor">Text Editor</a>
          </li>
        </ol>
        <h2 id="_colors">Colors
</h2>
        <p>
When you spend a lot of time looking at the screen, your eyes have to work more when
your screen is filled with a lot of light and contrasts. Therefore it’s a good idea
to make a few changes to your codeview. So the most relaxing view your eyes could
have, is a dark background with a non-contrast colors on your code/comments. There
are several predefined colorsets out there, I just got a new favorite today, the one
from Gørans <a href="http://blog.goeran.no/PermaLink,guid,ab922a6a-702e-4ec8-8437-c643b5e6939c.aspx">blogpost</a>. <a title="Colored theme" href="http://winterdom.com/weblog/2008/03/23/DistantShoresAVisualStudioColorScheme.aspx">(Direct
link to the colortheme)</a></p>
        <h3>Import Settings:
</h3>
        <ol>
          <li>
Download and unzip the file. 
</li>
          <li>
Open Visual Studio, and open “Tools-&gt;Import and Export Settings” 
</li>
          <li>
Select “Import selected environment settings” 
</li>
          <li>
Save or overwrite your current setting. I’d save em, you might want to revert later
on. 
</li>
          <li>
“Browse” and locate your unzipped file. -&gt;” Next” and “Finish” and you are done. 
</li>
        </ol>
        <p>
          <img alt="Illustation image" src="http://www.thinqdev.com/content/binary/import_settings.jpg" />
        </p>
        <h3>Manual color change:
</h3>
        <p>
If you want to change your colors yourself, open Visual Studio and open “Tools-&gt;Options”,
then navigate to “Environment-&gt;Font and Colors”
</p>
        <h2 id="_recent">Recent Projects
</h2>
        <p>
if(you == me) then you’ll probably have a lot of small projects, which you created
just to test out some new things, a library or just showing “how it works” to a colleague.
In that case you end of with a bunch of “unimportant” projects in your recent projects
list. I think it’s annoying, so here is the fix:
</p>
        <h3>Remove items
</h3>
        <ol>
          <li>
Run -&gt; Regedit.exe 
</li>
          <li>
Navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\ProjectMRUList 
<ul><li>
8.0 = VS 2005 
</li><li>
9.0 = VS 2008 
</li></ul></li>
          <li>
Delete the list of items you don’t need, and you are done 
</li>
        </ol>
        <p>
          <img alt="Illustation image" src="http://www.thinqdev.com/content/binary/delete_regedit.jpg" />
        </p>
        <h3>Show more items
</h3>
        <p>
Even though I just show you how to remove all the unnecessary projects from the list,
I still like to see more than just a few projects. 
<br />
In Visual Studio: Open “Tools -&gt; Options”, navigate to “Environment -&gt; General”.
Here you can control how many projects that will show up on your startpage. On My
screen, 20 projects fits well. 
<br /><img alt="Illustation image" src="http://www.thinqdev.com/content/binary/morerecentfiles.jpg" /><br /></p>
        <h2 id="_projects">Default Project storage location
</h2>
        <p>
Default location for your projects is “My Documents\Visual Studio 2008\Projects”.
To change this open Visual Studio, go to “Tools-&gt;Options”, navigate down to “Projects
and Solutions”. Here you can browse to your favorite project/code location and make
it default. I prefer to have it outside of the “My Documents” folder, since sometimes
the code/folder hierarchy gets a bit long. And if you use roaming user profile (like
at school or work), you might get some problems. I have all my code on a different
disk with automatic backup. <img alt="Illustation image" src="http://www.thinqdev.com/content/binary/defualt_location.jpg" /></p>
        <h2 id="_text_editor">Text Editor
</h2>
        <p>
The text editor has a few useful settings you can do. Yet again, in Visual Studio,
open “Tools-&gt;Options”, navigate to “Text Editor”. The options are mostly self explaining.
The only thing you should notice that you have an option “All Languages”, which basically
alters all the editors, regardless of what programming language you use. I always
enable line numbering here. 
<br /></p>
        <img width="0" height="0" src="http://www.thinqdev.com/aggbug.ashx?id=24111571-b3ce-49f0-9bfe-190540f96802" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Debugging: Show console in WinForms/WPF Apps</title>
    <link rel="alternate" type="text/html" href="http://www.thinqdev.com/2008/07/21/DebuggingShowConsoleInWinFormsWPFApps.aspx" />
    <id>http://www.thinqdev.com/PermaLink,guid,1a6aa413-05a1-4913-926c-15722a52b04a.aspx</id>
    <published>2008-07-22T00:49:06.075+01:00</published>
    <updated>2008-11-01T00:49:37.4994199+00:00</updated>
    <category term="Tips&amp;amp;Tricks" label="Tips&amp;amp;Tricks" scheme="http://www.thinqdev.com/CategoryView,category,TipsTricks.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
Often it is very useful to have a <b style="COLOR: black; BACKGROUND-COLOR: #a0ffff">console</b> besides
the winform/wpf application. And its really easy to :)<br />
Create an available class: 
<br /><font color="#0000ff"><font color="#0000ff"></font></font><font color="#0000ff"><font color="#0000ff" size="2"></font></font></p>
        <p>
using System;<br /><font color="#0000ff"><font color="#0000ff">using</font></font> System.Runtime.InteropServices; 
</p>
        <p>
          <font size="2">
            <font color="#0000ff">
              <font color="#0000ff">public</font>
            </font>
            <font color="#0000ff">
              <font color="#0000ff">static</font>
            </font>
            <font color="#0000ff">
              <font color="#0000ff">class</font>
            </font>
          </font>
          <font size="2">
            <font color="#2b91af">
              <font color="#2b91af">ConsoleEx<br /></font>
            </font>{ </font>
        </p>
        <blockquote>
          <font size="2">
            <font color="#808080">
              <font color="#808080">///</font>
            </font>
            <font color="#008000">
              <font color="#008000">
              </font>
            </font>
          </font>
          <font size="2">
            <font color="#808080">
              <font color="#808080">&lt;summary&gt;<br /></font>
            </font>
            <font color="#808080">
              <font color="#808080">///</font>
            </font>
          </font>
          <font size="2">
            <font color="#008000">
              <font color="#008000"> Shows
the <b style="COLOR: black; BACKGROUND-COLOR: #a0ffff">Console</b><br /></font>
            </font>
            <font color="#808080">
              <font color="#808080">///</font>
            </font>
            <font color="#008000">
              <font color="#008000">
              </font>
            </font>
          </font>
          <font size="2">
            <font color="#808080">
              <font color="#808080">&lt;/summary&gt;<br /></font>
            </font>[<font color="#2b91af"><font color="#2b91af">DllImport</font></font>(<font color="#a31515"><font color="#a31515">"kernel32.dll"</font></font>)]<br /><font color="#0000ff"><font color="#0000ff">public</font></font><font color="#0000ff"><font color="#0000ff">static</font></font><font color="#0000ff"><font color="#0000ff">extern</font></font><font color="#2b91af"><font color="#2b91af">Boolean</font></font> AllocConsole(); </font>
          <p>
            <font size="2">
              <font color="#808080">
                <font color="#808080">///</font>
              </font>
              <font color="#008000">
                <font color="#008000">
                </font>
              </font>
            </font>
            <font size="2">
              <font color="#808080">
                <font color="#808080">&lt;summary&gt;<br /></font>
              </font>
              <font color="#808080">
                <font color="#808080">///</font>
              </font>
            </font>
            <font size="2">
              <font color="#008000">
                <font color="#008000"> Hides
the <b style="COLOR: black; BACKGROUND-COLOR: #a0ffff">Console</b><br /></font>
              </font>
              <font color="#808080">
                <font color="#808080">///</font>
              </font>
              <font color="#008000">
                <font color="#008000">
                </font>
              </font>
            </font>
            <font size="2">
              <font color="#808080">
                <font color="#808080">&lt;/summary&gt;<br /></font>
              </font>[<font color="#2b91af"><font color="#2b91af">DllImport</font></font>(<font color="#a31515"><font color="#a31515">"kernel32.dll"</font></font>)]<br /><font color="#0000ff"><font color="#0000ff">public</font></font><font color="#0000ff"><font color="#0000ff">static</font></font><font color="#0000ff"><font color="#0000ff">extern</font></font><font color="#2b91af"><font color="#2b91af">Boolean</font></font> FreeConsole(); </font>
          </p>
        </blockquote>
        <p>
          <font size="2">} </font>
        </p>
        <p>
          <br />
          <font size="2">I then use it like this in my Code (WPF App):<br /><font color="#0000ff"><font color="#0000ff">public</font></font><font color="#0000ff"><font color="#0000ff">partial</font></font><font color="#0000ff"><font color="#0000ff">class</font></font><font color="#2b91af"><font color="#2b91af">App</font></font> : <font color="#2b91af"><font color="#2b91af">Application</font></font><br />
{ </font>
        </p>
        <blockquote>
          <p>
            <font size="2">
              <font color="#0000ff">
                <font color="#0000ff">public</font>
              </font> App(){ </font>
          </p>
        </blockquote>
        <blockquote>
          <blockquote>
            <p>
              <font size="2">
                <font color="#0000ff">
                  <font color="#0000ff">#if</font>
                </font> DEBUG 
<br /><font color="#2b91af"><font color="#2b91af">ConsoleEx</font></font>.AllocConsole(); 
<br /><font color="#0000ff"><font color="#0000ff">#endif </font></font></font>
            </p>
          </blockquote>
          <p>
            <font color="#0000ff">
              <font color="#0000ff">
                <font size="2">}</font>
              </font>
            </font>
          </p>
        </blockquote>
        <p>
          <font color="#0000ff">
            <font color="#0000ff">
              <font size="2">} </font>
            </font>
          </font>
        </p>
        <p>
          <font size="2">You could use this with a Linq DataContext: </font>
        </p>
        <p>
          <font size="2">MyDataContext.Log = <font color="#2b91af"><font color="#2b91af"><b style="COLOR: black; BACKGROUND-COLOR: #a0ffff">Console</b></font></font>.Out;</font>
        </p>
        <img width="0" height="0" src="http://www.thinqdev.com/aggbug.ashx?id=1a6aa413-05a1-4913-926c-15722a52b04a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>Connect to Remote Desktop on non-standard port</title>
    <link rel="alternate" type="text/html" href="http://www.thinqdev.com/2008/07/17/ConnectToRemoteDesktopOnNonstandardPort.aspx" />
    <id>http://www.thinqdev.com/PermaLink,guid,f1fef8be-d464-4c68-9b61-544a0b111990.aspx</id>
    <published>2008-07-18T00:46:33.771+01:00</published>
    <updated>2008-11-01T00:47:38.2901917+00:00</updated>
    <category term="Tips&amp;amp;Tricks" label="Tips&amp;amp;Tricks" scheme="http://www.thinqdev.com/CategoryView,category,TipsTricks.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <font size="2">
            <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">While
we were down in Paris on Imagine Cup, we encountered a big problem. Our server was
running live in Oslo (Norway), and the internet connection was too slow to actually
load the pages we needed. But it did however; work well in remote desktop as it takes
lower bandwidth than a whole website with all the images. </span>
            <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Imagine
Cup had a firewall blocking just about everything about standard web ports (80,433),
so we had to change the default port for Remote Desktop. </span>
          </font>
          <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">
            <font size="2"> </font>
          </span>
        </p>
        <p>
          <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">
            <font size="2">In
order to change the Remote Desktops default listening port, you actually need to do
a little registry hack. </font>
          </span>
          <code>
          </code>
        </p>
        <p>
          <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">
          </span>
          <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">
            <font size="2">Open
regedit, and navigate to </font>
          </span>
        </p>
        <p>
          <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">
          </span>
          <font size="2">
            <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">
              <em>
                <strong>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber</strong>
              </em>
            </span>
          </font>
        </p>
        <p>
          <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">
          </span>
          <font size="2">
            <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">On
the Edit menu, click Modify, and select Decimal (unless you prefer the hex values)</span>
          </font>
        </p>
        <p>
          <font size="2">
            <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">Now,
restart “<em>Terminal Services</em>”, and it should be up and running on the new port.</span>
          </font>
        </p>
        <p>
          <font size="2">
            <span style="FONT-SIZE: 8.5pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Verdana','sans-serif'">We
switched the port to 443, and everything worked like a charm. A special thanks to
Rune Zakariassen for lending us the 3G connection to fix it all.</span>
          </font>
        </p>
        <img width="0" height="0" src="http://www.thinqdev.com/aggbug.ashx?id=f1fef8be-d464-4c68-9b61-544a0b111990" />
      </div>
    </content>
  </entry>
</feed>