Example #1
0
        protected override Task Actions(params object[] parameters)
        {
            this.Context.Output.WriteLine("Type the ID of the process you wish to open. Quit by pressing Enter.");

            TemplateProvider.EndlessPidLoop(pid =>
            {
                string filePath = "";
                foreach (Configuration configuration in this.Context.Processes.Keys)
                {
                    if (configuration.ID == pid)
                    {
                        filePath = configuration.ProcessLocation;
                        break;
                    }
                }
                if (!File.Exists(filePath))
                {
                    return;
                }
                string argument = "/select, \"" + filePath + "\"";

                Process.Start("explorer.exe", argument);
            }, this.Context);

            return(Task.CompletedTask);
        }
Example #2
0
        protected override Task Actions(params object[] parameters)
        {
            this.Context.Output.WriteLine("Type the ID of the process you wish to blacklist. Quit by pressing Enter.");

            TemplateProvider.EndlessPidLoop(pid =>
            {
                DefaultProcessIdentifier.BlacklistProcess(this.Context.Processes.Values.Where(x => x.Id == pid).ToArray()[0]);
            }, this.Context);

            DefaultProcessIdentifier.ConfigurationUpdate();
            return(Task.CompletedTask);
        }
Example #3
0
        protected override Task Actions(params object[] parameters)
        {
            this.Context.Output.WriteLine("Type the ID of the process you wish to kill. Quit by pressing Enter.");

            TemplateProvider.EndlessPidLoop(pid =>
            {
                foreach (Configuration configuration in this.Context.Processes.Keys)
                {
                    if (configuration.ID == pid)
                    {
                        KillProcessById(pid);
                        break;
                    }
                }
            }, this.Context);

            return(Task.CompletedTask);
        }
        protected override Task Actions(params object[] parameters)
        {
            this.Context.Output.WriteLine("Type the ID of the process you wish to search. Quit by pressing Enter.");

            TemplateProvider.EndlessPidLoop(pid =>
            {
                string fileName = "";
                foreach (Configuration configuration in this.Context.Processes.Keys)
                {
                    if (configuration.ID == pid)
                    {
                        fileName = configuration.ProcessName;
                        break;
                    }
                }
                Process.Start(new ProcessStartInfo("cmd", $"/c start {"https://www.google.com/search?q=" + fileName}")
                {
                    CreateNoWindow = true
                });
            }, this.Context);

            return(Task.CompletedTask);
        }