public Add ( Icon icon, string text, System.Action action, System.Windows.Input.KeyGesture gesture ) : void | ||
icon | Icon | |
text | string | |
action | System.Action | |
gesture | System.Windows.Input.KeyGesture | |
return | void |
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)); } }); }
private void add(string key, string text, Icon icon) { _selector.Add(icon, text, () => _controller.AddStep(key, _holder), Shortcuts[_index]); getIndexAction()(); }
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)); } }); }