internal QuestFlowViewer(Quest quest, EditingContext context) { this.quest = quest; this.context = context; InitializeComponent(); flowView = new QuestFlowView(diagramSetController, project, display); toolsManager = new ToolsManager(toolSetController, flowView); shortcutsReader = new ShortcutsReader(context.Code, context.History); context.Code.Saved += Code_Saved; context.History.Done += History_Done; context.History.Undone += History_Undone; }
public static RemoveQuestActionCommand RemoveQuestAction(QuestAction action, Quest quest, EditingContext context, QuestFlowView flowView, Shape shape) => new RemoveQuestActionCommand(action, quest, context) { Done = (firstTime) => { flowView.RemoveActionShape(shape); flowView.ArrangeShapes(); }, Undone = () => { flowView.AddActionShape(action, shape); flowView.ArrangeShapes(); }, };