public static void Options(string Input) { string[] modifPath = InputEdit.Edit(Input, "process"); if (modifPath[0] == "-kill") { for (int i = 0; i < processes.Length; i++) { try { foreach (Process proc in Process.GetProcessesByName(processes[i].ProcessName)) { if (!processes[i].ProcessName.Contains("CMD")) { proc.Kill(); Console.WriteLine($"{processes[i].ProcessName} killed"); } } } catch (Exception) { Console.WriteLine("Error!"); } } } else if (modifPath[0] == "-info") { ProcessesInfo(); } else { Console.WriteLine("A bug in the extension"); } }
public static void Options(string Input) { string[] modifPath = InputEdit.Edit(Input, "os"); if (modifPath[0] == "-hd") { new OS().HardDrive_Info(); } else if (modifPath[0] == "") { new OS().OS_Info(); } else if (modifPath[0] == "-ip") { new OS().IP_Info(); } else if (modifPath[0] == "-vd") { new OS().VideoCard_Info(); } else if (modifPath[0] == "-p") { new OS().Processor_Info(); } else if (modifPath[0] == "-ram") { new OS().RAM_Info(); } else { Console.WriteLine("A bug in the extension"); } }
public static void Options(string Input) { string[] modifPath = InputEdit.Edit(Input, "cat"); string modifier = null; if (modifPath[0].Length == 2) { modifier = modifPath[0]; List <string> list = modifPath.ToList(); list.RemoveAt(0); modifPath = list.ToArray(); if (modifier == "-d") { Searcher.SearchFiles(modifPath[0]); modifPath = Searcher.files; } else { Console.WriteLine("A bug in the extension"); } } string text = Writer.Write(modifPath); if (text != null) { Console.WriteLine(text); } }
public static void Options(string Input) { string[] modifPath = InputEdit.Edit(Input, "open"); if (modifPath[0] != "") { if (modifPath[0] == "notepad") { using (FileStream fs = File.Create(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\New Notepad.txt")) { Process.Start("notepad.exe", fs.Name); fs.Close(); } } else if (modifPath[0] == "paint") { using (FileStream fs = File.Create(Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + @"\Noname.png")) { Process.Start("mspaint.exe", fs.Name); fs.Close(); } } else { Console.WriteLine("A bug in the extension"); } } else { Console.WriteLine("Choose a program!"); } }
public static void Options(string Input) { string[] modifPath = InputEdit.Edit(Input, "system"); if (modifPath[0] == "-rload") { Reload(); } else if (modifPath[0] == "-off") { Off(); } else { Console.WriteLine("A bug in the extension"); } }
public static void Options(string Input) { string[] modifPath = InputEdit.Edit(Input, "ls"); if (modifPath.Length > 1) { if (modifPath[0] == "-a") { Searcher.SearchDirectories(modifPath[1]); } else { Console.WriteLine("A bug in the extension"); } } else { Searcher.SearchFiles(modifPath[0]); Searcher.Display(); } }