.net

Windows Mobile 6.5 modern GUI development

Hello How to approach a modern GUI development in Windows Mobile 6.5. I can see in .NET CF 2.0/3.5 only legacy common controls, no alpha blended controls, no fading etc. Comparing to Android or Symbian, Windows Mobile 6.5 look-a-like of applications is very elderly. Is there support for WPF in Windows Mobile 6.5? Thanks and Regards Do...

Silverlight Assembly.Load() only works with the full/strong name

Apparently the implementation of Assembly.Load() in Silverlight needs a full/strong name. E.g. this works: Assembly.Load("MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=..."); while this will fail even if MyAssembly is already loaded: Assembly.Load("MyAssembly"); Is there a workaround so that it's possible to use the...

How can I implicitly convert another struct to my Type ?

Hello, As it is MyClass x = 120;, is it possible to create such a custom class? If so, how can I do that? ...

Potential for SQL injection here?

This may be a really dumb question but I figure why not... I am using RIA Services with Entity Framework as the back end. I have some places in my app where I accept user input and directly ask RIA Services (and in turn EF and in turn my database) questions using their data. Do any of these layers help prevent security issues or should ...

Fix for Visual Studio 2005 not showing filename or line on errors in web pages when compiling?

A project I'm on requires Visual Studio 2005. One annoyance is that when a website project in the solution, any compile errors from .aspx or .ascx files show up like: (0,0): warning CS0168: The variable 'ex' is declared but never used (0,0): warning CS0162: Unreachable code detected (0,0): warning CS0168: The variable 'ex' is declared...

Get FixedDocuments out of a FixedDocumentSequence

Fairly simple: I have an XPSDocument that I am pulling off of disk. I would like to get the FixedDocuments out of this XpsDocument, but I've hit a bit of a cropper since I can only get a FixedDocumentSequence, and I can't work out how to pull the XpsDocuments from this sequence. So far I've tried something like: FixedDocument doc = (F...

asp.net server controls

Okay i have a custom server control that has some autocomplete settings, i have this as follows and it works fine. /// <summary> /// Auto complete settings /// </summary> [System.ComponentModel.DesignerSerializationVisibility (System.ComponentModel.DesignerSerializationVisibility.Content), PersistenceMode(Persiste...

Where can I get the Microsoft.SqlServer.Mso.dll & Microsoft.SqlServer.ConnectionInfo?

I can't seem to find these anywhere, I want to do some SMO stuff. I am using VS 2010 Ultimate and SQL Express 2008; thank you. ...

Hundreds of custom UserControls create thousands of USER Objects

I'm creating a dashboard application that shows hundreds of "items" on a FlowLayoutPanel. Each "item" is a UserControl that is made up of 12 or labels. My app queries a database and then creates an "item" instance for each record, populating ethe labels and textboxes with data before adding it to the FlowLayoutPanel. After adding abou...

LINQ-to-entities changeset references object type

After objects get committed to the db, I sometimes want to update a separate index. The simplest version is something like: if(ChangedObject.getType() == typeof(User)) Update(((User) ChangedObject).UserID); The problem is, if it's a related table, then the changed object won't be of the type User, just one of its properties will. ...

Subversion Question - How to skip a revision...

So say I have the three latest revisions of an aspx file: 55,56, and 57. Revision 56 added a feature that I want to remove, but I also want to have the new features deployed in version 57. Is there any way I can merge version 55 with 57, leaving revision 56 out of the picture? If it matters, I'm using Tortoise SVN and Visual SVN, but I...

Change log4net conversion pattern or layout at runtime

I'm using the LogInfo() method to log to a rolling flat file, but I need to change the conversion pattern or pattern layout (whatever you want to call it) temporarily when calling it in a certain circumstance. Is this possible? ...

IoC - Dynamic Composition of object instances

Is there a way using IoC, MEF [Imports], or another DI solution to compose dependencies on the fly at object creation time instead of during composition time? Here's my current thought. If you have an instance of an object that raises events, but you are not creating the object once and saving it in memory, you have to register the eve...

How to serialize and unserialize to/from a C# class?

Hello, I have an object in Javascript that looks like this function MyObject(){ this.name=""; this.id=0; this..... } I then stringify an array of those objects and send it to an ASP.Net web service. At the webservice I want to unserialize the JSON string so I can deal with the data easily in C#. Then, I want to send an array of...

Avoiding resource (localizable string) duplication with String.Format

I'm working on a application (.NET, but not relevant) where there is large potential for resource/string duplication - most of these strings are simple like: Volume: 33 Volume: 33 (dB) Volume 33 dB Volume (dB) Command - Volume: 33 (dB) where X, Y and unit are the same. Should I define a new resource for each of the string or is it ...

Write a .Net wrapper around AdbWinApi.dll

I'm trying to write a wrapper around Android's AdbWinApi.dll. I've run dumpbin on the DLL and found a number of entry points. The problem is I don't really understand how to use those entry points and tie them up to the ADB API. What is a good starting point to write this wrapper? ...

How to implement MVP pattern for a tabcontrol?

I have an application that has a tabcontrol with 5 tabpages of information that user interacts with. Also, there are contextual menus and toolbars for editing and formatting the information. Do I create a different view & presenter for each tab page or the tabcontrol iteself? How do I apply the pattern to the toolbars and menus that ca...

How to replace one object with another everywhere in the program?

I don't really think there is some method to do this… Anyway… How can I replace one object with another everywhere in the program? It would be like all the references to an old object start to point to a new one. ...

How can I implicitly convert my class to another type ?

For example implicitly MyClass myClass = new MyClass(); int i = myClass; ...

Total Number of records required in paged .NET datagrid control

I am using a data grid and has bound a data source with it. I am trying to get the total number of records in the grid in overriden InitializePager method from pagedDataSource DataSourceCount. I thought DataSourceCount returns number of records from SelectCountMethod of ObjectDataSource, but DataSourceCount is giving me the page size...