Skip to content

Instantly share code, notes, and snippets.

@tylerflint
Created April 1, 2010 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerflint/351948 to your computer and use it in GitHub Desktop.
Save tylerflint/351948 to your computer and use it in GitHub Desktop.
public class Startup extends SimpleCommand implements ICommand
{
override public function execute( note:INotification ):void
{
switch(note.getName()){
case AppFacade.APP_STARTUP:
facade.registerMediator( new AppMediator( note.getBody() as BreadBox ) );
facade.registerMediator( new MenuMediator() );
break;
case AppFacade.WELCOME_STARTUP:
facade.registerMediator( new WelcomeMediator( note.getBody() as Welcome ) );
break;
case AppFacade.INVENTORY_STARTUP:
facade.registerMediator( new InventoryMediator( note.getBody() as Inventory ) );
break;
case AppFacade.INVENTORY_EXPORT_STARTUP:
facade.registerMediator( new ExportMediator( note.getBody() as Export ) );
break;
case AppFacade.INVENTORY_IMPORT_STARTUP:
facade.registerMediator( new ImportMediator( note.getBody() as Import ) );
break;
case AppFacade.INVENTORY_UPDATE_STARTUP:
facade.registerMediator( new UpdateMediator( note.getBody() as Update ) );
break;
case AppFacade.INVENTORY_VIEW_STARTUP:
facade.registerMediator( new ViewMediator( note.getBody() as View ) );
break;
case AppFacade.INVENTORY_HISTORY_STARTUP:
facade.registerMediator( new HistoryMediator( note.getBody() as History ) );
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment