compact-framework

Rijndael algorithm (How to create our own Key )

淺唱寂寞╮ 提交于 2019-12-03 08:28:56
All the samples for Rijndael algorithm are defining the key from the Rijndael class itself, can't we provide the Key of our own. Any hint on this will help me a lot. The sample application we are creating is for windows mobile and it doesn't support PasswordDeriveBytes Thanks in advance Geetha Update on this topic: As per the code sample provided below, we have tried it and it seems to be working but there is a small hiccup in this. when we decrypt the data there is a 8 bit padding up on the right side of the value for the example, we are encrypting a Unique key for transaction and it looks

Asynchronous programming design pattern

谁说胖子不能爱 提交于 2019-12-03 08:27:54
I'm working on a little technical framework for CF.NET and my question is, how should I code the asynchronous part? Read many things on MSDN but isn't clear for me. So, here is the code : public class A { public IAsyncResult BeginExecute(AsyncCallback callback) { // What should I put here ? } public void EndExecute() { // What should I put here ? } public void Execute() { Thread.Sleep(1000 * 10); } } If someone can help me... Thanks ! You could use a delegate: public class A { public void Execute() { Thread.Sleep(1000 * 3); } } class Program { static void Main() { var a = new A(); Action del =

Windows Mobile: using phone's camera with C#

馋奶兔 提交于 2019-12-03 07:42:11
问题 I want to show the image that mobile phone's camera its taking on a control in a WinForm. The idea is that my application works like camera's program. I want to show the image like if the user is going to take a photo. How can I do that? Can I do that? If you need more details ask me. Thank you! 回答1: Not very sure what you need, but you may try using Microsoft.WindowsMobile.Forms.CameraCaptureDialog: string originalFileName; using (CameraCaptureDialog dlg = new CameraCaptureDialog()) { dlg

CE 6.0 / .NET CF 3.5 Application has encountered a serious error (MC3100)

試著忘記壹切 提交于 2019-12-03 07:11:30
When exiting my .NET CF 3.5 application on the Motorola MC3100 (CE 6.0 version only) I get the error message "Application xxx has encountered a serious error and needs to shut down". I then need to warm boot the device for the application to work again. This code works fine until the application is shutdown and it only fails if a font is set on a control in the application. Everything also works fine on .NET CF 2.0 and all of the other Motorola, Intermec, Psion, HHC devices I have tried with .NET CF 3.5. Here is my current test code: [MTAThread] static void Main() { Control oCtrl = new Control

Ignoring queued mouse events

你。 提交于 2019-12-03 07:04:40
I have an application written in C# targeting .NET Compact Framework 3.5, running on Windows CE. From time to time, operations lasting for a second or so are being performed on the UI thread. I currently set the Cursor.Current property to indicate that the application is busy, but this does not prevent mouse events from eager users to queue up. This sometimes leads to unintended clicks. What is the best way to ignore queued mouse messages on the .NET Compact Framework platform? Sadly, the code has to run on the UI thread. Disabling the controls won't help you, as I've found from my POS

How can I expose only a fragment of IList<>?

爱⌒轻易说出口 提交于 2019-12-03 06:15:22
I have a class property exposing an internal IList<> through System.Collections.ObjectModel.ReadOnlyCollection<> How can I pass a part of this ReadOnlyCollection<> without copying elements into a new array (I need a live view, and the target device is short on memory)? I'm targetting Compact Framework 2.0. Keith Try a method that returns an enumeration using yield: IEnumerable<T> FilterCollection<T>( ReadOnlyCollection<T> input ) { foreach ( T item in input ) if ( /* criterion is met */ ) yield return item; } These foreach samples are fine, though you can make them much more terse if you're

For a .net developer, what's the learning curve to get into mobile development?

帅比萌擦擦* 提交于 2019-12-03 06:02:42
问题 For a .net developer, what's the learning curve to get into mobile development? How many different operating systems are there that run .net? Is windows mobile that same as windows ce? 回答1: Learning Curve I hate to say "it depends" but it really does, and on several factors. What is your ".NET development" experience? Keep in mind that the CF supports C# and VB.NET, so if you're a COBOL.NET guy, it's going to be steeper than if you're a C# guy. If you do primarily ASP.NET on the desktop, it's

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

被刻印的时光 ゝ 提交于 2019-12-03 05:09:49
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 by Twitter in June of 2010, so I have a hard deadline to keep my Twitter client working after this

.NET CF 3.5 mobile app building slowly in VS 2008

倾然丶 夕夏残阳落幕 提交于 2019-12-03 05:09:17
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? 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 PlatformVerificationTask in \Windows\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets

Allowing iteration without generating any garbage

心已入冬 提交于 2019-12-03 04:50:40
问题 I have the following code in an object pool that implements the IEnumerable interface. public IEnumerable<T> ActiveNodes { get { for (int i = 0; i < _pool.Count; i++) { if (_pool[i].AvailableInPool) { yield return _pool[i]; } } } } As far as I know (according to this question), this will generate garbage as the IEnumerable object will need to be collected. None of the elements in _pool will ever be collected, as the purpose of the pool is to keep references to all of them to prevent garbage