Christopher Fairbairn hat sein "ChrisTec Managed Today Screen Item Framework" auf Codeplex veröffentlicht. Das Framework stellt Wrapper-Klassen für die Today Screen API zur Verfügung. Somit kann man nun einfacher aus .NET heraus eigene Today Screens für sein Windows Mobile Gerät entwickeln.
Links:
Seit gestern sind die Power Toys for .NET CF 3.5 draußen:
The Power Toys for .NET Compact Framework 3.5 CTP provides tools for evaluating performance, obtaining diagnostic information, working with WCF and configuring the .NET Compact Framework. Tools included in this package:Remote Performance Monitor and GC Heap Viewer – Provides real time counter data (ranging from Garbage Collector activity to type loading info) on a running NETCF application. The GC Heap Viewer feature allows you to capture the managed heap at any moment your app is running to view live references, and allows you to compare multiple snapshots to find memory leak issues. NETCF CLR Profiler – CLR Profiler is an instrumenting allocation profiler for NETCF applications. It provides detailed allocation visualizations, allocation callstacks visualizations and useful for diagnosing memory management issues. App Configuration Tool (NetCFcfg.exe) - On-device tool for specifying what version of the NETCF runtime an application will run against, displaying installed versions of NETCF and displaying info about DLLs in the GAC. NETCF ServiceModel Metadata Tool – The .NET Compact Framework ServiceModel Metadata Tool (netcfsvcutil.exe) allows you to generate a Windows Communication Foundation (WCF) client proxy to help developers consume WCF services on device. Like svcutil.exe, which is the desktop version of the utility, netcfsvcutil.exe is a command-line tool that generates service model code from metadata documents and generates metadata documents from service model code. Remote Logging Configuration Tool – The Logging Configuration Tool enables users to easily configure logging options on a NETCF device including: loader, interop, network, error and finalizer logs. NETCF Network Log Viewer – A utility for viewing NETCF network log data.
Zum Download geht es hier
Wenn man dem Benutzer eine Mitteilung zukommen lassen möchte, hat man viele verschiedene Wege. Einer davon ist einen Balloon Tipp erscheinen zu lassen. Im Namensraum Microsoft.WindowsCE.Forms befindet sich eine Notification Klasse mit der man sehr einfach einen Balloon Tipp erstellen kann:
1 Notification n = new Notification(); 2 n.Caption = "Systemmeldung"; 3 n.Text = "Ich bin ein Balloon Tipp"; 4 n.Duration = 5 5 n.Visible = true;
Schnell stellt man aber fest, dass die Notification Klasse nicht der Hit ist. Ich wollte z.B. das der Benutzer den Balloon Tipp per Mausbutton schließen kann. Dieses Verhalten ist leider nicht mit der Notification Klasse zu realisieren, dass muss man native über COM Interop realisieren. Es wurden nicht alle Eigenschaften, Methoden, etc. in das .NET Compact Framework übernommen. Bei meiner Recherche bin ich auf die NotificationWithSoftkey Wrapper-Klasse von Christopher Fairbairn gestoßen.
Mit dieser Wrapper-Klasse kann man genau mein Problem lösen:
1 private NotificationWithSoftKeys n; 2 3 n = new NotificationWithSoftKeys(); 4 n.Caption = "Systemmeldung"; 5 n.Text = "Ich bin ein Ballon Tipp."; 6 n.InitialDuration = 5; 7 n.LeftSoftKey = new NotificationSoftKey(SoftKeyType.Dismiss, "Close"); 8 n.Visible = true;
Mit den 8 Zeilen Code kann man z.B. einen Close Button in den Balloon Tipp integrieren.
Die Wrapper Klasse bietet noch weitere Methoden und Eventhandler an. Ein Blick lohnt sich!
Weitere Links:
Ich wollte gerade den Cellular Emulator aus dem Windows Mobile 6 SDK ausprobieren. Laut Anleitung muss der gleiche COM Port beim Device Emulator angegeben werden, der auch unten links im Cellular Emulator steht.
Aber was tun, wenn man den gleichen COM Port im Device Emulator nicht auswählen kann?
Die Lösung ist sehr einfach, man muss nur den COM Port unter Serial Port 0 reinschreiben und sich nicht wundern, dass man diesen nicht auswählen kann. Auswählbar sind nur die physikalischen COM Ports, der Cellular Emulator benutzt einen virtuellen.
Ausführlich, mit schicken Bildern beschrieben, kann man das im Post von Dave Glover nachlesen.