compact-framework

Windows Mobile 6.0/6.5 - Push Notification

一世执手 提交于 2019-12-11 14:54:19
问题 My mobile application needs to ping web service (WCF) periodically to get the latest data from server. The problem is, this is done periodically even if there isn't anything new on the server. Is there any way that Server notifies device about the change? Like Push Notification? I have read that Push Notifications can be done by SMS and Email. But, both has disadvantages. 回答1: You can try with long lived HTTP requests... http://msdn.microsoft.com/en-us/library/aa446486.aspx 来源: https:/

String.Split Newlines in .Net CF

杀马特。学长 韩版系。学妹 提交于 2019-12-11 14:35:46
问题 Ive been trying to split strings in .NET CF but to no success. If i would have a string like: Hello There World Then I want each word to be stored in a string array so I can put them individually in my datagrid cell. Unfortunately, this code I have doesnt seem to remove the New Lines: string text = _scanResult; //Scan result contains the Hello There World string string[] lines = text.Split(new Char[] {'\n','\r'); for (int x = 0; x < lines.Length; x++) { dt.Rows.Add(lines[x]); } dataGrid1

C# WIndows CE Compact Framework 2.0 Set System Timezone

霸气de小男生 提交于 2019-12-11 13:52:57
问题 I want to change the system time zone programmatically in my windows CE Mobile ?? How do I do it ?? I read through some posts but i am not able to do it ?? Can someone give an sample code to acheive it ? 回答1: That is easy but tricky if you cross DST: http://www.hjgode.de/wp/2010/10/08/windows-mobile-setsystemtime-and-dst-einsteins-relativity-theory/ private DateTime startDateTime = DateTime.Parse("2010/9/24 11:42:00"); [DllImport("coredll.dll", SetLastError = true)] static extern Int32

Visual Studio Device: Unsupported Instruction Set error while connecting to .Net CF CLR Profiler

▼魔方 西西 提交于 2019-12-11 13:33:34
问题 I can't connect to my device using .Net CF CLR profiler . I receive the error Visual Studio Device: Unsupported Instruction Set . I'm using an ARM V7 processor running WEC7 with a USB ActiveSync connection. Any ideas why I might be getting this error ? 来源: https://stackoverflow.com/questions/14135850/visual-studio-device-unsupported-instruction-set-error-while-connecting-to-net

GetSystemPowerState Output not defined in pm.h

陌路散爱 提交于 2019-12-11 11:56:47
问题 I am trying to get the user idle state of my Windows Mobile device. When I run the function GetSystemPowerState (after 15 min of not touching the device) I get the following value: Dec: 302055424 Hex: 0x12010000 Bin: 10010000000010000000000000000 I was hoping that PowerState & POWER_STATE_USERIDLE == POWER_STATE_USERIDLE would be true. But POWER_STATE_USERIDLE is 0x01000000 and I have 0x02000000. I went to look up 0x02000000 and found that it is not in pm.h. What does 0x02000000 mean? Where

JSON.net CF 3.5, verify that JSON is complete

佐手、 提交于 2019-12-11 11:42:20
问题 I'm using Json.net in a 3.5 CF setting and have a problem verifying that a string is indeed complete JSON. I am using: var o = JObject.Parse(incomingString); which will return null if the JSON is incomplete - but not always. If the JSON is something "mostly formed", it will parse correctly. This simple example returns an object: { "Name":"Bob", "Pets":[ {"Type":"Cat", "Name":"Pudge" but if I break the JSON elsewhere, it returns null as expected. { "Name":"Bob", "Pets":[ {"Type":"Cat", "Nam

How to use threadpool class in .net compact framework with c#?

南楼画角 提交于 2019-12-11 11:12:09
问题 I am looking for the solution for multi threading in c# .net compact framework. though threadpool class is good solution but is there any way to sync them like WaitHandle.WaitAll in compact framework? 回答1: I'm not sure I understand the problem. The ThreadPool works just like on the desktop. For thread synchronization objects, you have all of the usual suspects from the System.Threading namespace. Admittedly, the CF omits a few nice-to-have methods (like WaitAll), but those can either be

How can I simultaneously pass args and upload a file to a Web API Controller Method?

こ雲淡風輕ζ 提交于 2019-12-11 10:18:23
问题 I decided that my question here isn't really what I want to do - the XML I need to send is a lot longer, potentially, than I really want to send in a URI. It didn't "feel" right doing that, and this unsealed the deal. I need to send both a couple of args AND a file to my Web API app from a client (handheld/CF) app. I may have found the code for receiving that, from here [ http://www.asp.net/web-api/overview/working-with-http/sending-html-form-data,-part-2] Specifically, Wasson's Controller

P/Invoking SetWindowLong and CallWindowProc in managed code (compact framework)

♀尐吖头ヾ 提交于 2019-12-11 08:53:42
问题 I am trying to override the window procedure for the winmobile taskbar (in order to catch and block pressed buttons) by using SetWindowLong. I have created a class with one method for overriding and one for restoring the window procedure. The MessageReceived method is the one I use to replace the taskbar window procedure with. My class looks the following way: class ButtonBlocker { public delegate IntPtr WindowProc(IntPtr hwnd, uint uMsg, IntPtr wParam, IntPtr lParam); public static

NETCFv35.Messages.EN.cab installation

a 夏天 提交于 2019-12-11 07:55:16
问题 So I get those typical message below on my Window CE 6.0 , upon reading more about it I found the file NETCFv35.Messages.EN.cab under C:\Program Files\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\Diagnostic “An error message is available for this exception but cannot be displayed because these messages are optional and are not currently installed on this device. Please install ‘NETCFv35.Messages.EN.wm.cab’ for Windows Mobile 6.0 and above or ‘NETCFv35.Messages.EN.cab’ for other platforms