PC Review


Reply
Thread Tools Rate Thread

DesignerVerbCollection

 
 
Franck Diastein
Guest
Posts: n/a
 
      16th Mar 2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QW1pcmFtIEtvcmFjaA==?=
Guest
Posts: n/a
 
      16th Mar 2005
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
>

 
Reply With Quote
 
joeycalisay
Guest
Posts: n/a
 
      17th Mar 2005
I think you are missing about UITypeEditors...

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


"Franck Diastein" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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



 
Reply With Quote
 
Franck Diastein
Guest
Posts: n/a
 
      17th Mar 2005
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
>>

 
Reply With Quote
 
joeycalisay
Guest
Posts: n/a
 
      17th Mar 2005
ComponentDesigner.Component as MyObject

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


"Franck Diastein" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> >>



 
Reply With Quote
 
Franck Diastein
Guest
Posts: n/a
 
      18th Mar 2005
OK, got it...

Thank you :-)

joeycalisay wrote:
> ComponentDesigner.Component as MyObject
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DesignerVerbCollection in a page David Microsoft ASP .NET 0 4th Apr 2005 06:21 PM
DesignerVerbCollection Franck Diastein Microsoft Dot NET 5 18th Mar 2005 08:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:20 AM.