public void Build(ICommandBuilder builder) { RegexForCSharp regex = new RegexForCSharp(); LineFinder lineFine = new LineFinder(); builder.AddCommand("Function", () => lineFine.FindLine(regex.FindFunctionDefinitions)); builder.AddCommand("class", () => lineFine.FindLine(regex.FindClassDefinitions)); }
public void Build(ICommandBuilder builder) { if (analyzer.Error != null) { builder.AddCommand(analyzer.Error, () => { }); } else { foreach (var command in analyzer.Commands) { builder.AddCommand(command, () => analyzer.Execute(command)); } } }
public void Build(ICommandBuilder builder) { InputSimulator inputSimulator = new InputSimulator(); builder.AddCommand("click", () => inputSimulator.Mouse.LeftButtonClick()) .AddCommand("select", () => { inputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.SHIFT); inputSimulator.Mouse.LeftButtonClick(); inputSimulator.Keyboard.KeyUp(WindowsInput.Native.VirtualKeyCode.SHIFT); }) .AddCommand("box", () => { inputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.SHIFT); inputSimulator.Keyboard.KeyDown(WindowsInput.Native.VirtualKeyCode.LMENU); inputSimulator.Mouse.LeftButtonClick(); inputSimulator.Keyboard.KeyUp(WindowsInput.Native.VirtualKeyCode.LMENU); inputSimulator.Keyboard.KeyUp(WindowsInput.Native.VirtualKeyCode.SHIFT); }) .AddCommand("right click", () => inputSimulator.Mouse.RightButtonClick()) .AddCommand("doubleclick", () => inputSimulator.Mouse.LeftButtonDoubleClick()) .AddCommand("Start drag", () => inputSimulator.Mouse.LeftButtonDown()) .AddCommand("Stop drag", () => inputSimulator.Mouse.LeftButtonUp()); }
public void Build(ICommandBuilder builder) { builder.AddCommand("<type,[function|class]><access,CSharpAddon.List.AccessModifiers>", (IVaraibles x) => { Func <string, List <string> > finder = regex.FindAccessModifiable; if (x.IsAvailable("type")) { string type = x.Get("type"); switch (type) { case "function": finder = regex.FindFunctionDefinitions; break; case "class": finder = regex.FindDefinitions; break; default: finder = regex.FindAccessModifiable; break; } } string access = x.Get("access"); ChangeAccessModifier(finder, access + " "); }); }
public override void Build(ICommandBuilder builder) { base.Build(builder); builder .AddCommand("up", () => StartScrolling(1)) .AddCommand("down", () => StartScrolling(-1)); }
public void Build(ICommandBuilder builder) { InputSimulator inputSimulator = new InputSimulator(); builder.AddCommand("up", () => inputSimulator.Mouse.VerticalScroll(5)) .AddCommand("up number()", x => inputSimulator.Mouse.VerticalScroll(x)) .AddCommand("down", () => inputSimulator.Mouse.VerticalScroll(-5)) .AddCommand("down number()", x => inputSimulator.Mouse.VerticalScroll(-x)); }
public void Build(ICommandBuilder builder) { if (Information != null) { foreach (var varname in Information.Variables /*.OrderBy(x=>x)*/) { builder.AddCommand(varname, () => SendKeys.SendWait(varname)); } } }
public void Build(ICommandBuilder builder) { builder.AddCommand("<a,CSharpAddon.List.Members>", x => SendKeys.SendWait(x)); builder.AddCommand("small <a,CSharpAddon.List.Members>", x => SendKeys.SendWait(TextFomatter.FirstLetterSmall(x))); builder.AddCommand("big <a,CSharpAddon.List.Members>", x => SendKeys.SendWait(TextFomatter.FormatClass(x))); //builder.AddCommand("<t1,CSharpAddon.List.Members> dot <t2,CSharpAddon.List.Members>[ dot <t3,CSharpAddon.List.Members>]", x => SendKeys.SendWait(x.Get("t1") + "." + x.Get("t2") + (x.IsAvailable("t3") ? ("." + x.Get("t3")) : ""))); builder.AddCommand("<g,CSharp1Addon.List.Generics>of<t,CSharpAddon.List.Types>", x => SendKeys.SendWait(x.Get(0) + "<" + x.Get(1) + ">")); builder.AddCommand("<g,CSharpAddon.List.Generics>of<t1,CSharpAddon.List.Types>komma<t2,CSharpAddon.List.Types>", x => SendKeys.SendWait(x.Get(0) + "<" + x.Get(1) + "," + x.Get(2) + ">")); builder.AddCommand("new <a,CSharpAddon.List.Types>", (string x) => SendKeys.SendWait("new " + x)); builder.AddCommand("new <g,CSharpAddon.List.Generics>of<t,CSharpAddon.List.Types>", x => SendKeys.SendWait("new " + x.Get(0) + "<" + x.Get(1) + ">")); builder.AddCommand("array of<t,CSharpAddon.List.Types>", x => SendKeys.SendWait(x.Get(0) + "[]")); }
public void Build(ICommandBuilder builder) { builder.AddCommand("<using,CSharpAddon.List.Usings>", (IVaraibles varaibles) => { string use = varaibles.Get("using"); var namespaces = Information?.UsedNamespaces.Where(x => x.EndsWith(use)); var name = namespaces.FirstOrDefault(); LineFinder lineFinder = new LineFinder(); lineFinder.AddLineBelow(1, "using " + name + ";"); }); }
public void Build(ICommandBuilder builder) { builder.AddCommand("line number()", (int v) => SendKeys.SendWait(@"^{t}:" + v + "{Enter}")); if (Information == null) { return; } CreateCommandForEachEntry("file", builder, "^{t}f ", Information.FileNames, "{Enter}"); CreateCommandForEachEntry("class", builder, "^{t}t ", Information.Classes, "{Enter}"); CreateCommandForEachEntry("function", builder, "^{t}m ", Information.Functions, "{Enter}"); }
public void Build(ICommandBuilder builder) { builder.AddCommand("<type,[function|class]><attribute,CSharpAddon.List.Attributes>", (IVaraibles x) => { string attribute = x.Get("attribute"); LineFinder lineFinder = new LineFinder(); if (lineFinder.FindLine(MakeController.SelectTypeFinder(x))) { //SendKeys.SendWait("{END}"); //SendKeys.SendWait(", "); SendKeys.SendWait("^({Enter})[" + attribute + "]{LEFT}"); } }); }
public void Build(ICommandBuilder builder) { builder.AddCommand("<type,CSharpAddon.List.Types>", (IVaraibles x) => { string type = x.Get("type"); LineFinder lineFinder = new LineFinder(); if (lineFinder.FindLine(regex.FindDefinitions)) { SendKeys.SendWait("{END}"); var line = lineFinder.GetLine(); SendKeys.SendWait(line.Contains(":")?",":": "); SendKeys.SendWait(type); } }); }
public void Build(ICommandBuilder builder) { builder.AddCommand("Small text(en-us)", v => SendKeys.SendWait(TextFomatter.FormatVariable(v))); builder.AddCommand("big text(en-us)", v => SendKeys.SendWait(TextFomatter.FormatClass(v))); builder.AddCommand("class text(en-us)", v => SendKeys.SendWait("class " + TextFomatter.FormatClass(v) + "{{}{enter}")); builder.AddCommand("Local text(en-us)", v => SendKeys.SendWait("var " + TextFomatter.FormatVariable(v) + "=")); //builder.AddCommand("function text(en-us)", v => SendKeys.SendWait(TextFomatter.FormatClass(v)+ "{(}{)}{{}{enter}")); builder.AddCommand("function text()", v => SendKeys.SendWait(TextFomatter.FormatClass(v) + "{(}{)}{{}{enter}")); builder.AddCommand("function<type,CSharpAddon.List.Types><name,text()>", (IVaraibles v) => SendKeys.SendWait(v.Get("type") + " " + TextFomatter.FormatClass(v.Get("name")) + "{(}{)}{{}{enter}")); builder.AddCommand("<a,CSharpAddon.List.AccessModifiers>function<name,text()>", (IVaraibles v) => SendKeys.SendWait(v.Get("a") + " void " + TextFomatter.FormatClass(v.Get("name")) + "{(}{)}{{}{enter}")); builder.AddCommand("<a,CSharpAddon.List.AccessModifiers>class text()", x => SendKeys.SendWait(x.Get(0) + " class " + TextFomatter.FormatClass(x.Get(1)) + "{{}{enter}")); //builder.AddCommand("<a,CSharpAddon.List.AccessModifiers>class text()", (i, x) => SendKeys.SendWait(x[0] + " class " + TextFomatter.FormatClass(x[1]) + "{{}{enter}")); //builder.AddCommand("<a,CSharpAddon.List.AccessModifiers>class text() with <t,CSharpAddon.List.Types>", (i, x) => SendKeys.SendWait(x[0] + " class " + TextFomatter.FormatClass(x[1]) + ":" + x[2] + "{{}{enter}")); }
public void Build(ICommandBuilder builder) { var files = Directory.EnumerateFiles(path, "*", SearchOption.AllDirectories).ToList(); Dictionary <string, string> mapping = new Dictionary <string, string>(); files.ForEach(x => mapping[Path.GetFileNameWithoutExtension(x)] = x); builder.AddCommand(mapping.Keys.ToList(), s => { try { Process.Start(mapping[s]); } catch (Exception e) { Console.WriteLine(mapping[s]); Console.WriteLine(e); } }); }
public void Build(ICommandBuilder builder) { Categorizer categorizer = new Categorizer(new FileMappingCreator().CreateMapping(path)); Dictionary <string, IOrder> orders = interfaceFinder.GetAllImplementations(typeof(IOrder)) .Where(x => x.GetConstructors() .Where(r => r.GetParameters().Count() == 0).Count() > 0) .Select(x => interfaceFinder.InstantiateType <IOrder>(x)) .ToDictionary(x => x.GetType().Name); Dictionary <string, ISetting> settings = interfaceFinder.InstantiateAllTypes <ISetting>().ToDictionary(x => x.GetType().Name.ToLower()); string activeOrder = nameof(KeyOrder); foreach (var item in categorizer.Settings) { if (settings.TryGetValue(item.Key.ToLower() + "setting", out var setting)) { var settingBuilder = new SettingBuilder() { Orders = orders, Value = item.Value, Active = activeOrder }; setting.Apply(settingBuilder); if (orders.ContainsKey(settingBuilder.Active)) { activeOrder = settingBuilder.Active; } } else { Console.WriteLine($"Could not find setting: {item.Key}"); } } foreach (var item in categorizer.Words) { builder.AddCommand(item.Key, (i, s) => orders[activeOrder].Action(IntegrateParameters(item.Value, i, s))); } }
public void Build(ICommandBuilder builder) { builder.AddCommand("Google text(en-GB)", v => SearchOnGoogle(v)) .AddCommand("Youtube text(en-GB)", v => SearchOnYoutube(v)) .AddCommand("Windows text(en-GB)", v => SearchOnWindows(v)); }
public virtual void Build(ICommandBuilder builder) { builder.AddCommand("stop", () => autoExecuter.Stop()); }
public void Build(ICommandBuilder builder) { builder.AddCommand("CSharpAddon.List.Types", x => SendKeys.SendWait("new " + (string)x)); }
public void Build(ICommandBuilder builder) { builder.AddCommand("<g,CSharpAddon.List.Generics>of<t,CSharpAddon.List.Types>", x => SendKeys.SendWait(x.Get(0) + "<" + x.Get(1) + ">")); builder.AddCommand("<g,CSharpAddon.List.Generics>of<t1,CSharpAddon.List.Types>komma<t2,CSharpAddon.List.Types>", x => SendKeys.SendWait(x.Get(0) + "<" + x.Get(1) + "," + x.Get(2) + ">")); }
public void Build(ICommandBuilder builder) { builder.AddCommand("<t,CSharpAddon.List.Types><m,CSharpAddon.List.Members>", x => SendKeys.SendWait(x.Get("t") + " " + TextFomatter.FirstLetterSmall(x.Get("m")))); builder.AddCommand("<t,CSharpAddon.Command.Generic><m,CSharpAddon.List.Members>", x => SendKeys.SendWait(/*x.Get("t") + */ " " + TextFomatter.FirstLetterSmall(x.Get("m")))); }
public void CreateCommandForEachEntry(string pre, ICommandBuilder builder, string before, IEnumerable <string> entries, string after) { builder.AddCommand(entries, value => SendKeys.SendWait(before + value + after), pre); }
public void Build(ICommandBuilder builder) { builder.AddCommand("German text(de-de)", v => SendKeys.SendWait(v)) .AddCommand("English text(en-us)", v => SendKeys.SendWait(v)); }