dotnet windows forms designtime:
Overload the default constructor made buy the designer. Get myLogic as a
parameter:
public class frmOptions
{
private ComponentLogic m_myLogic;
Public frmOptions(ComponentLogic myLogic)
{
m_myLogic = myLogic;
}
}
When you create a new instance of frmOptions:
frmOptions frm = new frmOptions(myLogic);
[quoted text, click to view] "Franck Diastein" wrote:
> Hi, I have a component using DesignerVerbCollection. When one of the
> verbs is clicked in VS, I launch a WinForm...
>
> The structure of my component is this:
>
> Component.cs (component code and Designer code)
> frmOptions.cs (a properties form for component)
> ComponentLogic.cs (a single class with the object)
>
> When a Component is used, a ComponentLogic is declared this way:
>
> public ComponentLogic myLogic = new ComponentLogic();
>
> I don't know how to access myLogic from Designer class to send it to
> frmOptions when a verb is clicked...
>
> I know this is hard to understand, but basically my question is how to
> make myLogic accesible from Designer class...
>
> TIA
Hi, I have a component using DesignerVerbCollection. When one of the
verbs is clicked in VS, I launch a WinForm...
The structure of my component is this:
Component.cs (component code and Designer code)
frmOptions.cs (a properties form for component)
ComponentLogic.cs (a single class with the object)
When a Component is used, a ComponentLogic is declared this way:
public ComponentLogic myLogic = new ComponentLogic();
I don't know how to access myLogic from Designer class to send it to
frmOptions when a verb is clicked...
I know this is hard to understand, but basically my question is how to
make myLogic accesible from Designer class...
It's what I do in my frmOptions...
How to get myLogic created in Component from Designer to pass it to
frmOptions ?
My main problem is that Component and ComponentDesigner are 2 different
classes... I don't know how to retreive myLogic from ComponentDesigner...
[quoted text, click to view] Amiram Korach wrote:
> Overload the default constructor made buy the designer. Get myLogic as a
> parameter:
> public class frmOptions
> {
> private ComponentLogic m_myLogic;
> Public frmOptions(ComponentLogic myLogic)
> {
> m_myLogic = myLogic;
> }
> }
>
> When you create a new instance of frmOptions:
> frmOptions frm = new frmOptions(myLogic);
>
> "Franck Diastein" wrote:
>
>
>>Hi, I have a component using DesignerVerbCollection. When one of the
>>verbs is clicked in VS, I launch a WinForm...
>>
>>The structure of my component is this:
>>
>>Component.cs (component code and Designer code)
>>frmOptions.cs (a properties form for component)
>>ComponentLogic.cs (a single class with the object)
>>
>>When a Component is used, a ComponentLogic is declared this way:
>>
>>public ComponentLogic myLogic = new ComponentLogic();
>>
>>I don't know how to access myLogic from Designer class to send it to
>>frmOptions when a verb is clicked...
>>
>>I know this is hard to understand, but basically my question is how to
>>make myLogic accesible from Designer class...
>>
>>TIA
ComponentDesigner.Component as MyObject
--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/ [quoted text, click to view] "Franck Diastein" <fdiastein@euskaltel.net> wrote in message
news:OEL45QtKFHA.3500@TK2MSFTNGP14.phx.gbl...
> It's what I do in my frmOptions...
>
> How to get myLogic created in Component from Designer to pass it to
> frmOptions ?
>
> My main problem is that Component and ComponentDesigner are 2 different
> classes... I don't know how to retreive myLogic from ComponentDesigner...
>
> Amiram Korach wrote:
> > Overload the default constructor made buy the designer. Get myLogic as a
> > parameter:
> > public class frmOptions
> > {
> > private ComponentLogic m_myLogic;
> > Public frmOptions(ComponentLogic myLogic)
> > {
> > m_myLogic = myLogic;
> > }
> > }
> >
> > When you create a new instance of frmOptions:
> > frmOptions frm = new frmOptions(myLogic);
> >
> > "Franck Diastein" wrote:
> >
> >
> >>Hi, I have a component using DesignerVerbCollection. When one of the
> >>verbs is clicked in VS, I launch a WinForm...
> >>
> >>The structure of my component is this:
> >>
> >>Component.cs (component code and Designer code)
> >>frmOptions.cs (a properties form for component)
> >>ComponentLogic.cs (a single class with the object)
> >>
> >>When a Component is used, a ComponentLogic is declared this way:
> >>
> >>public ComponentLogic myLogic = new ComponentLogic();
> >>
> >>I don't know how to access myLogic from Designer class to send it to
> >>frmOptions when a verb is clicked...
> >>
> >>I know this is hard to understand, but basically my question is how to
> >>make myLogic accesible from Designer class...
> >>
> >>TIA
> >>
Don't see what you're looking for? Try a search.