compact-framework

WebRequest with POST-parameters in .NET Compact Framework

风格不统一 提交于 2019-12-09 23:55:44
问题 I'm trying to do an HTTP POST REQUEST on .NET Compact Framework and I can't get it working. This is what I got: public static string DoPost(string url) { // initialize from variables string responseString = string.Empty; ASCIIEncoding encoding = new ASCIIEncoding(); //// UTF8Encoding encoding = new UTF8Encoding(); HttpWebResponse response; byte[] data = encoding.GetBytes("dummy"); StreamReader reader; HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); //do the processing

.net Compact Framework 4.0

徘徊边缘 提交于 2019-12-09 16:30:54
问题 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 回答1: 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. 回答2: From what I heard from guys in redmond, there will be a mobile silverlight

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

守給你的承諾、 提交于 2019-12-09 14:34:49
问题 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

Lambda Expression for “not in”?

折月煮酒 提交于 2019-12-09 14:29:11
问题 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

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-09 14:20:09
问题 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 };

Value does not fall within the expected range

浪子不回头ぞ 提交于 2019-12-09 14:07:09
问题 Error when trying to display the form designer. See picture of the error: Code of the screen: public partial class frmCanalVenda : frmEdit { public frmCanalVenda(CanalVenda canal, Cliente cli) : base(canal) { InitializeComponent(); bdsCliente.DataSource = cli; eabBar.ReadOnlyView = false; } private void frmCanalVenda_Load(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; bdsAgrupamento.DataSource = Agrupamento.GetAll(DatabaseAFV.Connection); bdsCanal.DataSource = Canal

In C#, how can I tell if a property is static? (.Net CF 2.0)

给你一囗甜甜゛ 提交于 2019-12-09 14:01:51
问题 FieldInfo has an IsStatic member, but PropertyInfo doesn't. I assume I'm just overlooking what I need. Type type = someObject.GetType(); foreach (PropertyInfo pi in type.GetProperties()) { // umm... Not sure how to tell if this property is static } 回答1: To determine whether a property is static, you must obtain the MethodInfo for the get or set accessor, by calling the GetGetMethod or the GetSetMethod method, and examine its IsStatic property. http://msdn.microsoft.com/en-us/library/system

Memory profiler for .NET Compact Framework

假装没事ソ 提交于 2019-12-09 10:45:09
问题 Is there a tool I could use for profiling (memory) a .NET compact framework 3.5 application (Windows Mobile)? Thanks! 回答1: Use the Remote Performance Monitor that comes with Studio. It gives snapshots of the GC heap, traceable roots and much more. 回答2: Equatec supports .NET CF 3.5 回答3: The CLR Profiler also comes with the CF-SDK, and allows to view the heap of a process. In contrast to Remote Performance Monitor it doesn't crash all the time ;-) 来源: https://stackoverflow.com/questions/1048939

How to write a class library that will work on .NET 3.5 compact framework AND regular framework?

廉价感情. 提交于 2019-12-09 09:52:07
问题 How do I write a .NET class library that I can recompile for either the regular .NET 3.5 Framework, or the .NET 3.5 Compact Framework? 回答1: The two frameworks aren't binary compatible*, unfortunately, but don't let that stop you. Create two projects in your solution (one normal Class Library project, and one Compact Framework Class Library project), and add all the files from one project to the other as links by clicking "Add|Existing File" and then checking the "add as link" checkbox on the

Directshow in C# for windows mobile- strategy?

流过昼夜 提交于 2019-12-09 07:41:31
I'm trying to figure out how to add some directshow capabilities to a C# application (.net cf 3.5 running on mobile 6 and up), and I'm having a hard time figuring out how to bridge the gap between using unmanaged c++ class(es) in managed C#. I've already written the functionality I need in C++: Basically, I have a manager class that uses COM to tap into the needed directshow functionality. Quick Disclaimer: I'm new to COM, and I'm VERY new to integrating C++ with C#. I'm really hoping that someone knowledgeable can suggest a basic strategy for me to research further. Here are some that I've