Click here to Skip to main content
15,922,166 members
Home / Discussions / C#
   

C#

 
QuestionIs there a way to stop a process from being closed? Pin
Anthony Mushrow12-Jul-06 16:18
professionalAnthony Mushrow12-Jul-06 16:18 
AnswerRe: Is there a way to stop a process from being closed? Pin
Andrei Ungureanu12-Jul-06 18:14
Andrei Ungureanu12-Jul-06 18:14 
AnswerRe: Is there a way to stop a process from being closed? Pin
Eran Aharonovich12-Jul-06 21:25
Eran Aharonovich12-Jul-06 21:25 
QuestionHow can I prevent a listView (View: List) from showing on serveral columns? [modified] Pin
AngryC12-Jul-06 14:39
AngryC12-Jul-06 14:39 
AnswerRe: How can I prevent a listView (View: List) from showing on serveral columns? Pin
Andrew Lygin12-Jul-06 18:02
Andrew Lygin12-Jul-06 18:02 
QuestionHow can i find the current users 'My Documents' (XP) Pin
Anthony Mushrow12-Jul-06 13:45
professionalAnthony Mushrow12-Jul-06 13:45 
AnswerRe: How can i find the current users 'My Documents' (XP) Pin
Sean8912-Jul-06 14:00
Sean8912-Jul-06 14:00 
GeneralRe: How can i find the current users 'My Documents' (XP) Pin
Anthony Mushrow12-Jul-06 14:09
professionalAnthony Mushrow12-Jul-06 14:09 
QuestionOpening a file that has already be lock by another user for write access Pin
keroed_edmond12-Jul-06 13:35
keroed_edmond12-Jul-06 13:35 
AnswerRe: Opening a file that has already be lock by another user for write access Pin
Not Active12-Jul-06 14:03
mentorNot Active12-Jul-06 14:03 
GeneralRe: Opening a file that has already be lock by another user for write access Pin
keroed_edmond12-Jul-06 14:19
keroed_edmond12-Jul-06 14:19 
GeneralRe: Opening a file that has already be lock by another user for write access Pin
keroed_edmond12-Jul-06 16:43
keroed_edmond12-Jul-06 16:43 
QuestionPls Help Me !!! Pin
Fahad Ali12-Jul-06 11:51
Fahad Ali12-Jul-06 11:51 
AnswerRe: Pls Help Me !!! Pin
PlayByTheRules12-Jul-06 22:05
PlayByTheRules12-Jul-06 22:05 
QuestionHow can create Software lock in C# ? Pin
persian_king12-Jul-06 11:39
persian_king12-Jul-06 11:39 
AnswerRe: How can create Software lock in C# ? Pin
Not Active12-Jul-06 14:00
mentorNot Active12-Jul-06 14:00 
AnswerRe: How can create Software lock in C# ? Pin
Divyang Mithaiwala12-Jul-06 20:23
Divyang Mithaiwala12-Jul-06 20:23 
QuestionPropertyGrid meets Generics Pin
Mattman20612-Jul-06 11:16
Mattman20612-Jul-06 11:16 
Hello everyone,

This may seem like an odd question but here goes.

I'm using the PropertyGrid for a project of mine -- works great and I've used the EnumDescConverter and PropertySorter TypeConverters that I found on CodeProject.

Basically I have an (older) application (.NET 1.1) that I have moved to .NET 2.0. In the older application, I had a class with a Layers property that contained a collection of Layers. I used the ExpandableObjectConverter to let the PropertyGrid show a + sign beside the layers as well as a list of the layers. This was great. Basically it was something like

public class Config
{
...
  private LayerCollection m_Layers = new LayerCollection();

  [TypeConverter(typeof(ExpandableObjectConverter))]
  public LayerCollection Layers
  {
    get { return m_Layers; }
  }
...
}


LayerCollection implemented CollectionBase, as well as ICustomTypeDescriptor to show "Layer #" beside each entry. This worked great.

Now, however, I'm restructured things so that it looks something like this:


public class Config
{
...
  private List<Layer> m_Layers = new List<Layer>();

  public List<Layer> Layers
  {
    get { return m_Layers; }
  }
...
}


If I apply the ExpandableObjectConverter to the Layers properties, it just shows the Count property of the List. Hmmm. Not what I wanted. I know I'm missing something here -- just not sure what.

I used the generic List because it was easy -- but now I'm thinking that I may have to go back and have a LayerCollection class again so that it can implement the ICustomTypeConverter. Maybe make that generic so I can reuse it, but still.

Any ideas? Has anyone else run into a similar fiasco?

Thanks!
-Matt
AnswerRe: PropertyGrid meets Generics [modified] Pin
Mattman20612-Jul-06 16:25
Mattman20612-Jul-06 16:25 
QuestionProblem with code returning parameter from stored procedure Pin
leckey12-Jul-06 10:26
leckey12-Jul-06 10:26 
AnswerRe: Problem with code returning parameter from stored procedure Pin
Christian Graus12-Jul-06 10:35
protectorChristian Graus12-Jul-06 10:35 
GeneralRe: Problem with code returning parameter from stored procedure Pin
led mike12-Jul-06 10:43
led mike12-Jul-06 10:43 
GeneralRe: Problem with code returning parameter from stored procedure Pin
leckey12-Jul-06 10:45
leckey12-Jul-06 10:45 
GeneralRe: Problem with code returning parameter from stored procedure Pin
leckey12-Jul-06 10:44
leckey12-Jul-06 10:44 
GeneralRe: Problem with code returning parameter from stored procedure Pin
Christian Graus12-Jul-06 10:48
protectorChristian Graus12-Jul-06 10:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.