compact-framework

Javascript Interpreter for .NET

╄→гoц情女王★ 提交于 2019-12-04 05:21:43
I've got a scenario where I need to run a Javascript interpreter in a .NET application. This is going to be running on Windows Phone 7, so it needs to be Compact Framework-compliant and because it probably won't be pre-packaged for Windows Phone source could help there. Also the licensing can be an issue. We looked at using Jint which is under an MIT license, but it uses Antlr, which is under a BSD license (as I understand it Jint is in non-compliance for not redistributing the Antlr copyright and conditions). Any other alternatives out there? It's been some effort, but I've actually been able

OpenNETCF Signature control question

眉间皱痕 提交于 2019-12-04 04:43:12
问题 I am using the Signature control in OpenNETCF. It works great for most everything I need. However, I need a way invert the signature and load it back in. It has a call to get the "bytes" for the signature ( GetSignatureEx() ). It returns a byte[] of the signature. This signature can then be loaded back in with LoadSignatureEx() . I can't seem to figure out the system for these bytes. I thought they may be coordinates, but it does not seem so now. If anyone out there knows a way to invert the

TargetInvocationException: Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)

余生颓废 提交于 2019-12-04 04:00:06
问题 I get a TargetInvocationException randomly when loading Resources in my .NET Compact Framework 3.5 project (running on Windows Mobile 6). They look similar to this stack trace: FATAL 2012-11-13 14:17:00,657 [23768895] TargetInvocationException - mobileX.MIP.Post.Presentation.Program System.Reflection.TargetInvocationException: TargetInvocationException ---> System.Exception: Exception at Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar) at System.Drawing.Bitmap._InitFromMemoryStream

How can I unselect item in ListView?

自作多情 提交于 2019-12-04 03:01:35
问题 I have a ListView with a couple of items in it. When the ListView looses focus, the last selected ListViewItem is still "selected" with a gray background. I would like to achieve that on ListView.FocusLost, the selection is gone and therefore the ListView.SelectedIndexChanged event will occur. Any ideas? I am using .NET CF 3.5. 回答1: Suppose you are accessing the ListView from a parent form/control. You can add this piece of code in the form's/control's constructor/load event: this.myListView

.net Compact Framework 4.0

穿精又带淫゛_ 提交于 2019-12-04 02:34:55
Will their be a new release of the compact framework with VS2010 and .net 4.0 and if so what new features will it include? WPF? linq to SQL? etc Visual Studio 2010 only supports developing for windows phone 7. This is a silver light based framework, it does not support win forms or native code. VS2010 can not be used to develop for Windows Mobile 6.5 or lower. You can however install VS2008 along side VS2010. From what I heard from guys in redmond, there will be a mobile silverlight platform for both windows mobile and nokia (symbian, I think). The "silverlight mobile" platform should be built

Detecting USB Connection — C# .Net CF 3.5

China☆狼群 提交于 2019-12-04 02:22:10
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.CradlePresent to detect the connect/disconnect from the USB? Or do I need to explore other options to detect the

Milliseconds in DateTime.Now on .NET Compact Framework always zero?

岁酱吖の 提交于 2019-12-04 01:56:52
i want to have a time stamp for logs on a Windows Mobile project . The accuracy must be in the range a hundred milliseconds at least. However my call to DateTime.Now returns a DateTime object with the Millisecond property set to zero. Also the Ticks property is rounded accordingly. How to get better time accuracy? Remember, that my code runs on on the Compact Framework, version 3.5. I use a HTC touch Pro 2 device. Based on the answer from MusiGenesis i have created the following class which solved this problem: /// <summary> /// A more precisely implementation of some DateTime properties on

Generics where T is class implementing interface

半腔热情 提交于 2019-12-04 01:11:40
I have a interface: interface IProfile { ... } ...and a class: [Serializable] class Profile : IProfile { private Profile() { ... } //private to ensure only xmlserializer creates instances } ...and a manager with method: class ProfileManager { public T Load<T>(string profileName) where T : class, IProfile { using(var stream = new .......) { var ser = new XmlSerializer(typeof(T)); return (T)ser.Deserialize(stream); } } } I expect the method to be used like this: var profile = myManager.Load<Profile>("TestProfile"); // class implementing IProfile as T ...and throw compile time error on this: var

How do you get the proper mapping name from a binding source bound to a List<T>, or an anonymous type, to use on a DataGridTableStyle?

限于喜欢 提交于 2019-12-03 23:32:49
I'm trying to create a DataGridTableStyle object so that I can control the column widths of a DataGrid. I've created a BindingSource object bound to a List. Actually it's bound to an anonymous type list created though Linq in the following manner (variable names changed for clarity of what I'm doing): List<myType> myList = new List<myType>(someCapacity); . ...populate the list with query from database... . var query = from i in myList select new { i.FieldA, i.FieldB, i.FieldC }; myBindingSource.DataSource = query; myDataGrid.DataSource = myBindingSource; Then I create a DataGridTableStyle

Lambda Expression for “not in”?

点点圈 提交于 2019-12-03 22:27:28
I have a detailcollection collection in which every detail has code, price, name And a string with some codes string codes = "1,2,3"; I know I can get an array using string.Split() string[] codesarray = codes.Split(','); But how can I get products not in codes ? // the idea I have, but I would not like to have a loop for (int i = 0; i < codesarray.Length; i++) { detailcollection.Where(x => x.ope_idsku == codesarray[i]) } I would like something like: detailcollection.Where(x => x.ope_idsku not in (codesarray)) Selected details collection items which ids are not in codesarray : detailcollection