Thursday, September 21, 2006

Tips: Prompt VS.Net Command Prompt in one click.

As we always using command prompt.. and we are usually too lazy to type cd ~ to your desire path.

Well, here is a quick way to do it.

You need to modify registry

here is the registry key

Type regedit then go to the following path

[HKEY_CLASSES_ROOT\Directory\shell\Visual Studio .NET 2003 Command Prompt]

 

[HKEY_CLASSES_ROOT\Directory\shell\Visual Studio .NET 2003 Command Prompt\command]

"cmd.exe %1 /K \"C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Common7\\Tools\\vsvars32.bat\""

 

note: %1 will be your highlighted directory.

you can add whatever you want may be you can just call is VS.Net Cmd other than .. the full name..

 

Cheers,

Gary

Handy Binder Formatter and Parser

This is a very old tricks. However it spend me a little time to get it back to my memory.

What is it for?

When we doing custom binding with a textbox or any string fields we always like to change the format to our desire pattern for example a money value in the database is 19 but we want to display it as $19.00 in our User friendly UI

We can add this binding tricks.

Implementation:

Databind()

{

      Binding dobinding = new Binding("Text", MyObject, "");

      dobinding += new ConvertEventHandler(doBinding_Format);

      dobinding += new ConvertEventHandler(doBinding_Parse);

      textBoxABC.DataBindings.Add(dobinding);

}

and then you just need to handle the event object and change it to return the output format.

you don't always need to do both Format and Parse, if you doing one way binding just for display.

 

Cheers,

Gary.


Reshaper UnitTest PlugIn Problem.


I tried 2 days to debug this problem.

I was trying to use the reshaper unittest plugin. It was running very good. I can just create a test function right click and Run Unit Test. Acutally it just like functionality that Test Driven.Net provided. Anyway, if everything in one Can why can't we just install one addin instead of two.

oh right.. my problem is that:

I added a test function.

then I modify the dll (the read code that I want to test) and build it.

while I am doing the debug. It always looking at the old version assembly. My latest code can never be apply to it.

To Fix this:

I found out that there is a temp dll sitting in my Application Data\assembly

and that's actually is the dll that I am testing.

They never get refresh.

Great! I removed it and it works.

Don't know if this is a Reshaper problem or my Visual Studio problem.

if anyone know why? please leave me a message.


--
Thanks,

Gary

Friday, September 15, 2006

Ten useful tools that must have

Here are ten essential tools that suggested by James Avery

CopySourceAsHTML
GhostDoc
TestDriven.NET
PInvoke.NET


For myself I recommended

XML Visualizer
SQL Prompt

Well my first Post here.
I'll make it a little bit detail later