<< 点击显示目录 >> 主页 mappView帮助助手 > mapp View帮助信息 > Widgets > Process > Sequencer > Concept > Editing a sequence |
This section explains how to edit a sequence.
If a new sequence is created, then Commands "SequenceStart" and "SequenceEnd" must exist in the configuration. This is always shown in the sequence and also cannot be deleted or swapped.
The following describes how to add a step to a sequence:
1. Define the position.
First, determine where the new step should be added. In our example, a new step should be added after step "WaitTime". In this case, we would therefore select step "WaitTime".
2. Define the new step.
Next, define which step should be added. In our example, command "MoveRight" is selected in the command table.
3. Add the step.
Finally, define how the step should be added. Out new step should be added after "WaitTime". For this reason, action "InsertAfter" is triggered by a Button. Step "MoveRight" is now added in our sequence.
Button "InsertAfter" can have the following event binding:
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="SequencerContent" widgetRefId="InsAfter" event="Click"/>
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.SequencerEditArea.Action" contentRefId="SequencerContent" widgetRefId="SequencerEditArea1" >
<Method xsi:type="widgets.brease.SequencerEditArea.Action.InsertAfterSelected" type="New" />
</Target>
</Action>
</EventHandler>
</EventBinding>
If multiple steps should be combined, this can be done using action "CreateMacro". Steps can be selected in the selection window that appears when long-clicking in the sequence. Clicking on a Button will trigger action "CreateMacro", which will replace the selected steps with a macro. The following event binding can be used:
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="SequencerContent" widgetRefId="CreateMacro" event="Click"/>
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.SequencerEditArea.Action" contentRefId="SequencerContent" widgetRefId="SequencerEditArea1" >
<Method xsi:type="widgets.brease.SequencerEditArea.Action.CreateMacro" name="Macro2"/>
</Target>
</Action>
</EventHandler>
</EventBinding>
Argument name defines how the new macro is stored on the data storage device defined in the MpSequenceCore configuration. In order for the created macro to be displayed visually in the sequence, an image with the same name must be stored in the path defined with property imagePrefix for widget "Sequencer".
Action "ResolveMacro" can be used to undo this operation.
A sequence can be saved and loaded using a Button. There are two ways to save and load a sequence. The variant used is defined in the event binding.
Save
•Saving a sequence as a new file: The sequence is saved as an XML file. The sequence is not applied by MpSequence in this case. Argument name must be used:
Example:
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="SequencerContent" widgetRefId="SaveActive" event="Click"/>
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.Sequencer.Action" contentRefId="SequencerContent" widgetRefId="Sequencer1" >
<Method xsi:type="widgets.brease.Sequencer.Action.SaveSequence" name="NewSequence.xml"/>
</Target>
</Action>
</EventHandler>
</EventBinding>
•Saving a sequence on MpSequence: The sequence is saved directly on MpSequence. Argument name remains empty. What is important here is that the sequence is written directly to MpSequenceCore, not to a file. The sequence can be executed with "Start" = true.
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="SequencerContent" widgetRefId="SaveActive" event="Click"/>
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.Sequencer.Action" contentRefId="SequencerContent" widgetRefId="Sequencer1" >
<Method xsi:type="widgets.brease.Sequencer.Action.SaveSequence" name=""/>
</Target>
</Action>
</EventHandler>
</EventBinding>
Loading:
•Loading a sequence from a defined file: A specified sequence is loaded. Argument name must be used.
Example:
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="SequencerContent" widgetRefId="Load" event="Click"/>
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.Sequencer.Action" contentRefId="SequencerContent" widgetRefId="Sequencer1" >
<Method xsi:type="widgets.brease.Sequencer.Action.LoadSequence" name="NewSequence.xml"/>
</Target>
</Action>
</EventHandler>
</EventBinding>
•Loading a sequence from MpSequence: The sequence currently being used by MpSequence is loaded. Argument name remains empty.
Example:
<EventBinding>
<Source xsi:type="widgets.brease.Button.Event" contentRefId="SequencerContent" widgetRefId="Load" event="Click"/>
<EventHandler>
<Action>
<Target xsi:type="widgets.brease.Sequencer.Action" contentRefId="SequencerContent" widgetRefId="Sequencer1" >
<Method xsi:type="widgets.brease.Sequencer.Action.LoadSequence" name=""/>
</Target>
</Action>
</EventHandler>
</EventBinding>