471,310 Members | 1,214 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

DesignerVerbCollection

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
Jul 21 '05 #1
5 1144
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

Jul 21 '05 #2
I think you are missing about UITypeEditors...

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/
"Franck Diastein" <fd*******@euskaltel.net> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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

Jul 21 '05 #3
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

Jul 21 '05 #4
ComponentDesigner.Component as MyObject

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/
"Franck Diastein" <fd*******@euskaltel.net> wrote in message
news:OE**************@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

Jul 21 '05 #5
OK, got it...

Thank you :-)

joeycalisay wrote:
ComponentDesigner.Component as MyObject

Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Franck Diastein | last post: by
reply views Thread by David | last post: by
5 posts views Thread by Shawn Hogan | last post: by
reply views Thread by Bram | last post: by
11 posts views Thread by Pete Kane | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.