コード例 #1
0
 static void Main(string[] args)
 {
     Console.WriteLine("PrintScreen (made by j3soon)");
     Console.WriteLine("1. Press PrintScreen to save the entire screen.");
     Console.WriteLine("2. Press Alt+PrintScreen to save the current window.");
     Console.WriteLine("3. Press Ctrl+C to exit.");
     config.DefaultConfigEvent += () => { config["dir"] = @"%UserProfile%\Desktop\Screenshots\"; };
     config.Load();
     config.Save();
     Console.WriteLine("4. The captured screens will be saved in: " + config["dir"]);
     kbdHook.KeyDownEvent += kbdHook_KeyDownEvent;
     kbdHook.KeyUpEvent   += kbdHook_KeyUpEvent;
     kbdHook.InstallGlobalHook();
     Console.CancelKeyPress += Console_CancelKeyPress;
     while (loop)
     {
         Application.DoEvents();
         Thread.Sleep(1);
     }
     kbdHook.UninstallGlobalHook();
     config.Save();
 }