.net

Windows Form MVC

Hi, I am building a Windows form application using .NET 3.5. I would like to use the MVC design pattern. The app has two forms: a quick launch and a view showing the details. The quick launch just has a tree with 2 levels, so the tree structure looks something like Category 1 Subcategory 1-1 Subcategory 1-2 Category 2 Subcategory 2-...

MSBuild Conditional Imports

Is there a workaround for conditional imports in MSBuild? I've found evidence here and here detailing a bug in the MSBuild IDE interface. In particular, Import statements do not reload when building: This is a known limitation. VS will only ever process the tags once, when the project is loaded. So whatever tag is active at the...

Inserting Variable into Inline XML in VS2008

so i have some inline XML Dim x As XElement = _ <parent> <child></child> </parent> what I want to do is get some variables that have been set into that xml Dim v as string = "Blah" Dim x As XElement = _ <parent> <child>{v}</child> </parent> Is this possible? I...

What is the most efficient way to compare/sort items from two arrays?

I have a question about efficient implementation. Lets say I have two arrays: One array is all possible items in a house: Table, Chair, TV, Fireplace, Bed The other is an array of items in a particular house: Table, TV, Bed I also have two list boxes: 1. listbox for items in the house - the "HAS" list box 2. listbox items not in ...

POS for .Net Check Printing

We currently have check printing fully implemented and in the field for a POS application. It runs on Windows, implemented in C# and uses POS for .Net. We are having an issue where cashiers are too eager and pull out the check a second or so before it is finished franking. If the check is pulled out during the printing process, we can...

How to remove focus from a textbox in C#/WinForms

I need to remove the focus from several textboxes; I tried using: textBox.Focused = false; but the property is read only. I then tried setting the focus on the form, so as to remove it from all the textboxes, but this also fails to work: this.Focus(); and the function returns false when a textbox is selected. So; how do I remove fo...

How do I find the currently selected (or active) Row in an UltraGrid

Using the Infragistics UltraGrid (e.g. myGrid), I want to: Hook an event that will fire when active row is changed (selected, clicked, etc). Do something with the selection SUMMARY ANSWER Subscribe to event AfterRowActivate Get a reference to myGrid.ActiveRow ...

Auto sizing zoom on an image in .NET

Hello, I'm considering a personal learning project. Using .NET(preferably VB) I want to build a simple desktop app that's only function is to display comics, like CDisplay, but with more advanced navigation. I want to be able zoom in by clicking on certain areas of an image, individual panels for instance, and have the zoom area automa...

Hosting browser in WPF

Is it possible to host any other web browser beside IE in WPF desktop application? Edit: If yes, how? ...

Returning JSON AND XML format from a .NET 3.5 WCF web service (REST)

I have an existing web service that returns XML responses and I would like to add some new methods that return JSON. Do I have to create a separate web service that returns in JSON or can I have a mix? If I use the ResponseFormat = WebMessageFormat.JSON I need to have the service annotated with [DataContractFormat] but I cant seem to ha...

Auto start click once application in a silent mode

I have an application that uses click once to deploy, and I have managed to get the application starting when a user log's in. My issues is that I need the application to start up hidden (I don't want a user to have to minimize it until they require it - I want it to sit in the system tray). Prior to using click once I simply checked th...

Running Async IO threads to completion in same order as received

Sorry, I am very new to all this multithreading stuff... I'm working on a client/server app and I'm going to use System.Net.Sockets.NetworkStream's Async IO methods. I'm aware that after calling BeginRead, the system will start calling my callback every time it receives data. The callback could take a significant amount of time to co...

Create an app.config for an Assembly

I have a .NET assembly for a COM-visible component that I want to use some configurations. I know that applications use the app.config, but is it a violation of best practices to create and use an app.config for my assembly?? ...

Convert .NET syntax into PHP using SoapHeader() call

Hi, I need to convert this .NET syntax into PHP using SoapHeader() call. esb.RequestServerVersionValue = new RequestServerVersion(); esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1; Thanks a lot! :) ...

(.net) How to check if a given variable is defined with an attribute

Hello. I'd like to know if my textBox1 variable has the ABCAttribute. How can I check this? ...

.NET IoC Container Comparisons

With so many IoC containers is there a decision matrix to help in narrowing them down based on features, supported platforms, etc.? ...

Bug in: System.Web.UI.Page.InitOutputCache() or in System.Web.Mvc???

Hi guys I'm using asp.net MVC with output caching (the OutputCache attribute) on some of my controller methods and am getting some really weird results in the HTTP headers. When I add the attribute to the controller action that handles the main page view. the following header is produced: Date Thu, 16 Jul 2009 23:0...

Silverlight .NET RIA Project Structure

I am starting a new Silverlight 3 RIA application. Historically when doing my web development I have a solution with the following project structure. Core - Generic and misc stuff. Model - Domain model in nHibernate Services - Business logic, services and repositories Web - Web using MVC With my new project in Silverlight RIA it by d...

How can I get notifications from the clipboard?

Is there a way to be notified when the content of the clipboard changes? I looked a class "Clipboard". It has numerous methods to set the clipboard content but no event. ...

SSIS with COM Interop fails when run as a scheduled job

I have an SSIS Package that utilizes a COM Interop (Interop.RFCOMAPILib.dll) around RightFax's COM API (rfcomapi.dll). The Interop assembly has been GAC'd so that we can use it within the SSIS package The package runs just fine on my local machine. But it also works just fine on the server if it is manually started (meaning all of the ...