DesignerVerbCollection

  • Thread starter Thread starter Franck Diastein
  • Start date Start date
F

Franck Diastein

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
 
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);
 
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...
 
Back
Top