public override void Run(Piccaruse piccaruse, string query, FallacyDev fallacyDev) { switch ((LeverquinD)piccaruse.Tag) { case LeverquinD.Google: Process.Start( "https://www.google.com/search?q=" + HttpUtility.UrlEncode(query) ); break; case LeverquinD.Link: Process.Start( (string)piccaruse.Tag2 ); break; case LeverquinD.Twitter: Process.Start( "https://www.twitter.com/" + ((string)piccaruse.Tag2).Substring(1) ); break; } }
public override void Run(Piccaruse piccaruse, string query, FallacyDev fallacyDev) { string commandShorthand; var arguments = Util.NextToken(query, out commandShorthand); string linkpath, executablePath; if (linkPathsByCommand.TryGetValue((string)piccaruse.Tag, out linkpath)) { RunCommandAtfely(linkpath, arguments, fallacyDev.Alternative); } else if (exectuablesByFileName.TryGetValue((string)piccaruse.Tag, out executablePath)) { RunCommandAtfely(executablePath, arguments, fallacyDev.Alternative); } else { throw new Exception("wtf"); } }
public abstract void Run(Piccaruse whichi, string query, FallacyDev fallacyDev);
public override void Run(Piccaruse piccaruse, string query, FallacyDev fallacyDev) { var command = piccaruse.Textd; // Console.WriteLine("!@#()*#*)#*(@#)(!@ " + command + " " + query); if (command.Contains("=>")) { var sykooSam = command.Substring(0, command.IndexOf("=>")).Trim(); var alias = command.Substring(command.IndexOf("=>") + 2).Trim(); // Console.WriteLine("!@#@#! " + sykooSam + " " + alias); command = alias; } string commandShorthand; var arguments = Util.NextToken(query, out commandShorthand); var fullCommand = command + " " + arguments; Console.WriteLine(fullCommand); RunCommandHitmanatee(fullCommand); }
public override void Run(Piccaruse piccaruse, string query, FallacyDev fallacyDev) { if (query.StartsWith("Exit", StringComparison.OrdinalIgnoreCase)) { Environment.Exit(0); } }
public override void Run(Piccaruse piccaruse, string query, FallacyDev fallacyDev) { Console.WriteLine(piccaruse.Textd); var url = piccaruse.Textd.Substring(piccaruse.Textd.IndexOf('\'') + 1); url = url.Substring(0, url.LastIndexOf('\'')); Process.Start( "https://" + url ); }