Properties | List of all members
Solution Interface Reference

Access the Kanzi Studio projects in a Kanzi solution. More...

Inheritance diagram for Solution:

Properties

Project ActiveProject [get, set]
 Gets or sets the currently selected project in Kanzi Studio. More...
 
Project PreviewStartupProject [get]
 Gets the project which the Preview currently shows. More...
 
Project PrimaryProject [get]
 Gets the project which the user opened in Kanzi Studio. More...
 
IEnumerable< ProjectProjects [get]
 Gets the Kanzi Studio projects in the Kanzi solution. More...
 

Detailed Description

Access the Kanzi Studio projects in a Kanzi solution.

Property Documentation

Project ActiveProject
getset

Gets or sets the currently selected project in Kanzi Studio.

Examples

To get the currently selected project in Kanzi Studio:

public void Execute(PluginCommandParameter parameter)
{
// Get the currently selected project in Kanzi Studio.
var activeProject = studio.ActiveProject;
// Print the name of the selected project to the Kanzi Studio Log window.
studio.Log(activeProject.Name);
}
Project PreviewStartupProject
get

Gets the project which the Preview currently shows.

See also
KanziStudio.PreviewStarted

Examples

To get the project that the Preview window shows:

// Create the event handler and subscribe to the PreviewStarted event to get notified
// when the Kanzi Studio Preview starts.
public void Execute(PluginCommandParameter parameter)
{
// Create the event handler that is set off when the Preview starts.
studio.PreviewStarted += Studio_PreviewStarted;
}
private void Studio_PreviewStarted(object sender, EventArgs e)
{
// Get the project that the Preview window shows.
var previewProject = studio.Solution.PreviewStartupProject;
// When the Preview starts, print to the Kanzi Studio Log window
// "The Preview shows:" and the name of the project that the Preview shows.
studio.Log("The Preview shows: " + previewProject.Name);
}
Project PrimaryProject
get

Gets the project which the user opened in Kanzi Studio.

Examples

To select the project which the user opened in Kanzi Studio:

public void Execute(PluginCommandParameter parameter)
{
// Get the project that the user opened in Kanzi Studio and select that project.
studio.Solution.ActiveProject = studio.PrimaryProject;
}
IEnumerable<Project> Projects
get

Gets the Kanzi Studio projects in the Kanzi solution.

Examples

To get all projects in a Kanzi solution:

public void Execute(PluginCommandParameter parameter)
{
// Print the name of all projects in a Kanzi solution to the Kanzi Studio Log window.
studio.Log("This Kanzi solution contains these Kanzi Studio projects:");
foreach (var project in studio.Solution.Projects)
{
studio.Log(project.Name);
}
}