.net

Creating vista style controls in .NET

OK I would like to know this once and for all, how can I create "vista-style" controls from within .NET? I am using .NET 3.5 SP1. The most important control I am attempting to spawn is the new enhanced message dialog which looks like this: I am attempting to follow guidelines laid down here (http://msdn.microsoft.com/en-us/library/aa5...

C# Filepath Recasing

I'm trying to write a static member function in C# or find one in the .NET Framework that will re-case a file path to what the filesystem specifies. Example: string filepath = @"C:\temp.txt"; filepath = FileUtility.RecaseFilepath(filepath); // filepath = C:\Temp.TXT // Where the real fully qualified filepath in the NTFS volume is C:\T...

.NET MVC: How to create form from controller?

In .NET 3.5 winforms, I've created an MVC. I'd like to take the controller part and put it into a separate assembly, so that it has no knowledge of the view. My app uses five forms in its view. The controller takes care of initializing the forms at different times, which means the controller has a reference to the view (something I'd ...

WPF translation transform

How can i get the new bounds after applying a translation transform to a WPF mesh geometry 3D? ...

How can I tell if a file has changed through .NET?

Hello World! I am looking for a way to determine when a particular file has changed, through .NET. (What I ultimately want is functionality that makes a copy of the file as soon as it has changed.) How can this be done? ...

DLLs, memory mapping, base address, memory usage, and .NET?

Before I start with the real question, let me just say that I might get some of the details here wrong. If so, please arrest me on those as well as, or even instead of answering my question. My question is about DLLs and .NET, basically. We have an application that is using quite a bit of memory and we're trying to figure out how to mea...

Modeling Entities with Things in Common: Super-type/Sub-type?

I will be using LLBLGen to generate a model, however I don't want to solve my design issues by just using whatever built-in inheritance tools it has. I want the model to make sense regardless of the OR/M tool. So, I have several different kinds of entities that can have addresses and each entity can have multiple address (primary, maili...

What is the proper use of keyword 'this' in private class members?

When should the keyword 'this' be used within C# class definitions? Is it standard to use the form "this.Method()" from within class? Or to just use "Method()"? I have seen both, and usually go with the second choice, but I would like to learn more about this subject. ...

Is it safe to remove previous versions of the .NET framework?

Hello. I've just installed the 3.5 .NET Framework and while doing some cleaning I've notice that I have a lot of older versions installed (1.1, 1.1 Hotfix(xxx), 2.0, 2.0 service pack etc...). I wonder if I can safely dispose of all of them or these are needed in case I run a lower version .net application. Thanks in advance. This is a ...

WPF .NET Best way to trigger an event every minute

I have an app that needs to check a database table every minute. The table is indexed by the time of day and so the app needs to run this check every minute. What's the best of way of doing this? I can create a background worker thread but if I set it to sleep for 60 secs after each check I will eventually miss a minute because of the...

Implementing pure xaml workflows with some requirements

Hello, I'm currently charged of developing a way to use WF in our application and I have a set requirements that I need to follow. I need to be able to define the workflow purely on text so I can store it and retrieve it for execution. During the workflow execution a DataObject needs to be passed between the activities so they can per...

How to configure the limit of concurrent requests to a remoting server with TcpChannel

I have a standard Remoting server with an underlying TcpChannel: IDictionary props = new Hashtable(); props["port"] = portnumber; TcpChannel channel = new TcpChannel(props, null, provider); ChannelServices.RegisterChannel(channel, false); string url = string.Format("AgentHost", portnumber); RemotingConfiguration...

Linq - sum child field value when child records query ganareted by diffrent func

Hi, I have order - items tables. so I want to display on some grid all the orders info including a col like total_items There is a premetive working way. like this: TotalQuantity = (from i in _db.ProposaItems where i.ProposaID == p.ProposaID select i) .Sum(q => q.Quantity) But this is not the way I want. I want to use 2 func...

How can I learn CSLA.NET Fast?

I'd like to learn CSLA.NET quickly. What advice do you have? ...

How do I convert a DataTable to an IDatareader?

We all know that DataReaders are quicker than DataTables since the a DataReader is used in the construction of a DataTable. Therefore given that I already have a DataTable.... Why would I want to convert it to a DataReader? Well I am creating an internal interface called IDataProvider. This interface is intended to be implemented both ...

is it possible to edit the text in a listview column?

Is it possible to edit the text in a listview sub-item column in a report view? In other words integrate a combo box or a textbox to facilitate input ...

Testing Custom Control derived from ComboBox

I've created a control derived from ComboBox, and wish to unit test its behaviour. However, it appears to be behaving differently in my unit test to how it behaves in the real application. In the real application, the Combobox.DataSource property and the .Items sync up - in other words when I change the Combobox.DataSource the .Items l...

Renewing a WCF client when SCT has expired?

I am using WCF to a soap endpoint using security mode "TransportWithMessageCredential". The WCF client/server uses SCT (Security Context Token) to maintain a secure connection, and it is working as intended in the general case. However, after a period of inactivity, the SCT will be expired and the next method call will cause a MessageS...

In a .NET service application, where do I add the functions that it should perform?

I know how to "create" a Service application. I know what to write in the main() function. I know how to add an EventLog (or other components) to the service. I know how to define what happens when the service starts, stops or resumes. What I want to know is this... I want my Windows Service to perform certain function (like Indexin...

Upload images to SQL Server 2005 using ASP.Net MVC?

Hi there, I know there is a way to upload images to the database as image type or varbinary type, however, I searched around the entire week, I am unable to find anything that can help me, so this is really my last resort, if anybody know how to upload images to the database, I am using SQL Server 2005 Express. Thanks ...