mo.notono.us

Tuesday, September 28, 2004

CodeSmith 2.6 released

I couldn't imagine having to develop our project's data access code without CodeSmith.

Get the new version 2.6 here.

You may want to check out my templates: Stored Procedure Wrapper and Enhanced CRUDS Procedures

Labels: ,

Friday, September 24, 2004

Infragistics.Win tip: Determining if the mouse is over an element

For some reason best known to themselves, the developers at Infragistics didn't think to include a double click event for specific elements like rows or nodes (in the UltraWinGrid and UltraWinTree classes, respectively).

The hack I've resorted to to fix this looks like this:

/// <summary>Determines whether the mouse is over a node.</summary>
/// <returns><c>true</c> if the mouse if over a node; otherwise, <c>false</c>.</returns>
private bool IsMouseOverNode()
{
	bool result = false;
	try
	{
		Infragistics.Win.UIElement uiElem = 
			tree.UIElement.ElementFromPoint(tree.PointToClient(UltraTree.MousePosition));
		Infragistics.Win.UIElement nodeUIElem = 
			uiElem.GetAncestor(typeof (Infragistics.Win.UltraWinTree.TreeNodeUIElement));
		result = (nodeUIElem != null);
	}
	catch
	{}
	return result;
}
where tree is my Tree control instance. For a Grid, replace the guts with the following:
		Infragistics.Win.UIElement uiElem =
			UltraGrid.DisplayLayout.UIElement.ElementFromPoint(ultraGrid.PointToClient(CompositeGrid.MousePosition));
		Infragistics.Win.UIElement rowUIElem = 
			uiElem.GetAncestor(typeof (Infragistics.Win.UltraWinGrid.RowUIElement));
		result = (rowUIElem != null);

Thursday, September 23, 2004

..government of the lobbyists, by the lobbyists, and for the lobbyists shall not perish from the earth...

...or at least the US Senate.

Wired News: Broadcasters Gut Digital TV Bill

Ok, I admit it - I don't really care that much about this particular issue, but what irks me is that it's so incredibly obvious who's interests Senators Burns and Hollings have in mind:

The top industries supporting Conrad Burns are:
1 TV/Movies/Music $223,150
2 Telecom Services & Equipment $211,718
3 Lobbyists $191,002
The top industries supporting Fritz Hollings are:
1 Lawyers/Law Firms $212,216
2 Lobbyists $110,987
3 TV/Movies/Music $109,833
4 Telecom Services & Equipment $96,000
5 Telephone Utilities $67,200
You'll get your reward next year, Fritz.

Tuesday, September 21, 2004

Google Translation

The Google Translation program is pretty neat - it's like (almost) like a wiki in that it lets users perform the translations. I went in and translated a few Google Toolbar resource strings from English to Norwegian - Nynorsk and brought that from 14% to 16%...

Like I said, Pretty neat, but like with all wikis, what's to stop someone deliberately messing with this?

Labels:

Tuesday, September 07, 2004

Smart Client Developer Center: .NET Compact Framework

Looks like I'll be spending some time with the .NET Compact Framework...

Prevent email address harvesting on your web page

I just stumbled upon Steven Campbell describing Ralph Arvesen's neat way to prevent e-mail address harvesting from web pages using hex encoding and javascript decoding...