As i'm struggling my way through the first WPF application, I keep running into interesting reading (essential really) which seems to be a must for a WPF virgin like me.
A Guided Tour of WPF is priceless, also his article on dependancy properties provides excellent view and i'm sure there's more to explore...
Since i'm struggling with trying to bind ListView to a collection of objects (piece of cake) and also to group the items (pain in the b*), i'm forced to actually try and learn the basics :) There's a very nice article on WPF Data Binding on CodeProject.
Once i figure out the bloody groupping thing, i'll post the sample code here.
Monday, September 15, 2008
Friday, September 12, 2008
Diff tool for C# source code (Part 2)
I'm back with more information on the diff tool for VS (2005) and TFS (2005).
I've decided to use DiffMerge. It may be just me, but I like it better. It's still nowhere as good as Araxis, but since it's free, i shouldn't complain i guess :)
To set up your own diff tool in VS 2005: Tools -> Options. Select Source Control > Visual Studio Team Foundation Server and click Configure User Tools... Then click Add... and specify:
Extension: cs
Operation: Compare
Command : %path to the diffmerge.exe%
Arguments: %1 %2
Obviously, you can do the same for vb, resx, etc...
Now, IMPORTANT thing. This DOES NOT REPLACE THE COMPARE TOOL USED FOR CHECK-IN, which imho totally suxs. So, you need to identify all conflicting files first, then select them one by one e.g. in the solution explorer and click Compare (right-click menu item). This is where the specified Diff tool is shown and you can modify your source prior to checking them in. On check-in, you then select Use Local Version. Make sure that the file didn't get changed on the server in the mean-time though!
I've decided to use DiffMerge. It may be just me, but I like it better. It's still nowhere as good as Araxis, but since it's free, i shouldn't complain i guess :)
To set up your own diff tool in VS 2005: Tools -> Options. Select Source Control > Visual Studio Team Foundation Server and click Configure User Tools... Then click Add... and specify:
Extension: cs
Operation: Compare
Command : %path to the diffmerge.exe%
Arguments: %1 %2
Obviously, you can do the same for vb, resx, etc...
Now, IMPORTANT thing. This DOES NOT REPLACE THE COMPARE TOOL USED FOR CHECK-IN, which imho totally suxs. So, you need to identify all conflicting files first, then select them one by one e.g. in the solution explorer and click Compare (right-click menu item). This is where the specified Diff tool is shown and you can modify your source prior to checking them in. On check-in, you then select Use Local Version. Make sure that the file didn't get changed on the server in the mean-time though!
ClickOnce Error : Value does not fall within the expected range
I've ran into an issue while releasing application using ClickOnce. The application got downloaded successfully on the client, but then it failed during deploy with the "Value does not fall within the expected range" error.
The issue is that ClickOnce doesn't support having the same application version twice on the machine. In our case, i first installed a "Test" version (different ClickOnce deploy folder) to make sure the app works as expected. Then i did deploy to live ClickOnce folder and tried to run the app on the same computer. The "Live" version exhibited the above error.
Solution is: increment the live version, problem solved.
The issue is that ClickOnce doesn't support having the same application version twice on the machine. In our case, i first installed a "Test" version (different ClickOnce deploy folder) to make sure the app works as expected. Then i did deploy to live ClickOnce folder and tried to run the app on the same computer. The "Live" version exhibited the above error.
Solution is: increment the live version, problem solved.
Friday, September 05, 2008
Diff tool for C# source code
The diff tool which is part of VS 2005 (TFS) is very basic and any complex diff is impossible to resolve in it.
This page has a nice list of tools available:
http://codebetter.com/blogs/patricksmacchia/archive/2008/04/28/diff-tools-to-see-source-files-changes.aspx
I used to use Araxis long time ago and it was brilliant. I'll check out WinMerge and DiffMerge now to see if free tool can do the trick. Will post more info here once I'm done evaluating.
This page has a nice list of tools available:
http://codebetter.com/blogs/patricksmacchia/archive/2008/04/28/diff-tools-to-see-source-files-changes.aspx
I used to use Araxis long time ago and it was brilliant. I'll check out WinMerge and DiffMerge now to see if free tool can do the trick. Will post more info here once I'm done evaluating.
Wednesday, July 02, 2008
SQL 2005 32 bit on Vista 64 bit
I've decided to upgrade my work system to Vista 64bit (mainly due to larger memory). As I go on installing stuff, i keep running into various issues which I'll try to post here.
SQL 2005 Developer Edition (32 bit).
First issue is with the compatibility check-list - namely IIS and ASP.Net
This KB article outlines which features need to be turned on Vista in order for Reporting Services to work.
This link describes how to fix ASP.Net by running following:
SQL 2005 Developer Edition (32 bit).
First issue is with the compatibility check-list - namely IIS and ASP.Net
This KB article outlines which features need to be turned on Vista in order for Reporting Services to work.
This link describes how to fix ASP.Net by running following:
cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
Thursday, May 01, 2008
Read and parse Excel data from clipboard using Javascript
IE7 prevent clipboard from being read - you can enable it in the title-bar (blocked content). For Firefox read this info.
Following sample reads data from clipboard and tries to parse them and format back to table.
// prepare result
var resE = document.getElementById("result");
var res = "";
resE.innerHTML = "";
// read clipboard
var s = window.clipboardData.getData("Text");
// parse clipboard data
var lines = s.split(String.fromCharCode(13,10));
if (s.indexOf(String.fromCharCode(13,10)) == -1 || s.indexOf(String.fromCharCode(9)) == -1)
{
res = "(invalid data)";
}
else
{
var cols = lines[0].split(String.fromCharCode(9));
res = "Table size: " + lines.length + "x" + cols.length + "
";
res += "";
";
}
// output result
resE.innerHTML = res;
Following sample reads data from clipboard and tries to parse them and format back to table.
// prepare result
var resE = document.getElementById("result");
var res = "";
resE.innerHTML = "";
// read clipboard
var s = window.clipboardData.getData("Text");
// parse clipboard data
var lines = s.split(String.fromCharCode(13,10));
if (s.indexOf(String.fromCharCode(13,10)) == -1 || s.indexOf(String.fromCharCode(9)) == -1)
{
res = "(invalid data)";
}
else
{
var cols = lines[0].split(String.fromCharCode(9));
res = "Table size: " + lines.length + "x" + cols.length + "
";
res += "
" + (cols[j] == "" ? "~" : cols[j]); } res += " |
}
// output result
resE.innerHTML = res;
Subscribe to:
Posts (Atom)