Re: Making Definitions



John,

There is a great chance that I don't truely understand the enum. But since
the only examples at the link work exactly as I said in a class, sending me
back to how I didn't want them to work wasn't helpful to my lack of
understanding.

But back to the problem...

There is a (something could be a type or a class) called FormViewMode. When
you want to change the mode of the form you do.

FormView1.ChangeMode(FormViewMode.Insert)

The great thing about the FormViewMode is it appears as a type so you can
make it a property of another class

public partial class ImageStore

protected FormViewMode _fvmCurrentMode;

public FormViewMode CurrentMode
{
get { return _fvmCurrentMode ; }
set { _fvmCurrentMode = value ; }
}

}

I would like to create a (whatever form view mode is) for ImageSize and have
three properties. Small Medium Large. I know I can do it sorta with an eNum.
But when I went to use it to access it, I had to do <Class>.EnumType.Property

With ImageSize it is actually going to be in lots of different places like
FormViewMode.

Appreciating the C# enlightenment...

devon



"Jon Skeet [C# MVP]" wrote:

Devon-S <DevonS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
I wasn't asking how enum works it doesn't produce the result I wanted.

Well, you previously said that enums "seem to be attached to a subclass
in VS2005" which suggests that you don't understand them. That in turn
means that it's possible that they *could* produce the result you want,
if you understood them better...

I wondered what kind of thing is FormView.Insert. It is not an enum as both
items are colored Cyan and it appears like a proper type.

Do you know how to created a FormView.Insert type thing?

I can't see FormView.Insert at all. (I can see FormView.InsertItem, but
that's just a method.) What exact member are you talking about? Do you
have an MSDN link for it?

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

.



Relevant Pages

  • Re: Making Definitions
    ... how I use the declaration in other assemblies then. ... public enum ImageDisplaySize ... There is a called FormViewMode. ... Only if you make it a nested type. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Making Definitions
    ... There is a called FormViewMode. ... an enum, and Insert is a member of that enum. ... Only if you make it a nested type. ...
    (microsoft.public.dotnet.languages.csharp)

Loading