.net

How do I visualize a complex graph in .Net?

I need to visualize a graph of this kind. I don't know how to name it (by the way, if you know - I'll appreciate if you tell me). It would be ideal for graph elements to be clickable (so that when user clicks on a block, I can handle an event with the element id specified) but I can survive even without any interactivity. I may like to b...

Copying a 14bit grayscale image (saved in long[]) to a pictureBox

My camera gives me 14bit grayscale images, but the API's function returns a long* to the image data. (so i'm assuming 4 bytes for each pixel) My application is written in C++/CLI, and the pictureBox is of .NET type. I am currently using the BitmapData.LockBits() mechanism to gain pointer access to the image data, and using memcpy(bmpDat...

Beanshell equivalent for .Net

Is there anything like Beanshell, which exposes CLR classes instead of Java classes, and lets you write scripts in C# or VB.Net (or any .Net language for that matter) Should come in handy to test one-liner code snippets ...

Why is my WPF splash screen progress bar out of sync with the execution of the startup steps?

Hello, I've implemented a simple WPF splash screen window which informs the user about the progress of the application startup. The startup steps are defined this way: var bootSequence = new[] { new {Do = (Action) InitLogging, Message = "Init logging..."}, new {Do = (Action) InitNHibernate, Message = "Init NHiberna...

How to use *.lib file in C# application?

So I have some .lib file (generated like this one) How to use it from my C# WPF application? ...

ASP.NET MVC Ajax: Passing an IList from the View to the Controller

I need to pass the grid rows from the view to the controller using POST. The idea is to pass an IList of objects (people) that have the following structure: String Name String Address String ID I want to read the data from the JQGrid and pass it to the controller to fill the IList. I'm trying to build the data object to pass through...

In what location does a .NET app look for .NET assembly file?

In what location does a compiled .net app look for .NET assembly file? If the assembly file is not found in the application folder and not found in the GAC, where else will it look? ...

1:1 Mapping in Fluent nHibernate

Hi, Having a few problems with nHibernate, thought I'd check I'm not being an idiot before delving deeper into the problem. I have two objects a Page and a Schedule which are related in a 1:1 manner. Page has a Schedule_Id field which related to the Id on the Schedule table. The Page object has a Schedule object set up as a property. H...

Design time license failure in FIPS validated .NET framework

We use ComponentOne controls in our Winforms application for .NET 2.0 and we have a problem when we attempt to use it on FIPS validated platforms - the licx file seems to fail and the control creation fails and even the ComponentOne activation seems to fail. Is there a workaround for this ? ...

Linq2Sql - attempting to update but the Set statement in sql is empty

This is weird ... done updates loads of times before but cannot spot why this is different. although I am using .net 4.0 now - however i doubt its a bug in its L2S implementation. Its not like this is a wierd and wonderful application of it. Although i am fairly sure this code worked whilst i was using the RC. I have also managed to rep...

What's the best free open source alternative to MS Team Foundation Server?

I have a team developing software in MS Visual Studio and now they want to start using MS Team Foundation Server, mainly for versioning and maybe patch and bug tracking. They don't have any experience with MS Team Foundation Server, but they are very enthusiastic with MS products. So whats the best free open source alternative solution? ...

[ADVICE] .NET Desktop Application - Client Server C#, SQL

Hi guys, Recently I've being given a chance to develop a PMS (Practice Management System) software for a small physiotherapy clinic. I'm a computer science student and my course is predominately told on Linux. However, my client runs all their computers on vista or Windows 7. My ideas are to develop the client front end in Visual C# ...

else or return?

Which one out of following two is best wrt to performance and standard practice. How does .NET internally handles these two code snippets? Code1 If(result) { process1(); } else { process2(); } Or Code 2 If(result) { process1(); return; } process2(); ...

C# Drawing 2D objects with events

I need to draw several simple objects (polygons composed by lines and arcs, eventually placed on different layers) inside a form (or any other container) and then handle events like: right click on object zoom pan Is there a library/framework that can handle my need or do I need to create my own? EDIT FOR CLARIFICATION: My polygon...

Ideas on C# DSL syntax

Hi, I am thinking about implementing a templating engine using only the plain C#/.NET 4 syntax with the benefit of static typing. Then on top of that templating language we could create Domain Specific Languages (let's say HTML4, XHTML, HTML5, RSS, Atom, Multipart Emails and so on). One of the best DSLs in .NET 4 (if not only one) i...

About SQL Server security

I have an ASP.NET application which runs under the Classic .NET AppPool in IIS. I have a report to render from my website. The problem is SQL Server keeps telling me that it failed to create a connection to the datasource, because login failed for user IUSR. After adding that user directly to the databse I could get the report to work...

Silverlight caching HTTP POST which results in a 404

Situation: I am developing a Silverlight-Application which needs Component based on a local HTTP Listener. The HTTP-Listener can't be 'required' to be installed and running when the Application starts, so the Application does the following: Handshake via HTTP POST If Connection failed open a Click-Once Setup to install the component....

COM port - how to identify a device (.net/c#)

Hi, I'm programming for Windows CE and I need to connect to a scanner. There is no problem - I know that it is on port COM0, but if I plug in another device earlier it gets another COM port... to get all com ports the easy way is: SerialPort.GetPortNames() But I don't know how to identify a device? Is there any standard way? I can't ...

How to change font color in .net 4 Chart

I want to change font of labels for this chart: How to do it in C#? ...

Screen Text size in .NET

Is there a way to know if the text size is at 125% from .NET/C#? The setting comes from Control Panel\Appearance and Personalization\Display ... ...