📄 f0c698ce6436001b1ca5e09d4b3e313e
字号:
package com.bam;public class AJAX_Desktop { /** * @param args */ static int port = 80; public static boolean log = false; public static boolean loginfo = log && true; public static boolean logdebug = log && true; public static int refresh_milliseconds = 1500; public static String extension = "png"; public static int width = 800; public static int height = 600; public static int chunks = 5; public static void main(String args[]) { System.out.println("Starting AJAX Remote Desktop Viewer..."); System.out.println("Copyright Peter Damen. www.peterdamen.com/ajaxrd\n"); System.out.println("Command Line Options: "); System.out.println(" -p:port port is the TCP/IP port the server will listen."); System.out.println(" -c:chunks the screen will update using chunks*chunks refreshable squares"); System.out.println(" -r:refresh refresh is the milliseconds between AJAX calls"); System.out.println(" -w:width width in pixels of capture area, from top left corner."); System.out.println(" -h:height height in pixels of capture area, from top left corner."); System.out.println(); String arg = null; for (int p=0; p < args.length; p++) { arg = args[p]; if (arg.startsWith("-p:")) { try { port = Integer.parseInt(arg.substring(3)); } catch (Exception e) { System.out.println("Invalid syntax for port, using default."); } if (port < 1 && port > 32000) port = 80; } else if (arg.startsWith("-c:")) { try { chunks = Integer.parseInt(arg.substring(3)); } catch (Exception e) { System.out.println("Invalid syntax for chunk size, using default."); } if (chunks < 1) chunks =1; if (chunks > 100) chunks = 100; } else if (arg.startsWith("-w:")) { try { width = Integer.parseInt(arg.substring(3)); } catch (Exception e) { System.out.println("Invalid syntax for width, using default."); } if (width < 1) width =10; if (width > 3200) width = 3200; } else if (arg.startsWith("-h:")) { try { height = Integer.parseInt(arg.substring(3)); } catch (Exception e) { System.out.println("Invalid syntax for height, using default."); } if (height < 1) height =10; if (height > 3200) height = 3200; } else if (arg.startsWith("-r:")) { try { refresh_milliseconds = Integer.parseInt(arg.substring(3)); } catch (Exception e) { System.out.println("Invalid syntax for refresh time, using default."); } if (refresh_milliseconds < 100) refresh_milliseconds = 100; if (refresh_milliseconds > 1000000) refresh_milliseconds = 1000000; } } System.out.println("Using " + width + "x" + height + " with " + chunks + "x" + chunks + " chunks on HTTP, port " + port + "."); System.out.println("Default client refresh time set to " + refresh_milliseconds + " milliseconds."); new ScreenCapture(width, height, chunks); new AJAXServer(port, "Ajax Remote Desktop"); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -