Re: Making Definitions
- From: Devon-S <DevonS@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Mar 2008 07:33:01 -0700
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
- Follow-Ups:
- Re: Making Definitions
- From: Jon Skeet [C# MVP]
- Re: Making Definitions
- References:
- Re: Making Definitions
- From: Peter Duniho
- Re: Making Definitions
- From: Jon Skeet [C# MVP]
- Re: Making Definitions
- Prev by Date: Re: Select a node after its created
- Next by Date: RE: Question regarding proper OO design
- Previous by thread: Re: Making Definitions
- Next by thread: Re: Making Definitions
- Index(es):
Relevant Pages
|
Loading