August, 2009

GetValue() extension method for RegistryKey class

I needed some elegant method to read registry values in my Live Writer Delicious bookmarks plug-in. RegistryKey has GetValue() method but it returns values as object. I wrote generic version of GetValue() as RegistryKey extension method. It returns you specified value from key and converts it to type you ask. If conversions are not successful then default value of given type will be used.

Bookmarks2LiveWriter: Live Writer plug-in for serious bloggers

Bookmarks2LiveWriter is Windows Live Writer plug-in that is targeted to serious bloggers who also publish bookmarks postings. Bookmarks2LiveWriter lets you download bookmarks for given date range from Delicious and inserts them to current posting. Users can remove unwanted bookmarks and format bookmarks list before inserting it. Bookmarks2LiveWriter is released under GPL. Installer and source code […]

.Net Framework 4.0: C# and optional arguments and named parameters

C# 4.0 supports optional method arguments. Related to this is support for named parameters in function calls. For us it makes easier to use methods which have long argument list. It also introduces some new dangers which may lead us to messy and hard to understand code. In this code I will show how to use optional arguments and give some hints how to avoid messy code.

Developing Delicious applications

I am developing a little piece of software that interacts with Delicious through HTTP API. Using Delicious API puts you one responsibility – use their service carefully. Don’t flood it and don’t stress it some other way. In this posting I will show you how to get bookmarks from Delicious and how to use their […]

Displaying custom HTML in WebBrowser control

I am using WebBrowser control to show preview of automatically generated HTML. Users can select options and preview pane reflects those changes automatically. WebBrowser control has some problems that have been here for years already. Here is my example about how to show custom HTML in WebBrowser control.

SPGenerateFileDefinitions – create XML-definitions for files fast

I wrote simple utility that generates File and ElementFile blocks for images that are included in site definition. I am programming nicely designed community portal on SharePoint and there are so much files that it is easier to automate XML definitions creation process, at least partly. I am also pretty sure that image files may come and go during project and we have to modify or recreate those definitions. So here is my simple utility that makes dirty work for me.

SharePoint problem: moderation comment is not saved

I solved last week one pretty cool mystery in SharePoint. I have form that users use to make some specific changes to list items. When all the fields on form are filled then user clicks save button. Changes are saved to list item and list item is automatically accepted. Status change is made through ModerationInformation property ofSPListItem. Everything seemed to work except one little thing – moderation status comment was not saved.

Windows 7: Links for developers

As Windows 7 is now available to MSDN and TechNet users it is time to give some references for developers who are interested in Windows 7 software development.

Creating vCard with image in .Net

vCard is popular format for exchanging contacts. Besides e-mail clients also modern mobile phones are able to read and send contacts as vCard. This posting introduces same ideas how to implement vCard support in your applications and how to add images to vCards.

Documenting source code

Source code documenting is very important task. Code documentation servers as persisted communication between developers who are using same code. Undocumented or poorly documented code may be hard to understand to other developers who have then waste their valuable time to struggling through the code they don’t understand well. In this posting I introduce you some code documenting tips.

LINQ To Entities, SQL and performance

I have introduced my photo gallery building process in couple of postings. As my galleryuses Entity Framework 4.0 it is good source for some internal processing that takes place inside Entity Framework. In this posting I will show you some LINQ To Entities queries and SQL that is generated for them. I added also some thoughts about performance.