compact-framework

Compact Framework - Retrieve a list of countries and regions

橙三吉。 提交于 2019-12-05 18:30:51
Afternoon people! I'm trying to implement a list of counties on my Compact Framework (Mobile) application. I can do this easily in the full .Net framework with CultureInfo.GetCultures(..etc). However, the CF seems to be missing this feature? Is there any way I can return a list of countries (and regions if possible) that I can populate into a ComboBox? The OS has a list of countries, so there must be a way to do it? I look forward to hearing back! How about this? using System; using System.Collections.Generic; using System.Globalization; using System.Runtime.InteropServices; namespace

How to get an image to a pictureBox from an URL? (Windows Mobile)

柔情痞子 提交于 2019-12-05 17:52:24
What and how is the best way to get an image from an URL when using the Compact Framework? I have googled around, but could not find any decent answers. Something i found was this (made a function out of it): public Bitmap getImageFromUrl() { HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(this.SImageUrl); request.Timeout = 5000; // 5 seconds in milliseconds request.ReadWriteTimeout = 20000; // allow up to 20 seconds to elapse HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream ms = response.GetResponseStream(); Bitmap imageFromUrl; using (MemoryStream ms2

401 when POSTing using HttpWebRequest (yes I used Credentials)

梦想的初衷 提交于 2019-12-05 17:47:30
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 authenticated POST. This appears only on mobile phones (compact-framework 3.5 and 2.0 on WinMobile 6.1

Call JavaScript function from .NET Compact Framework in WebBrowser control

喜夏-厌秋 提交于 2019-12-05 17:47:01
Is there anyway to call a JavaScript function from .NET Compact Framework through the WebBrowser control? It works with the Navigate() Method. I just tried it with the Windows Mobile 5.0 Pocket PC Emulator. For example: webBrowser1.DocumentText = @"<html><head> <script type='text/javascript'> function doIt() { alert('hello again'); return 'i did it!'; } </script> </head><body>hello!</body></html>"; webBrowser1.Navigate(new Uri("javascript:doIt()")); 来源: https://stackoverflow.com/questions/3135586/call-javascript-function-from-net-compact-framework-in-webbrowser-control

Programatically check which versions of .NET Compact Framework are installed

怎甘沉沦 提交于 2019-12-05 16:18:26
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? 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/5956122/programatically-check-which-versions-of-net-compact-framework-are-installed

Designing data access for Compact Framework and Full Framework

孤街浪徒 提交于 2019-12-05 15:48:19
We currently have a desktop app which uses data from SQL CE. We used Entity Framework for our ORM layer to the database and all data access methods are built around this. Now we have to build a smaller scaled down "clone" of this app for Windows CE 6.0 on the Compact Framework, also using the same SQL CE database design as on the desktop version. The problem is that compact framework does not support Entity Framework, so we are forced to access the database the old fashioned way (ADO.net, datasets, etc). However this is causing duplication of our whole data access layer and maintenance on

Detecting USB Connection — C# .Net CF 3.5

若如初见. 提交于 2019-12-05 15:09:47
问题 I have an application (.Net Compact Framework 3.5) running on a Windows Mobile 6.1 device and I want to detect when the USB connection changes (either something connects or disconnects). I was originally using the SystemProperty.CradlePresent property to trigger an event but I am wondering if this only works if the device connecting has ActiveSync? I will be receiving a connection via USB from a Linux device that does not have ActiveSync running on it. Can I still use SystemProperty

How to push data to a .NET CF client?

烂漫一生 提交于 2019-12-05 13:10:19
Although polling a webservice is possible, do you know of another method to push changes to a mobile client except using the exchange server mail transport? As Mark Seemann worte: I once did a POC of a client notification system for .NET CF when I was in the Microsoft Dynamics Mobile team. At the time I didn't find any Out-Of-The-Box solutions that could do this and I didn't want to piggyback on the Exchange Server connection since the intended users didn't have a AD account and most certanly didn't use the exchange server. So I was in the same situation as you are now. I started searching for

Use Bouncy Castle library with .NET Compact Framework

早过忘川 提交于 2019-12-05 12:47:06
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 application (using the whole .NET framework), this code runs without problem. So I’m guessing there is an

JSON.NET Visual Studio 2008 and .NET 3.5 Compact Framework

妖精的绣舞 提交于 2019-12-05 11:51:18
Can I use JSON.NET in Visual Studio 2008 with .NET 3.5 Compact Framework? And how can I install/Configure it in the IDE? I've searched the internet but could not find it. I found this NuGet Support for Visual Studio 2008 to try install JSON.NET through NuGet but could not get it working. The result of this tutorial was an error Unable to find package 'your.package.name' : I don't think NuGet will help you here. Json.NET removed support for the .NET 3.5 Compact Framework in release 4.0.1 , as is stated in the 4.0.1 release notes : Other major changes in this release are two new builds and the