/// <summary> /// 构造器 /// </summary> /// <param name="device"></param> /// <exception cref="Exceptions.DeviceHasNoSuException">当设备没有su权限时抛出</exception> /// <exception cref="Exceptions.CommandNotFoundException">设备不支持setprop时抛出</exception> public DeviceBuildPropSetter(IDevice device) : base(device) { if (!device.HaveSU()) { throw new Exceptions.DeviceHasNoSuException(); } ShellCommandHelper.CommandExistsCheck(device, "setprop"); }
/// <summary> /// 构造Windows Manager /// </summary> /// <param name="device"></param> /// <exception cref="Exceptions.CommandNotFoundException">设备不支持wm命令时抛出</exception> public WindowManager(IDevice device) : base(device) { ShellCommandHelper.CommandExistsCheck(device, "wm"); }
/// <summary> /// 构造 /// </summary> /// <param name="device"></param> /// <exception cref="Exceptions.CommandNotFoundException"></exception> public Inputer(IDevice device) : base(device) { ShellCommandHelper.CommandExistsCheck(device, "input"); }
/// <summary> /// 构造截图器 /// </summary> /// <param name="device"></param> public ScreenCapture(IDevice device) : base(device) { ShellCommandHelper.CommandExistsCheck(device, "screencap"); }
/// <summary> /// 创建新的视频录制器实例 /// </summary> /// <param name="device"></param> public VideoRecorder(IDevice device) : base(device) { ShellCommandHelper.CommandExistsCheck(device, "screenrecord"); }
/// <summary> /// 构造Windows Manager /// </summary> /// <param name="device"></param> /// <exception cref="Exceptions.CommandNotFoundException">设备不支持wm命令时抛出</exception> public WindowManager(IDevice device) : base(device) { ShellCommandHelper.SupportCheck(device, "wm"); }