public void Execute(LauncherCommandInfo CommandInfo) { string[] Commands = ParseCommandList(CommandInfo); int CommnadCount = Commands.Count(); foreach (var Command in Commands.Select((command, index) => new { command, index })) { bool IsImmediately = Command.index != CommnadCount - 1 || (App.AppConfig.IsImmediately && CommandInfo.IsImmediately); try { if (App.AppConfig.IsCopyToClipboard || !IsImmediately) { System.Windows.Forms.Clipboard.Clear(); System.Threading.Thread.Sleep(100); System.Windows.Forms.Clipboard.SetText(Command.command); } } catch (Exception ex) { LogStatics.Debug(ex.ToString()); } switch (CommandInfo.Type) { case CommandExecuteType.None: break; case CommandExecuteType.Command: foreach (var CommandModule in App.PluginManagerInstance.CommandExecuteModules) { if (CommandModule.CanExecute(Command.command, IsImmediately)) { CommandModule.Execute(Command.command, IsImmediately); } } break; case CommandExecuteType.FileOpen: ExecuteFileOpen(Command.command); break; } } }