Click here to Skip to main content
15,905,508 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Problem with code returning parameter from stored procedure Pin
leckey12-Jul-06 10:50
leckey12-Jul-06 10:50 
GeneralRe: Problem with code returning parameter from stored procedure Pin
Christian Graus12-Jul-06 10:58
protectorChristian Graus12-Jul-06 10:58 
GeneralRe: Problem with code returning parameter from stored procedure Pin
leckey12-Jul-06 11:02
leckey12-Jul-06 11:02 
GeneralRe: Problem with code returning parameter from stored procedure Pin
Christian Graus12-Jul-06 11:09
protectorChristian Graus12-Jul-06 11:09 
GeneralRe: Problem with code returning parameter from stored procedure Pin
leckey12-Jul-06 11:15
leckey12-Jul-06 11:15 
GeneralRe: Problem with code returning parameter from stored procedure Pin
Christian Graus12-Jul-06 11:17
protectorChristian Graus12-Jul-06 11:17 
GeneralRe: Problem with code returning parameter from stored procedure Pin
Christian Graus12-Jul-06 11:09
protectorChristian Graus12-Jul-06 11:09 
AnswerRe: Problem with code returning parameter from stored procedure [modified] Pin
Jon Sagara12-Jul-06 11:14
Jon Sagara12-Jul-06 11:14 
GeneralRe: Problem with code returning parameter from stored procedure Pin
leckey12-Jul-06 11:24
leckey12-Jul-06 11:24 
GeneralRe: Problem with code returning parameter from stored procedure Pin
Christian Graus12-Jul-06 11:36
protectorChristian Graus12-Jul-06 11:36 

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.