compact-framework

How to “catch” unhandled Exceptions

江枫思渺然 提交于 2019-12-08 06:13:14
问题 We've developed a .NET 3.5 CF Application and we're experiencing some application crashes due to unhandled exceptions, thrown in some lib code. The application terminates and the standard application popup exception message box is shown. Is there a way to catch all unhandled exceptions? Or at least, catch the text from the message box. Most of our customers simply restart the device, so that we're not able to have a look on the exception message box. Any ideas? 回答1: Have you added an

Protocol buffer deserialization and a dynamically loaded DLL in Compact Framework

末鹿安然 提交于 2019-12-08 06:09:11
问题 I saw a question related to this on the full framework here. Since it seems to have stayed unresolved for quite a while and this is for the compact framework, I though it would be better to create a new question for it. I want to deserialize types for which I am loading assemblies dynamically (with Assembly.LoadFrom) and I am getting a "Unable to identify known-type for ProtoIncludeAttribute" error. In the related question I mentioned, it was hinted that hooking AppDomain.AssemblyResolve

remove date from DateTimePicker for Compact Framework

不问归期 提交于 2019-12-08 03:15:34
问题 http://msdn.microsoft.com/en-us/library/aa446530.aspx but there is no possibility to null date or to delete date from text field. how to remove date from textfield or how to connect TextField with DateTimePicker 回答1: To display blank you can set it as DateTimePicker1.Format = DateTimePickerFormat.Custom; DateTimePicker1.CustomFormat = ""; and then reset the format in ValueChanged event to the desired format. The picker doesn't allow null values since it requires a valid DateTime object. You

Is a mapping library like AutoMapper available on the .NET Compact Framework 3.5?

家住魔仙堡 提交于 2019-12-07 22:41:08
问题 Is anyone working on a .NET Compact Framework port of AutoMapper or are there any similar mapping libraries for the .NET Compact Framework? 回答1: You could build on OmuMapper ? (UPDATE: @Omu himself has since built ValueInjecter). (Obviously there's a strong chance this wont meet many challenges you might place in front of it. Are you really interested in all the AM features? Is size an issue? Any more context you can give?) EDIT: As they've RTW'd over at AutoMapper Maybe now is the perfect

Closing GPRS Connections On Windows Mobile

我是研究僧i 提交于 2019-12-07 20:21:19
问题 Is it possible to get all open or cached gprs connections on windows mobile and programmatic force them to close? Ive been looking at connection manager api but cant seem to find methods I to do this. Regards Tony 回答1: Connection Manager can be notified that you're no longer using the connection by calling ConnMgrReleaseConnection, but that does not forcibly close the connection. It is closed based on the lifetime caching defined in the registry (HKEY_LOCAL_MACHINE\Comm\ConnMgr\Planner

Properly handling network timeouts on Windows CE

試著忘記壹切 提交于 2019-12-07 14:28:22
问题 I'm trying perform a relatively basic TCP socket send/receive operation on Windows CE using the .NET Compact Framework. I'm trying set the timeout value so that reads/writes on a slow connection timeout instead of blocking forever. On the full framework I'm able to simply set the ReceiveTimeout and SendTimeout properties on the Socket object. Unfortunately, setting these properties on the compact framework immediately results in a SocketException about using an unsupported socket option.

How to make compact framework custom controls AutoScale aware

六眼飞鱼酱① 提交于 2019-12-07 11:52:25
问题 Windows Forms (including Windows Forms for Compact Framwork, which is what I am using) has an AutoScale feature. By setting the AutoScaleMode property to AutoScaleMode.Dpi , your application designed for, say, 320x200 automatically scales to the larger display of, for example, a VGA device. This works great, but I have a few self-made custom controls that do their own OnPaint stuff, and I'd like them to scale as well. Unfortunately, I've not found good documentation or an example on how to do

Programatically check which versions of .NET Compact Framework are installed

戏子无情 提交于 2019-12-07 11:36:21
问题 I have a Windows Mobile application that is built for .NET CF 1.0. It is written in C#. How can this program check what versions of the .NET Compact Framework are installed on the device it is running on? 回答1: It really depends on what you mean by "installed". If they were installed via CAB file (the most common), there will be entries in the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\.NETCompactFramework that you could programmatically check. 来源: https://stackoverflow.com/questions

Use Bouncy Castle library with .NET Compact Framework

試著忘記壹切 提交于 2019-12-07 11:30:26
问题 I’m trying to use Bouncy Castle v1.7 on a Windows Mobile 6.5 device. I’m trying to execute the following code: ISigner signer = SignerUtilities.GetSigner("SHA256withRSA"); Using the Bouncy Castle binaries On the Windows Mobile device, the code results in the following exception being thrown: "The version of the assembly System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=B77A5C561934E089 cannot be loaded by this version of the Microsoft .NET Compact Framework." On a classic desktop

401 when POSTing using HttpWebRequest (yes I used Credentials)

一笑奈何 提交于 2019-12-07 11:30:06
问题 I'm using HttpWebRequest to pull down XML, and POST data back to a 'WebService' and getting a 401 on the POST. When creating the requests I've added Credentials and now tried a credentials cache and setting PreAutenticate to True, still getting the 401! :( Watching the HTTP traffic on the router I set the get make an unauthenticated GET request.. it hits the 401 and then makes an authenticated GET and is allowed through. When I watch the POST I see it hit the 401... and it doesn't even try an