I have a C# (2008/.NET 3.5) class library assembly that supports WPF (based on http://dotupdate.wordpress.com/2007/12/05/how-to-add-a-wpf-control-library-template-to-visual-c-express-2008/). I've created several windows, and am now attempting to create a common style set for them. However, as it's a class library (instead of a WPF app), ...
I'm using C# WinForms to create a level builder for my XNA game. I have a tile grid that you can paint with a Pencil tool, like in MSPaint. The problem is that when you drag the mouse fast(ish) to paint a line tiles get skipped.
I've tried using one approach i saw on Google saying to spawn a thread to do the painting, but that didn't se...
I've worked at two companies that implement ASP.Net two different ways. I tend to lean towards A, but my current job follows the B (more typical) approach. I'm wondering which is best, and also, are there formal names for these implementations?
A) No project or solution was built. We simply pointed Visual Studio to a directory and sta...
How do I determine what account a service is running as from within the service itself.
...
Hi,
I'm trying to create a splash screen that shows assemblies (all referenced library) loading status. I use AppDomain.AssemblyLoad AssemblyLoadEventHandler delegate to catch what assembly is being loaded but the problem is the event is not triggered when the program initializes. I tried register the event handler in application startu...
I'm now using Visual Studio 2008 Pro Edition. I installed Connector/Net 5.2 with Visual Studio integration. I restarted Visual Studio, and MySQL database now appears in the list of data providers. I entered my database information, and clicked "Test Connection" and it succeeds, but when I try to close the Add Connection dialog, I get an ...
In my ASP.NET application, I want to use regular expressions to change URLs into hyper links in user posts, for example:
http://www.somesite.com/default.aspx
to
<a href="http://www.somesite.com/default.aspx">http://www.somesite.com/default.aspx</a>
This is fairly easy using Regex.Replace(), but the problem I'm having is th...
Is there a way to configure what JSON serializer is used when returning JSON via the JsonResult in the controller:
public ActionResult SomeJsonFunction()
{
var x = SomeModelCode.SomeModelFunction();
return Json(x);
}
It looks like the default is the JavaScriptSerializer. I would love to be able to use the DataContractJsonSerializ...
How do I add rows programmatically to a DataGridTable in C#? When the user selects an option, I want to repopulate a DataGridTable with fresh data, which I am acquiring as shown below:
connect.Open();
MySqlCommand comm = connect.CreateCommand();
comm.CommandText = getCustomerInvoices + customerID + "\'";
...
I'm trying to create a plugin for a program. The program works by loading your plugin DLL and executing specifically named functions within that DLL. Pretty standard stuff. However, I'd like to create my plugin in C# (and I am a bit of newbie). My question is, can I export regular C like functions from C#? or How do I easily create a...
Duplicate
Modifying A Collection While Iterating Through It
Has anyone a nice pattern to allow me to get around the inability to remove objects while I loop through an enumerable collection (eg, an IList or KeyValuePairs in a dictionary)
For example, the following fails, as it modifies the List being enumerated over during the forea...
I know this is possible since there are so many packages available where you have a "Standard", "Professional", and "Enterprise" version of a package... but does anyone have any decent tutorials available on how a uISV would go about learning the techniques involved in developing a tiered feature piece of software?
I've done multiple se...
Hi,
I have a windows service that s synchronises 2 databases using Enterprise Servcies.
I t uses a ServicedComponent to do distributed transaction.
I am getting a TransactionProxyException and the problem is intermittent.
ie run the same data a second time and it may not happen.
Anyone know what may cause this exception or guide how ...
I am new to unit testing but am beginning to think I need it. I have an ASP.NET web forms application that is being extended in unforeseen directions meaning that certain bits of code are being adapted for multiple uses. I need to try and ensure that when changing these units I don't break their original intended use. So how do I best go...
Something like ".//div[@id='foo\d+]" to capture div tags with id='foo123'.
I'm using .NET, if that matters.
...
There have been many JVM languages in the recent few years including Javascript, Python, Ruby etc. (full list here: List of JVM Languages). My question is this: why has Sun not come out with a full suite of languages for the JVM just like Microsoft's .NET? With the new version of the JVM, they can make any necessary adjustments for dynam...
Happy New Year.
I have a bunch of SOAP Web Services. They all have an HTTP POST and GET interfaces along with the SOAP interface. I believe POST and GET are offered by default when building SOAP Web Services in .NET/Visual Studio.
These methods either: (1) get information, e.g., provide your username, password and a transaction ID -> g...
I have a Repeater contol bound to a custom object (an EntitySpaces query) and have noticed there are a couple of ways to conditionally format the values being displayed.
1) From my aspx I can call a method in my code-behind and pass through the bound value and use that to drive any conditional logic:
<a class="star" href="<%#M...
Hi,
I recently faced a problem of presenting the output of simple genetic algorithm that looks for extremes of 2 argument function f(x1,x2) . I would like to be able to use x1 as x, x2 as y and f as z and to draw points in 3d space that I could rotate. ( I'm currently drawing this on bitmap using color as the 'z axis'.)
Where should I ...
Basically you have two ways for doing this:
for (int x = 0; x < UPPER_X; x++)
for (int y = 0; y < UPPER_Y; y++)
{
arr1[x, y] = get_value();
arr2[y, x] = get_value();
}
The only difference is what variable to change in the inner loop: first or second. I heard that the results differ from language to ...