.net

how to change the color of the item when the checkbox is unchecked in c#.net?

i want to change the forecolor of the checked item when it is unchecked.. for checked item i have used item.checked but what to do if it is unchecked? im using winforms ...

bundle .NET dlls to run application in .NET-less machine?

AFAIK, ngen turns MSIL into native code (also reffered to as pre-JIT), however I never payed too much attention at it's startup performance impact. Ngen'd applications still require the .NET base class libraries (the runtime). Since the base class libraries have everything our .NET assemblies need (correct?) would it be possible to ship...

populating object collection property with Linq

I have an XML structure that has many doc nodes, and each node may have zero or more extract paragraphs (paras). <doc> <docitem>3</docitem> <docid>129826</docid> <doctitle>sample title</doctitle> <docdatetime>2009-07-03T16:59:00</docdatetime> <collectdatetime>2009-07-03T16:59:23</collectdatetime> <summary> ...

How to turn off pdb generation and vshost for all Release builds

Every time I start a new piece of software I have to go into the configuration and turn off pdb file generation and the Visual Studio hosting process for Release builds. Is there any way to tell Visual Studio (2008 specifically) that I want to do that for all projects for the rest of time? ...

Possible to compress SQL Server network traffic?

I have a .NET client that needs to connect to a remote SQL Server over the WAN, is it possible to compress SQL traffic between the client and the server? I am using .NET 3.5 and SQL Server 2005 and greater. ...

Microsoft Accelerator Divide Operation

I would like to perform a fairly simple divide operation in Microsoft Accelerator: X = P / (1 + K * O') where P, K and O are vectors, and K * O' performs a dot product operation. I tried PA.Divide(P, 1 + PA.Sum(PA.Multiply(K, O))), however this does not work as it gives an error saying the matrices supplied to the divide command are ...

How to hook keystroke to change from "C" to "Ctrl+C" in .NET ?

In specific time period, when user presses "C" I want it to happen as user presses "Ctrl+C". Actually, whatever key user presses the program should adds Ctrl with it. DO you know how to do that .NET ? I've look around for changing KeyEventArgs.KeyData but it cannot be set. ...

Embed resource in a .NET assembly without an assembly prefix?

When you embed a resource into a .NET assembly using Visual Studio, it is prefixed with the assembly name. However, assemblies can have embedded resources that are not assembly-name-prefixed. The only way I can see to do this is to disassemble the assembly using ILDASM, then re-assemble it, adding the new resource -- which works, but... ...

.NET desktop App remembering login to a webservice

I am in the planning stages of a .NET desktop app that will communicate with a web service. The web service requires a username and password, and a common feature in this sort of app is to save the user's credentials for the next logon (just a simple 'log me in automatically' checkbox). I've thought of a few ways of achieving this, but ...

WCF Service Throttling

Dear All I have a WCF Service Deployed in a Console App with BasicHTTPBinding and SSL enabled on port using NetSH command and more over following attribute is set as well. [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)] And also i have set the Throttling behavior as <serviceThrottl...

.NET Framework 4 RTM on Windows server 2008 R2

I've just installed .NET 4 on Windows SErver 2008 R2 x64 and I am getting 500 Internal Server Error with an ASP.NET MVC application which was previously running fine on 3.5. The application was upgraded from targeting 3.5 to target 4 and I personally built it today on my development machine (changed in VS - Properties to .NET Framework 4...

String Comparison containing hyphens not matching

I have a method in a url rewriting module that looks like this public bool Match(Uri url) { string x = url.PathAndQuery.ToLowerInvariant(); string y = RuleData.ToLowerInvariant(); return x.Contains(y); } However, it is not returning true for the following values: x = "/xx09-02-09xx"; y = "09-02-09"; but if I writ...

Any suggestions on Internationalisation resources?

I'm looking for resources on internationalisation in .NET for the more recent technologies - ie, WPF, Silverlight, .NET 4.0 etc. Does anyone know any good blogs, websites, or books on this subject? ...

How can you increase timeout in Linq2Entities?

I'm doing a basic select against a view. Unfortunately the result can be slow and I'm getting timeout errors intermittently. How can I increase the timeout? Using .NET 3.5, Sql Server 2000, Linq2Entities I'm using the very basic query List<MyData> result = db.MyData.Where(x.Attribute == search).ToList(); Fixing the query so that it'...

Resharper Unit Test Runner executes unit tests sequentially or in parallel?

I would like to know if Resharper Unit Test runner runs unit tests sequentially or in parallell (each on its own thread). I am using MBUnit test framework. Thanks. ...

how to get count of '#' in a string ?

how do I get the count of the occurrences of '#' in a string ? something like int RowFormat = drr[3].ToString("#").Length; example string "grtkj####mfr " RowFormat must return 4 and yes ^_^ .NET 3.5 ...

Point of sale app architecture advice

hi everyone! I need to develop a point of sale app that will be used on several locations. In every location it will be use a single database and it will be, in another location a master database with all cashflow and inventory moves. The restriction is that the available internet connection between nodes is very poor, so in certain way ...

Preview PDF in C#

I'm looking for .NET GUI component (different than PDFsharp) allowing preview PDF 1-page document. Basically I need something similar to PictureBox where I can load bitmaps and show it. It would be great if that component allows zooming and moving picture inside. Freeware solutions preferred :) ...

URL losing port number in every page load

I'm currently taking care of a certain local website. The default port has been changed, and can no longer be not included in the URL due to technical reasons, so now i'm using a certain port in the end of the IP at the URL, for example 100.100.100.100/website.aspx no longer works (which accessed 80 by default) 100.100.100.100:81/we...

WPF Document Production Best Practices

I have a WPF application that captures various bits of information. At some point the user will need to generate a letter using a specified template and adding custom content. So far my application merges data capture with the document template (MS Word 2007) and launches the merged document so that the user can then print, save etc usin...