Looking for advice, links, design patterns, etc. on the best way to design an application where entities and related screens could be extended with additional attributes/related lookups via metadata/without recompile, ideally by end users. I'm thinking something very similiar to how Dynamics CRM 4.0 works with extension tables/dynamic p...
I need to write a generic method in the base class that would accept 2 objects as parameters and compares them for equality.
Ex:
public abstract class BaseData
{
public bool AreEqual(object O1, object O2)
{
//Need to implement this
}
}
public class DataTypeOne : BaseData
{
public string Name;
public string Address;
}
...
I am working on a program that requires the date of an event to get returned. I am looking for a "Date", not a "DateTime". There has to be a datatype that returns just the date... is there?
...
Roll with me and imagine the following example:
Public ViewResult GiveMeFruit(int personId, string personName, int personAge, int fruitId){
Person person = PersonService.GetPerson(personId);
person.Name = personName;
person.Age = age;
person.Fruits.Add(FruitService.GetFruit(fruitId));
ViewData.Person = person;
Vi...
I have a form in my project that is showing up as a class in Solution Explorer. This is causing a problem since I can't get to the designer. Any ideas on how to fix this?
...
I have a windows forms client that consumes an ASP.net web service.
It's my understanding that when an exception is thrown by the web service it will be converted to a SoapException in the .net client software.
Well, I am catching the SoapException, but when I display the message on the client end in a messagebox, it shows more informa...
I am writing an application that needs to be installed on a large number of desktops and also needs to update itself. We are looking at WIX for creating the installation. I have used ClickOnce and it is not a good solution for this install. WIX seems to fit, but there is no good process for auto update that I have found.
I have looke...
Hi,
I'm using a function to call for a piece of text to be rendered within an area.
The basic working of the function is:
Dim measureSize as Size
Do
myFont = new Font(myFont.Name, myFont.Size - 1, FontStyle.Regular, GraphicsUnit.Document)
'Initial font size is set insanely high for the moment, during testing.
'Low initial fo...
This is a bit of unusual problem that I'm experiencing, but recently one of the users of a production application started reporting errors in the system. These were traced to a 503 Service Unavailable error when making a call to a web service used by the application.
Now here's the odd part, only the one user is affected by this issue....
I have an overloaded utility method called CheckDuration with following function signatures.
private static Action<int> CheckDuration(Action action)
private static Action<int> CheckDuration<T>(Action<T> action, T arg)
Basically CheckDuration prints on console how long it took to run a method.
Now, I would like to check the du...
I'm currently working on a project that utilizes a proprietary PCMCIA radio card to communicate with some wireless devices. I currently have a background process that handles reading data to and from the card and storing it for processing, but I'd like to be able to shut down power to the card when my application is not running. I've don...
Hi,
I have form with user defined filters ( combobox with column names, combobox with filter types and textbox with value).
How can I dynamicly add user defined filter into LINQ query?
Typical query looks like:
var qProducts = from p in db.Products
where p.IsArchived == false
order by p.ProductName select p;
I'm using LINQ (...
We have a desktop application that performs a pretty rigorous set of calculations in a background thread. Portions of this calculation are performed in an unmanaged library that we access through interop. What we are finding is that, when we kick off the calculation, the UI thread becomes unresponsive for the duration of the calculatio...
Hello,
I have a TextBox and ListBox. User can search ListBox elements from TextBox.
ListBox is bound to CollectionViewSource.
CollectionViewSource has Filter event handler, that filters elements based on text that user enters into TextBox.
My requirement is to highlight user entered text within TextBlock of ListBoxItem elements.
I ...
From the description of sn.exe utility and this question I see that a copy of the public key is added to every assembly signed with the strong name. This is enough to validate that the assembly binary has not been altered.
But how does one verify that given assembly was really signed with some given keypair and compiled by a given compa...
How do I get the date difference in ASP.NET C#?
E.g.:
d1= 28/04/2009 09:26:14
d2= 28/04/2009 09:28:14
DateDiff = d2 - d1
...
I am using the following function to create a System.ServiceModel.EndpointAddress when connecting to a WCF Service:
private static EndpointAddress GetEndPointAddress(string url, EndpointIdentity identity)
{
Uri baseAddress = new Uri(url);
EndpointAddress endpointAddress = new EndpointAddress(
baseAddress,
identit...
I've run into a problem that I'm certain others have hit and solved. In several places in my application I have 'Grids'. More specifically Infragistic's UltraWinGrid's - but the idea is that, inside of a grid press 'TAB' moves you to the next cell in the grid. When you are in the last cell of a row, pressing tab will move you to the n...
When trying to update the web reference to a deployed asp.net webservice from a windows forms app, I get an error.
Unable to download following files from .https://webserver/webservices/myservice.asmx?wsdl
For some reason it is looking at a host called webserver, but that isn't what it needs to look for for the WSDL. It needs to look a...
Hello,
In my WPF application I have 2 Windows (both Windows have their own ViewModel):
Application's Main Window that displays list with bunch of words (bound to MainViewModel)
Dialog Window that allows users add new items to the list (bound to AddWordViewModel)
MainViewModel has Articles property of List(this collection is populat...