Visual Studio Development Bookmark and Share   
 index > Visual Studio Guidance Automation Toolkit > CAB - Open a View from another view that exists in another or in the same module
 

CAB - Open a View from another view that exists in another or in the same module

Hi all,

I've got several views developed that I want to share between different modules. I would like to know what's the best way to do it.

I've got to open these views in a modal way. I'm completely new to CAB and SCSF, if this is not right forum or I'm making no sense, please let me know.


This is my current code:
(Searcher is my view)
(SearchPresenter is the presenter of the view)

Searchersearcher=this._presenter.WorkItem.SmartParts.AddNew<Searcher>();
//publicproperty
searcher.ObjectName="Roads";
searcher.Dock=DockStyle.Fill;
SearcherPresentertsp=newSearcherPresenter();
searcher.Presenter=tsp;
tsp.WorkItem=this._presenter.WorkItem;
tsp.SetObjectName("Roads");
WindowWorkspaceworkspace=this._presenter.WorkItem.Workspaces.AddNew<WindowWorkspace>();
WindowSmartPartInfowspi=newWindowSmartPartInfo();
wspi.Title="PleaseChooseObjecttosearch";
wspi.StartPosition=FormStartPosition.CenterParent;
wspi.Height=310;
wspi.Width=665;
wspi.Modal=true;
workspace.Show(searcher,wspi);
if(searcher.DialogResult==DialogResult.OK)
{
//Getallinformationfromtheviewusinginterface??
}


1- Should I place this view in a common module and add references in all the modules that want to use it and call it like in this example?
2- Am I doing something wrong calling a view in this manner?
3- Shold I use an event to open this view? If yes, how can I retrieve the values there were set to the right parent?

Thanks ahead for all the help,

Luis Miguel Pinho

Luis Pinho
LPinho  Tuesday, July 01, 2008 4:08 PM

Hi Luis,

Please post this question to the SCSF forum @ Codeplex which is where SCSF team members hang and you should be able to get an answer to this.

If after posting there you still don't get an answer please let me know and I'll loop you with a SCSF team member.

HTH,
-vga.


Working with GAX/GAT/DSL? Download SFT now! http://softwarefactoriestoolkit.net
  • Proposed As Answer byvga Thursday, July 03, 2008 2:20 AM
  • Marked As Answer byLPinho Thursday, July 03, 2008 3:01 PM
  •  
vga  Thursday, July 03, 2008 2:20 AM

Hi Luis,

Please post this question to the SCSF forum @ Codeplex which is where SCSF team members hang and you should be able to get an answer to this.

If after posting there you still don't get an answer please let me know and I'll loop you with a SCSF team member.

HTH,
-vga.


Working with GAX/GAT/DSL? Download SFT now! http://softwarefactoriestoolkit.net
  • Proposed As Answer byvga Thursday, July 03, 2008 2:20 AM
  • Marked As Answer byLPinho Thursday, July 03, 2008 3:01 PM
  •  
vga  Thursday, July 03, 2008 2:20 AM
Thanks, I just posted on the other forum. Let's see if they reply.

I've got many questions about CAB, but it seems that the examples and articles that I'm able to find do not reply my questions. Do you think that the discussion board on the codeplex is the best place for them?

Thanks again,

L Pinho

Luis Pinho
LPinho  Thursday, July 03, 2008 12:23 PM
Yes, the SmartClient project on CodePlex is the right place where to post CAB-related questions. If you don't get your questions answered there let me know and I'll loop you with a SCSF PM from Microsoft.

-vga.

Working with GAX/GAT/DSL? Download SFT now! http://softwarefactoriestoolkit.net
vga  Thursday, July 10, 2008 4:04 AM

You can use google to search for other answers

Custom Search

More Threads

• ADO.net doesn't work with visual studio 2008
• Trying to add a new class to the References folder...
• warnings when I try to create guidance package
• How to Create Project Reference and App_Code from Web Sevice?
• Problem with adding references to web application while creating guidance package
• t4 help
• Does Visual Studio 2008 Professional Edition support OpenMP nested parallelism?
• Help! Recipe Framework Error - Register Recipe "EnvDTE.Project, EnvDTE"
• How to use a custom utilty in GAT for geenrating Class files.
• Guindance automation toolkit and extensions for Vs 2008 and Vs 2005