Exemplo n.º 1
0
 //连接设备
 public static void callConnect(String batPath, String device, OnProcessListener onProcessListener)
 {
     if (onProcessListener == null)
     {
         return;
     }
     try{
         myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { device }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_START_CONNECT);
         myThread.start();
     }catch (Exception e) {
     }
 }
Exemplo n.º 2
0
        //获取当前连接的设备
        public static void getDevices(String batPath, OnProcessListener onProcessListener)
        {
            if (onProcessListener == null)
            {
                return;
            }

            try
            {
                myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] {}), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_GET_DEVICES);
                myThread.start();
            }
            catch (Exception e) {
            }
        }
Exemplo n.º 3
0
        //连接vpn
        public static void callConnectVpn(String batPath, String vpnName, String userName, String userPassword, OnProcessListener onProcessListener)
        {
            if (onProcessListener == null)
            {
                return;
            }

            try
            {
                myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { vpnName, userName, userPassword }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_CONNECT_VPN);
                myThread.start();
            }
            catch (Exception e) {
            }
        }
Exemplo n.º 4
0
        public static void callDeleteRandomFile(String batPath, OnProcessListener onProcessListener)
        {
            if (onProcessListener == null)
            {
                return;
            }

            try
            {
                myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_DELETE_RANDOM);
                myThread.start();
            }
            catch (Exception e)
            {
            }
        }
Exemplo n.º 5
0
        public static void callPullTimeFile(String batPath, String targetPath, OnProcessListener onProcessListener)
        {
            if (onProcessListener == null)
            {
                return;
            }

            try
            {
                myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { targetPath }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_PULL_TIME);
                myThread.start();
            }
            catch (Exception e)
            {
            }
        }
Exemplo n.º 6
0
        //启动修改prop
        public static void callProp(String batPath, String device, String propPath, OnProcessListener onProcessListener)
        {
            if (onProcessListener == null)
            {
                return;
            }

            try
            {
                myThread = new MyThread(ThreadUtil.getBatOrExeStartInfo(batPath, new String[] { device, propPath }), onProcessListener, Constant.ProcessType.TYPE_OF_PROCESS_CHANGE_PROP);
                myThread.start();
            }
            catch (Exception e)
            {
            }
        }