.net

WCF project setup and dependencies

What's the most common/best way to setup a WCF service project and applications? Here's an example: Solution: "MyProject" Class Library: "MyProject.Common" Contains ServiceContract interface, and any DataContracts Class Library: "MyProject.Impl" Contains implementation of service contract, and a client class that can be used to cal...

C# Generics methods and returning a object of a parameterized type created in the method from xml

Hi, I have a method where I would like to return an object instance of parameterized type T ie. Foo<T>. The type T is instantiated within the method using GetType(), from a string element in an XML file. Since neither the class or method knows about it before it is created, I cant parameterize either. Is there a way I can return an o...

Should I Use a Code Coverage Tool?

I'm interested in using a code coverage tool for my next .NET project but was wondering if it is necessary for me? I'm the only developer in the company I work for, so would using NCover be a benefit to me or is it just for large teams using continuous integration? Thanks ...

NHibernate open source POC

Are there any open source projects that use NHibernate and which serve as a proof of concept for NHibernate. I'm looking for concrete proof of NHibernate's ability to meet enterprise standards in terms of performance and scalability mainly. Especially interesting would be use of batching. I'm not sure how synched NHibernate and Hibernat...

Scalable web application with lot of image servings

I started working on a web application. This application needs lot of image handling. I started off with PHP as it was the easiest and cheapest to host. I have used the .NET framework for some of my previous applications and I'm very comfortable with Python. But I'm not at all comfortable using PHP now, so I have decided to use somethi...

Embedding Mono in Delphi Win32

Does anyone know the specifics of how to embed the Mono runtime in a Delphi Win32 application? The official documentations is not very helpful with regards to the Win32 environment (www.mono-project.com/Embedding_Mono). Upate: I am very familiar with the vagaries of static linking in Delphi and would be perfectly happy with a DLL. Mono...

catch a user control event

hello, ive created a user control keyboard.. when you click on abutton in the keyboard the button_click event is thrown and a string is get a parameter example when clickin on button C CButton_Click { txt="C"; } i need to catch that event outside the user control... so that when clickn on the button a textbox is filled with the string....

Timespan to string problem in LINQ query

Hi I have noted that if I use TimespanObj.ToString() the it gives me perfect output like 12:33:00. But I use following linq query. var time = SomeSimpleQuery.Select(t => new { time = t.FromTime.ToString() }); where FromTime is time(7) in SQL Database and Timespan in LINQ-TO-SQL Class (by Default). Then I get the output having forma...

Rhino Mocks nant error

Im trying to create a small app using .net 2.0 (client requirements :p), and I have added a reference to the Rhino Mocks dll file, then compiled it using VS2008, all good. But when I run ant on the project, I get the following error: [nunit2] SetUp/TearDown Failures: [nunit2] 1) DocGen.Test.TestDocumentConfigurator : Could not load ...

Can you recommend an Application Framework for Windows Forms?

Do you know some higher level Framework Library which sits on top of Windows Forms? Tasks: Command Management Master/Detail Form Management Record Navigation Input Validation etc. Of course, I could do this all by myself but I don't want to reinvent the wheel. (sorry for my broken english!) ...

How would you use a DVCS (mercurial in my case) to develop for different versions of the .NET framework?

I'm writing some sort of new adminstration dashboard for our cms (which runs on asp.net webforms). Some of our older servers can only handle .NET 2.0 for various reasons so I'd have to rewrite my code which uses lambda expressions etc. for that. I wonder how you would use a dvcs like mercurial to develop those two versions concurrently....

Can I use RSACryptoServiceProvider public/private keys to interop with Crypto++?

I've created a public/private key using RSACryptoServiceProvider and saved it as XML. I can use this to encrypt/decrypt/sign and verify data in .NET. I have another application which is intended to run on a Linux server. I'm developing it in C++ and I'm using Crypto++ for my cryptography needs. I want to share data between these two a...

Changing the standard blue color of the form's control box in .NET winfroms

Hi is there a way I can change the color of the form's controlbox in a .NET winform application i.e the box the has the close-minimize-maximize buttons? I need to change that blue color to match the colors of the different controls within that form. Thanks in advance ! ...

How do I run Command line commands from code

I need to do 2 things: run a batch file (works fine), and run a command (does not work). The method for the command throws the exception 'file not found'. If I open a cmd window, and type the command, it works perfectly. private static void Rescan() { //System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.Proce...

Alternative to Geneva Framework

Are there any alternatives to Microsoft Geneva Framework (preferably open source). We have planed to use it in production environment, but it looks like that Microsoft has license that doesn't allow that while the Geneva Framework is in beta. ...

Code-First or Database-First, how to choose?

Let us suppose we are going to start new project - application that contains some business logic, user interface on ASP.NET, WPF or both of them. We'd like to use ORM or DAL code generator and implement our business logic in .NET classes. There are several fundamental ways how we can express our ideas of business domain: Implement busi...

ReportViewer control loading indicator?

Hi Is it possible to change the image (the green spinning thing) of the ReportViewer control? At the moment I am hiding it and overlapping a progress bar (this is WinForms not the ASP Control)... Seems a bit long winded? Thanks :) ...

How can I find an item in a WPF ListBox by typing?

Most list boxes allow you to find items within them by typing the first letters of the displayed text. If the typed letters match multiple items, then you can keep adding letters to narrow the search. I need to do this in a WPF ListBox. However, the items aren't plain strings -- they're custom objects that I present using a DataTempla...

.Net get image from the clipboard at the same time other applications are reading/writing from it?

I have a .net application that monitors the clipboard every 100ms for an image that is taken from a camera (from a different application) and displays it in a picture box. However, occasionally the program that writes the image to the clipboard gets an error saying "Can't Open Clipboard". This only happens when the .net application i...

Capturing still images using AMCAP ?

Hello folks, I am developer from *nix world so any pointers will be helpful. I am using the AMCAP SDK example and have to capture live preview and still images. I understood the code for getting live preview. Now how can I capture an image at runtime from the gcap data structure ? Mind you the application has to do some real time image...