Das man in Windows 7 Fenster links und rechts auf den Bildschirm docken kann ist ja nichts neues,i ch habe aber bis jetzt immer mit zwei Bildschirmen gearbeitet und bis jetzt nur geschafft ganz links und ganz rechts zu docken (d.h. Fenster 1 auf dem linken Bildschirm links und Fenster 2 auf dem rechten Bildschirm rechts)

Doch heute bin ich per Zufall über etwas lustiges gestolpert,… das Docking kann man nicht nur per Maus steuern!

Mit der Tastenkombination Windows + Left bzw. Windows + Right kann man, beim aktiven Fenster zwischen linksdocken, normal und rechtsdocken  wechseln,… auch Windows + Up (Maximieren), Windows + Down (Normal).

Vermutlich kennen das schon alle,… für mich wars neu. Hoffe es findet sich jemand den das weiterhilft. ;)

English:

It not new that Windows 7 allows to dock dialogs on the left and right side of the screen, but I usually use two screens and since now I only managed to dock a dialog either on the left side of the left screen or on the right side of the right screen.

Today I found something by chance,… the docking feature can also be done by keyboard!

With the shortcut Windows + Left or Windows + Right you can toggle between docking left, normal dialog and docking right,… also Windows + Up (maximizes), Windows + Down (normal dialog).

I assume everybody knows this already,… but its new for me,… hopefully this helps at least some people. ;)

dialogDocking

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Eine gute bzw. die einzige vernünftige Möglichkeit MissingMethodExceptions und TypeLoadExceptions einer .NET Compact Framework Anwendung zu identifzieren ist das Loader Log. Dieses kann mittels der Registry aktiviert werden: Dazu sind folgende Schritte nötig:

1. CLR Logging aktivieren. Folgenden Wert auf 1 setzen:
HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\Enabled

2.Loader Log aktivieren. Folgenden Wert auf 1 setzen:
HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\Loader\Enabled

Im Prinzip reicht da schon aus. Das Logfile wird im Verzeichnis der Anwendung erstellt und heißt netcf_loader.log.
Empfehlenswert sind noch folgende zusätzlichen Einstellungen:

3.Anwendungsnamen im Logfile Namen (z.B.: netcf_myApp_loader.log. Nützlich wenn mehrere Anwendungen im gleichen Verzeichnis sind. Folgenden Wert auf 1 setzen:
HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\UseApp

4.Prozess Id im Logfile Namen. Folgenden Wert auf 1 setzen:
HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\UsePid

5. Log immer sofort schreiben. Nützlich wenn die Anwendung abstürtzt. Achtung, wirkt sich negativ auf die Performance aus. Folgenden Wert auf 1 setzen:
HKLM\Software\Microsoft\.NETCompactFramework\Diagnostics\Logging\Flush

Falls die genannten Registry Einträge noch nicht exisitieren, kann man diese einfach erstellen. Alle Werte sind vom Typ DWORD.

Mehr Informationen gibts im Blog von  Steven Pratschner und Dawid Kline.

More Information and an englisch description are posted on the blogs of Steven Pratschner and Dawid Kline.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Bei einem unserer Kunden, wurden bis jetzt Dateien auf der DB (Sql Server 2005) als XML abgespeichert:

<Document>

<FileName></FileName>
<FileType></FileType>
<CreatedAt></CreatedAt>
<Data></Data>

</Document>

Das <Data> Feld wurde natürlich mit base64 encoded damit man schön XML reinschreiben und auslesen konnten.

Da der Vortschritt aber auch hier einzug gehalten hat, gibt es jetzt auch hier eine eigene Tabelle mit einem Blob für <Data>. Dabei stellte sich nur die Frage wie man jetzt am besten von base64 auf Blob migriert. Folgenden netten XQuery befehl habe ich hierfür gefunden:

Documents.value(‘xs:base64Binary(/*:Documents[1]/*:Document[1]/*:Data[1])’, ‘varbinary(MAX)’)

English:

One of our customer used XML to save files inside there DB (Sql Server 2005):

<Document>

<FileName></FileName>
<FileType></FileType>
<CreatedAt></CreatedAt>
<Data></Data>

</Document>

The <Data> field was of course base64 encoded to make it easy to read and write XML files form it.

After some progress they managed to save the data into a new table with an Blob field for <Data>, but the tricky part was: how to get the base64 data into the Blob field,… during some research I found the following XQuery command.

Documents.value(‘xs:base64Binary(/*:Documents[1]/*:Document[1]/*:Data[1])’, ‘varbinary(MAX)’)

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

On my last vacation I used 2 digicams, but had one set to a wrong timezone accidently. That’s why I cannot copy the pictures of both cameras to one single folder, sort by date and rename. In short terms: I cannot join the pictures.

Searched the internet, but found tools, which can set the date to a specific date only, but cannot correct the timezone (e.g. add 6 hours to the file’s existing modification date).

So I had to write my own solution. Find the download links below, and feel free to modify the sources. This is a MS VS2008 project, built for .NET Framework 2.0

Hint: Please note, that usage of this tool is your own responsibility!

Ich hatte im Urlaub 2 Digitalkameras mit, wobei eine noch irrtümlich die Zeitzone vom vorangegangenen Urlaub gesetzt hatte. Resultat: ich kann nun nicht mehr einfach die Bilder der beiden Kameras in ein Verzeichnis kopieren, sie nach Datum sortieren, und umbenennen. Kurz: ich kann sie nicht korrekt zusammenfügen.

Zuerst müßte ich das ModificationDate von Kamera A um 6 Stunden (sprich: die Zeitzone) korrigieren.

Im Internet fand ich nur Tools, die das Datum auf einen vorgegebenen Wert setzen, daher habe ich das selbst in die Hand genommen. Die Download Links sind unten zu finden, die Sourcen dürfen frei modifiziert werden. Es handelt sich um ein MS VS2008 Projekt, und kompiliert für .NET Framework 2.0.

Hinweis: die Verwendung erfolgt auf eigenes Risiko!

Download:

Binary
Sources

Screenshot:

ScreenShot

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Habe mich in letzter Zeit, dank UML Simulation wieder mehr mit CodeDom und runtime Compilieren beschäftigt. Bin dabei auf folgendes draufgekommen. (Hab vermutlich mal wieder die Hilfe nur halbe gelesen ;) ).

  1. ich erzeuge aus Enterprise Architect mein Codefile
  2. ich erstelle CodeDomProvider und CompilerParameter
  3. ich füge alle “External References” im CompilerParameter hinzu
  4. ich Compiliere und hole mir den Type der Klasse die ich benutzen möchte

    bis hier hin ist alles richtig, es geht ab hier zwar noch Fehlerfrei weiter aber…

  5. ich erzeuge mit Hilfe von: Activator.CreateInstance eine Instanz
  6. da ich weiß das die Instanz vom Interface X abgeleitet ist, spreche ich die Instanz als X an

    Hier kommt der Fehler,..
  7. wenn ich jetzt Funktionen anspreche die auf eine “External References” verweisen bekomme ich einen “could not load Assembly xxx,… file not found”

Wie schon in Schritt 5. beschrieben liegt hier der eigentliche Fehler, welcher dann in Schritt 7. erst auftaucht. Um die Instanz und auch alle “External References” zu bekommen, sollte man die Instanz nicht über Activator.CreateInstance erstellen, sondern über CompilerResult.CompiledAssembly.CreateInstance(Type.FullName) da hier noch die “Externen Referencen” richtig mitgeladen werden.

English:

Have done some things in CodeDom and runtime compiling recently, for UML Simulation. Found the following at the time. (presumably I only rushed through the help again ;) ).

  1. I create a Codefile out of Enterprise Architect
  2. I create a CodeDomProvider and CompilerParameter
  3. I add all “External References” to the CompilerParameter
  4. I compile it and the get the type of the class I want to use

    till here everything is OK, I’ll still get no errors but…
  5. I create an instance using: Activator.CreateInstance
  6. because I know the instance inherits the interface X I cast it to X

    Here we go with the errors,..
  7. If I now use a function which is using something from an “External Reference”, I get a “could not load Assembly xxx,… file not found” error.

Like I allready told, the real error is in step 5. but it shows up in step 7. To be able to use “External Referneces” don’t use the Activator.CreateInstanc to get an instance, rather use CompilerResult.CompiledAssembly.CreateInstance(Type.FullName) because this loads also the “External References”.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Doing automation of Enterprise Architect in an non-graphical environment (e.g. Windows Service) will cause the following error:

Retrieving the COM class factory for component with CLSID {8667FE5E-6D96-400A-AF0A-15C29F94DFCD} failed due to the following error: 80080005.

The code suggests lack of permission to use the COM interface from within the windows service.

Solution: you must configure DCom (EA.App)

1) Open COM-Components-Window and navigate to DCOM, EA.App
2) right-click EA.App and go to properties
3) go to security tab and customize Launch Permissions
4) add a user permitted to launch EA and grant full permissions
5) in EA.App Properties move on to Identity-Tab, and change user to the one entered before in Launch permissions

( see also: Documentation of software projects )

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg

Heute hab ich was Lustiges/Ärgerliches entdeckt. Für alle, die Deployment Projecte und Buildscripts gemeinsam benutzen, folgender kleiner Hinweis auf eine potentielle Fehlerquelle. Wenn ihr den Productcode ändert und die Productversion  erhöht, um ein Setup für eine neue Version zu bekommen, solltet Ihr auf das Guidformat aufpassen.

Es sieht vielleicht nur so aus aber, diese Guid:
{a50e0545-b0da-4a27-a832-93245837ee11}
entspricht nicht dem vom Deploymentproject gewünschten format von:
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

Zum besseren Verständnis das Deployment project file ist case sensitive und alle Guids sollten immer UpperCase sein also:
{A50E0545-B0DA-4A27-A832-93245837EE11}

Hoffe das hilft einigen weiter.

English:

Today I found something funny/annoying. For all who use Deployment prjects and Buildscripts, is the following little hint of a potential error. When you update the product code and increase the product version to get a setup file for you new version you should watch for the guid format.

It doesn’t look like it but this Guid:
{a50e0545-b0da-4a27-a832-93245837ee11}
does not match the expected format of the deployment project of:
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}

To assist in the understanding the deployment project file is case sensitive and all guid’s have to be UpperCase, therefore:
{A50E0545-B0DA-4A27-A832-93245837EE11}

Hope this will help some of you.

Share and Enjoy:
  • Technorati
  • Digg
  • Facebook
  • del.icio.us
  • Live
  • Google Bookmarks
  • DotNetKicks
  • DZone
  • TwitThis
  • Blogosphere News
  • Blogplay
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • MSN Reporter
  • MyShare
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Webnews.de
  • Yahoo! Bookmarks
  • Yigg