Custom Settings Providers and Portable applications/U3 Drives

by Andrew Jackson 18. October 2007 09:31

Having recently bought a U3 Drive I've got the bug for portable apps.  This unfortunately has jarred with my love of the settings provider provided within .net 2 which insists on storing settings in the Documents and Settings folder structure.

I've done some research into whether it is possible to change this default functionality and as with just about everything in .net there is!

I've taken the time to write this up as a Code Project article available from My Code Project articles.

The article covers creating a general xml settings file that resides in the applications folder, but also includes a class for U3 specific functionality.

I've also produced U3 specific versions of my ThumbGen and MiniCalc applications, available from my U3 Downloads area.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Development | VB.net

SQL Command Visualizer for Visual Studio 2005

by Andrew Jackson 5. October 2007 14:11

I've finally got round to writing a visualizer I've been wanting for years, one that will give a decent representation of a SQL Command object, allowing you to view both the connection details and the list of parameters, their properties and values.

Below is a screenshot of what the visualizer looks like when you press the little magnifier when hovering over a Command object instance.

SQLVisualizer

Available free from my Visual Studio 2005 Tools area as a VSI which will automatically install it.

kick it on DotNetKicks.com

Update:
If your having trouble with the vsi try renaming it to a .zip file, opening the file then copying the SQLVisualizer.dll to your My Documents\Visual Studio 2005\Visualizers folder.

I will research why the vsi's are occasionally giving this error.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Development

New Ternary code snippet for those learning C#

by Andrew Jackson 5. October 2007 11:50

I'm doing my slow migration to C# from VB and getting through a good thick reference book to learn all the language shortcuts that C# seems to be full of.

The experienced C# developers will laugh but I found the Ternary operator syntax not particularly memorable so I created a code snippet to insert a template for me.  Now all I do is type Ternary<tab><tab> and it puts the snippet in with declarations highlighted.

It's quite trivial but I thought I'd offer it up for anyone interested.  I have posted it onto gotCodeSnippets.net 

This is a great little site that needs far more support so I've added all my snippets on there and will continue to do so when I come up with more that are general enough for the world at large.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

C# | Development

Debug Visualizer Template for C# and VB.net

by Andrew Jackson 1. October 2007 13:39

Continuing my migration to C# I have now created a C# variant of my Debug Visualizer that has been around for some time for VB.

The VSI (Visual Studio Installer) package installs new C# and VB projects that appear under the My Templates area when creating a new project.  The projects include all relevant references and a starter method to get you going.  Just follow the comments to get a visualizer working for your chosen type.

Available from the Visual Studio 2005 Tools area as usual.

kick it on DotNetKicks.com

Currently rated 4.0 by 1 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

With Contempt

by Andrew Jackson 1. October 2007 10:05

There's one major gripe I have with the VB language.. the With/End With block.  Although it shortens code lines when setting lots of properties I find it harder to read, error prone when moving code around, and very awkward to debug since you can't just select the property and add a watch.

I never use this syntax in my own code, always preferring to have everything in long form, it doesn't increase typing too much with intellisense and we all have fairly large displays these days so line length is less of an issue as well.

So when using code I find on the net or from colleagues the first thing I do is remove with blocks.  Getting fed up with this time consuming but quite dumb task I've created a Visual Studio macro to do it.

As an example, code with a With statement like the following;

    Public Sub AWithExample()
        With Me
            .Text = "Hello"
            .Tag = "This"

            MessageBox.Show(.Text, "Title " & .Text)

            Dim x As String
            x = .Text
        End With
    End Sub

Becomes;

    Public Sub AWithExample()
        Me.Text = "Hello"
        Me.Tag = "This"

        MessageBox.Show(Me.Text, "Title " & Me.Text)

        Dim x As String
        x = Me.Text
    End Sub

 

The Macro's quite trivial, just create a new macro and add the following code; More...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Development | Productivity | VB.net

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About Me

Andrew Jackson

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2008,2009 Andrew K. Jackson

RecentComments

Comment RSS