compact-framework

Using a X509 Certificate in .Net Compact Framework for Client Authentication HTTPRequest

大憨熊 提交于 2019-12-21 14:24:11
问题 I'm working in Windows Mobile 6 and would like to have client authentication when talking to a Apache webserver. I have a certificate in my local certificate store and it should be rather straightforward: X509Store myStore = new X509Store("MY", StoreLocation.CurrentUser); myStore.Open(OpenFlags.ReadOnly); X509Certificate2Collection certificates = myStore.Certificates; X509Certificate2 clientcertificate; foreach (X509Certificate 2certificate in certificates) { clientcertificate = certificate;

“Invalid field in source data: 0” error with ProtoBuf-Net and Compact Framework

谁都会走 提交于 2019-12-21 07:44:50
问题 Is anyone aware of any issues when using ProtoBuf-Net to serialize/deserialize between compact framework and the full .Net framework? I have a class called LogData that I am serializing under compact framework 3.5, transmitting to a server (running .Net framework 4.0), which then deserializes. Sometimes it works and sometimes it throws the above error and I have yet to narrow it down to any specific cause. I've done many many tests with different values and can't seem to find any rhyme or

“Invalid field in source data: 0” error with ProtoBuf-Net and Compact Framework

馋奶兔 提交于 2019-12-21 07:41:13
问题 Is anyone aware of any issues when using ProtoBuf-Net to serialize/deserialize between compact framework and the full .Net framework? I have a class called LogData that I am serializing under compact framework 3.5, transmitting to a server (running .Net framework 4.0), which then deserializes. Sometimes it works and sometimes it throws the above error and I have yet to narrow it down to any specific cause. I've done many many tests with different values and can't seem to find any rhyme or

Windows Mobile - Compact Framework program as a service?

匆匆过客 提交于 2019-12-21 05:15:10
问题 What is the best way to have my C# Compact Framework program running in the background on a Windows Mobile device ? I need to respond to different events, such as a text message arriving with a specific content. I would like not to start up any UI when the process is started, but just run in the background until UI is needed. How can this be done ? 回答1: Just create the app as a Console app. If you need a message pump, you need to call Run without any parameters, and the CF doesn't have that.

Convert string to double with 2 digit after decimal separator

六月ゝ 毕业季﹏ 提交于 2019-12-21 05:14:22
问题 All began with these simple lines of code: string s = "16.9"; double d = Convert.ToDouble(s); d*=100; The result should be 1690.0, but it's not. d is equal to 1689.9999999999998. All I want to do is to round a double to value with 2 digit after decimal separator. Here is my function. private double RoundFloat(double Value) { float sign = (Value < 0) ? -0.01f : 0.01f; if (Math.Abs(Value) < 0.00001) Value = 0; string SVal = Value.ToString(); string DecimalSeparator = System.Globalization

How to create a full screen application in Win CE 6.0 using .NET Compact Framework 3.5?

寵の児 提交于 2019-12-21 02:36:47
问题 We want our application to run in full screen mode with no title bar on a Win CE 6.0 powered device. The application is being developed using .NET Compact Framework 3.5 (C#). Any sample code or pointers to articles is appreciated. 回答1: First, you have to hide the task bar via P/Invoke. Here's the C code, which should be really easy to convert: HWND hwndTaskbar = ::FindWindow(_T("HHTaskBar"), NULL); ::ShowWindow(hwndTaskbar, SW_HIDE); Once you do that, then use Screen.PrimaryScreen to

Update/Insert to a table using SQLCeResultSet

心已入冬 提交于 2019-12-20 21:02:14
问题 I have a SQL Compact Edition Database that I update periodically (via web services). The part where I write to the database is taking way too long. I am currently doing it with Linq to Datasets (as seen in this question). I have heard that if I do it with with SQLCeResultSet that it will work faster. So, given that I have a table like this: tblClient +- CLIENT_ID {Unique identifier} (Primary Key) +- CLIENT_NAME {varchar (100)} +- CLIENT_ACTIVE {bit} And I have it in object that I get from my

On what .NET Framework(s) is DotNetOpenAuth available?

旧时模样 提交于 2019-12-20 17:29:38
问题 Most (all?) OAuth resources - both information about the protocol and code libraries for easily using them in your own applications - one seems to find on the internet seem to assume the application you are using it in is a web application. I would however like to start using OAuth in my windows mobile Twitter client for interactions with Twitter where I now use Basic Authentication through a set of simple methods I hand rolled. If I'm correct, Basic Authentication is about to be deprecated

Compact Framework best practices: Building a GUI

半城伤御伤魂 提交于 2019-12-20 16:49:35
问题 I'm maintaining a Windows CE app built with the .NET Framework that has about 45 forms. There are 5 'sections' which lead to the function you want. The application is 100% full screen and it is important that it can't be minimized. Since there are so many forms, it's difficult to keep track of which form should be displayed after one is closed. For this, I'm setting the form owner property before showing it, and showing the owner when closing it. I've also been advised that it is best to

.NET CF 3.5 mobile app building slowly in VS 2008

纵然是瞬间 提交于 2019-12-20 15:32:50
问题 I have been working with a Windows Mobile 6 app that is built with .NET Compact Framework 3.5 in Visual Studio 2008. The application builds incredibly slow, spending a majority of the time doing the PlatformVerificationTask. How do I speed up the build? 回答1: The best way to stop the PlatformVerificationTask in a distributed development environment I would suggest adding the following to the mobile app's project file: <Target Name="PlatformVerificationTask"> </Target> This will overwrite the