[1240] | 1 | /* SetModifiedCommand.as */
|
---|
| 2 |
|
---|
| 3 | package gov.va.med.edp.command.config
|
---|
| 4 | {
|
---|
| 5 | import com.adobe.cairngorm.commands.ICommand;
|
---|
| 6 | import com.adobe.cairngorm.control.CairngormEvent;
|
---|
| 7 |
|
---|
| 8 | import gov.va.med.edp.control.config.ConfigurationEvent;
|
---|
| 9 | import gov.va.med.edp.model.TrackingModelLocator;
|
---|
| 10 |
|
---|
| 11 | public class SetModifiedCommand implements ICommand
|
---|
| 12 | {
|
---|
| 13 | private var model:TrackingModelLocator = TrackingModelLocator.getInstance();
|
---|
| 14 |
|
---|
| 15 | public function execute(event:CairngormEvent):void
|
---|
| 16 | {
|
---|
| 17 | var e: ConfigurationEvent = ConfigurationEvent(event);
|
---|
| 18 | if (e.type == ConfigurationEvent.EVENT_BED_MODIFIED) {
|
---|
| 19 | model.config.bedMods = true;
|
---|
| 20 | }
|
---|
| 21 | if (e.type == ConfigurationEvent.EVENT_BOARD_MODIFIED) {
|
---|
| 22 | model.config.boardMods = true;
|
---|
| 23 | trace("set modified");
|
---|
| 24 | }
|
---|
| 25 | if (e.type == ConfigurationEvent.EVENT_COLOR_MODIFIED) {
|
---|
| 26 | model.config.colorMods = true;
|
---|
| 27 | }
|
---|
| 28 | if (e.type == ConfigurationEvent.EVENT_PARAM_MODIFIED) {
|
---|
| 29 | model.config.paramMods = true;
|
---|
| 30 | }
|
---|
| 31 | if (e.type == ConfigurationEvent.EVENT_PARAM_MODIFIED_RESET) {
|
---|
| 32 | model.config.paramMods = false; // RESET (after creation complete)
|
---|
| 33 | }
|
---|
| 34 | if (e.type == ConfigurationEvent.EVENT_SELECTION_MODIFIED) {
|
---|
| 35 | model.config.selectionMods = true;
|
---|
| 36 | }
|
---|
| 37 | if (e.type == ConfigurationEvent.EVENT_STAFF_MODIFIED) {
|
---|
| 38 | model.config.staffMods = true;
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 | }
|
---|