Development
Quake style Powershell console
Jan 29th
I decided today that I wanted a quake style powershell console (with the classic win+` to activate or hide), and here is the end result:
I used http://www.instructables.com/id/”Drop-Down”,-Quake-style-command-prompt-for-Window/ as a template to get it all working, but wanted to use Console2 instead of v1.5 like this article uses.
What you need:Download AutoHotKey Download Console2
Instructions:1. Extract the Console2\bin\release folder somewhere. 2. Add the directory to your %path% (http://support.microsoft.com/kb/310519) or create a shortcut to Console.exe and place it in your windows directory. 3. Download console.xml and QuakeMode.ahk and overwrite the original console.xml. Then edit console.xml and set the startup directory.
4. Right click on QuakeMode.ahk and run the script.
Now More >
Generic ClickOnce updates (With VSTO Support)
Jan 21st
I use ClickOnce to publish all my applications I write internally, some of which are VSTO Outlook add-ins. The issue with the inbuilt ClickOnce updates is you have no control over it and it can slow start up time of your app.
So I wanted a generic class that I could put in my common library and use in any of my applications, VSTO or normal. This is what I came up with:
This is the public interface, under the covers most of the functionality is declared as protected virtual so functionality can be changed (which I use to create my VSTODeploy More >
WPF SQL Connection User Control
Sep 29th
Many of the apps I have written need to target multiple databases or I want the connection to be configurable by the user. I have a user control in my common library that I use all the time to let the user connect to a database.
You will need the Sql Management Objects from http://www.microsoft.com/Downloads/details.aspx?familyid=B33D2C78-1059-4CE2-B80D-2343C099BCB4&displaylang=en to compile the demo project.
I also make use of http://umbrella.codeplex.com/ and http://www.codeplex.com/clinq in my common libraries, it should be quite simple to remove the dependencies on these two libraries if you wanted to. The first library adds a heap of really useful extension methods, like AddRange to collections that More >
Binding to WPF ListBox.SelectedItems
Sep 17th
I wanted to do this for one of my projects, the ability to bind a selecteditems collection on my view model to my view.
http://blog.functionalfun.net/2009/02/how-to-databind-to-selecteditems.html
It did the trick for me, simply use the attached property to bind the selected items to an ObservableCollection.
C# Argument Parser
Jul 27th
I know this has been done to death but nothing I found did the job for me so I started with the one that fitted my needs the most then edited from there.
Original source: http://www.codeproject.com/KB/recipes/command_line.aspx
I have a few specific requirements:
- It must support lists, or the same argument specified multiple times. If an argument has comma’s in it then it will be treated as a list and split on the comma.
- It must support paths with a trailing \ ie. –arg:”c:\Users\ginnivanj\My Path\”
- Has support for flags.
There are two ways you can start using this class, I have More >