-
Notifications
You must be signed in to change notification settings - Fork 263
Start Customizing Your Application Software
Begin the process of transforming the sample into your application.
Rename the solution file to something more appropriate for your development, such as ATFProjects.vs2010.sln
.
Open the solution in Visual Studio and edit the project appropriately in the Solution Explorer pane:
- Remove the ATF assembly projects you don't need.
- Remove the ATF sample projects, except for the sample you are copying, "SimpleDomEditor" in this case.
- Rename the "SimpleDomEditor" project "LandscapeGuide.vs2010".
.cs
files to something appropriate. In this case, they are changed to:
namespace LandscapeGuide
When you change the namespace, also change it in the Project settings > Application page's Default namespace field. Change Assembly name on this page appropriately, too.
In SchemaLoader.cs
, you must also change the name of the namespace:
SchemaResolver = new ResourceStreamResolver(Assembly.GetExecutingAssembly(),
"LandscapeGuide/schemas");
Load("eventSequence.xsd");
If you don't change Default namespace for the project, when you run, you get an unhandled exception of type System.ComponentModel.Composition.CompositionException
in Atf.Core.dll
. This results from a problem with the above lines in SchemaLoader.cs
. Because the default namespace is not set properly, the schema address is not resolved, so Load()
fails. Note that "LandscapeGuide/schemas" is the namespace in the code above.
Build the slightly modified project again and verify that it still runs properly, making changes as needed.
If you have not already done so, you should become familiar with the code in the sample you're renovating. After doing this, you can figure out what code you don't need.
You can start by removing files from the project that aren't relevant. In SimpleDomEditor
, these files are not required for LandscapeGuide
:
-
ResourceListEditor.cs
: component that adds the Resources pane, whichLandscapeGuide
doesn't have. -
DomNodeNameSearchControl.cs
: provides the Search and Replace - DomNode Names pane. -
DomNodeNameSearchService.cs
: provides the Search and Replace pane. -
DomNodeAdapters/Resource.cs
: DomNode adapter for the "Animation" and "Geometry" resources, which are not used inLandscapeGuide
. -
EventContext.cs
: Editing context that provides a context for updating the views of the Resources pane.
In Program.cs
, you can remove the following components from the MEF catalog, because their capabilities are not used in LandscapeGuide
and their corresponding files have already been removed:
DomNodeNameSearchService
DomNodePropertySearchService
ResourceListEditor
EventContext
in SchemaLoader.cs
to build.) The panes created by the removed components are now gone, but the rest of the application should still function.
Remove resources you don't need, such as graphics files. Remove references to these resources in the Resources
class in the Resources.cs
file also.
Modify the About.rtf
file to describe your new application. Change HelpAboutCommand.cs
to suit the new application, as in:
using (AboutDialog dialog = new AboutDialog(
Localizer.Localize("Landscape Guide"), appURL, richTextBox, null, null, true))
Once you make these changes, though, the original application won't run properly, because it is missing resources. This gets fixed in subsequent steps.
Creating an Application from an ATF Sample
- Steps for Creating an Application Based on an Existing Sample: Suggested steps for building on an existing sample.
- Choose ATF Sample to Base Application On: Pick a sample that most closely matches your new application's features.
- Copy ATF Sample and Run It: Copy the indicated folders and files in ATF to start your application development.
- Start Customizing Your Application Software: Begin the process of transforming the sample into your application.
- Define Your Application's New Data Model: Define the types in your application's data in a file and create a schema.
- Modify Your Application's Existing Software: Modify the sample's existing code to work for your application.
- Add New Code and Parts to Your Application: Add the application's unique features, using the appropriate ATF classes and components.
- Build, Run, and Debug Your Application: With all code changed and features added, finish development.
- Home
- Getting Started
- Features & Benefits
- Requirements & Dependencies
- Gallery
- Technology & Samples
- Adoption
- News
- Release Notes
- ATF Community
- Searching Documentation
- Using Documentation
- Videos
- Tutorials
- How To
- Programmer's Guide
- Reference
- Code Samples
- Documentation Files
© 2014-2015, Sony Computer Entertainment America LLC