public void ConfigurePartAdders(OutlineNode node, FixtureGraph fixture, IPartHolder holder) { var selector = new OutlineGrammarSelector(node); var configurer = new GrammarSelectorConfigurer(holder, selector, _controller); configurer.Configure(fixture); }
public OutlineNode BuildNode(Test test, IOutlineController controller) { var builder = this.builder(controller, test); _topNode = builder.Build(); return _topNode; }
public OutlineNode BuildNode(Test test, IOutlineController controller) { var builder = this.builder(controller, test); _topNode = builder.Build(); return(_topNode); }
public void ConfigureRearrangeCommands(OutlineNode node, IPartHolder holder, ITestPart part) { node.BindControlAnd(Key.Up).To(() => _controller.MoveUp(part, holder)).Menu("Move Up", Icon.UpArrow); node.BindControlAnd(Key.PageUp).To(() => _controller.MoveToTop(part, holder)).Menu("Move to Top", Icon.UpArrow); node.BindControlAnd(Key.Down).To(() => _controller.MoveDown(part, holder)).Menu("Move Down", Icon.DownArrow); node.BindControlAnd(Key.PageDown).To(() => _controller.MoveToBottom(part, holder)).Menu("Move to Bottom", Icon.DownArrow); node.Bind(Key.Delete).To(() => _controller.Remove(part, holder)).Menu("Delete", Icon.Delete); }
private void withNewLeaf(ITestPart part, Icon icon, Action <OutlineNode> configure) { var node = new OutlineNode(part, icon); configure(node); CurrentNode.Items.Add(node); LastNode = node; }
public OutlineNode Build() { var outlineNode = new OutlineNode(_test, Icon.Test); outlineNode.AddText(_test.Name); Rebuild(outlineNode); return _top; }
private void addRearrangeCommands(OutlineNode node) { if (CurrentNode.Icon == Icon.Paragraph) { return; } _configurer.ConfigureRearrangeCommands(node, CurrentNode.Holder, node.Part); }
public OutlineNode Build() { var outlineNode = new OutlineNode(_test, Icon.Test); outlineNode.AddText(_test.Name); Rebuild(outlineNode); return(_top); }
public OutlineGrammarSelector(OutlineNode node) { node.Bind(ModifierKeys.Alt, Key.Insert).To(() => IsOpen = true); StaysOpen = true; PlacementTarget = node; VerticalOffset = 5; HorizontalOffset = 20; Placement = PlacementMode.RelativePoint; Add(Icon.Close, "Close", () => IsOpen = false, new KeyGesture(Key.Escape)); }
public void Rebuild(OutlineNode topNode) { topNode.IsSelected = true; topNode.Items.Clear(); _top = topNode; _nodes.Push(_top); LastNode = _top; var parser = new TestParser(_test, this, _library); parser.Parse(); }
public void StartTest(Test test) { if (_top == null) { _top = new OutlineNode(test, Icon.Test); _top.AddText(test.Name); LastNode = _top; } if (_nodes.Count == 0) { _nodes.Push(_top); } _configurer.ConfigureSectionAdder(_top, _library, _test); }
public void ConfigureSectionAdder(OutlineNode node, FixtureLibrary library, Test test) { var selector = new OutlineGrammarSelector(node); selector.Add(Icon.Comment, "Comment", () => _controller.AddComment(test), Key.C.ToGesture()); int index = 0; library.ActiveFixtures.Each(x => { if (index < Shortcuts.Length) { selector.Add(Icon.Section, x.Label, () => _controller.AddSection(x.Name), Shortcuts[index++]); } else { selector.Add(Icon.Section, x.Label, () => _controller.AddSection(x.Name), new KeyGesture(Key.F15)); } }); }
public void SelectNodeFor(ITestPart part) { //_topNode.Parent.CallOn<UIElement>(e => e.Focus()); //moveNext(); //moveNext(); //moveNext(); //moveNext(); //moveNext(); _topNode.IsSelected = false; var parent = _topNode.Parent as UIElement; parent.Focus(); parent.InvalidateVisual(); OutlineNode node = _topNode.Find(n => n.Part == part); node.BringIntoView(); node.IsSelected = true; node.Focus(); //node.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); //moveNext(); return; //_topNode.Parent.CallOn<UIElement>(e => e.Focus()); node.Focus(); //parent.MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); //Keyboard.FocusedElement.As<UIElement>().MoveFocus(new TraversalRequest(FocusNavigationDirection.Next)); //Keyboard.FocusedElement.As<UIElement>().MoveFocus(new TraversalRequest(FocusNavigationDirection.Previous)); //node.IsSelected = true; //node.Focus(); //_topNode.Parent.CallOn<UIElement>(e => e.Focus()); }
public void WriteSentenceText(OutlineNode node, Sentence sentence, IStep step) { var writer = new SentenceWriter(node, step); sentence.Parts.Each(x => x.AcceptVisitor(writer)); }
public void ResetTree(OutlineNode node) { tree.Items.Clear(); tree.Items.Add(node); node.IsSelected = true; }
public void ConfigurePartAdders(OutlineNode node, FixtureStructure fixture, IPartHolder holder) { var selector = new OutlineGrammarSelector(node); var configurer = new GrammarSelectorConfigurer(holder, selector, _controller); configurer.Configure(fixture); }
public void ConfigureTableColumnSelector(OutlineNode node, Table table, IStep step) { // no-op }
private void withNewNode(ITestPart part, Icon icon, Action<OutlineNode> configure) { var node = new OutlineNode(part, icon); configure(node); CurrentNode.Items.Add(node); LastNode = node; _nodes.Push(node); }
private void addRearrangeCommands(OutlineNode node) { if (CurrentNode.Icon == Icon.Paragraph) return; _configurer.ConfigureRearrangeCommands(node, CurrentNode.Holder, node.Part); }
public SentenceWriter(OutlineNode node, IStep step) { _node = node; _step = step; }