package com.ycl.api.YS.user; import com.ycl.api.YS.NetDemo; import com.ycl.api.YS.util.Common; import com.ycl.api.YS.lib.NetDEVSDKLib.NETDEV_USER_DETAIL_INFO_S; import com.ycl.api.YS.lib.NetDEVSDKLib.NETDEV_USER_LEVEL_E; import javax.swing.*; /** * @description To add user. * @introduction Only support NVR. */ public class AddUser { /** * @description To add user. * @introduction Calling the interface of NETDEV_CreateUser. */ @SuppressWarnings("deprecation") public static void addUser() { if(null == NetDemo.lpUserID) { JOptionPane.showMessageDialog(null, "Please Login device first. error code"+NetDemo.netdevsdk.NETDEV_GetLastError()); return; } NetDemo.jButtonUserListGetUserList.doClick(); NETDEV_USER_DETAIL_INFO_S stUserInfo = new NETDEV_USER_DETAIL_INFO_S(); if(NetDemo.jTextFieldAddUserUserName.getText()==null||NetDemo.jTextFieldAddUserUserName.getText().equals("")) { JOptionPane.showMessageDialog(null, "Username can not be null"); return; } if(NetDemo.UserListTableModel.getRowCount()>0) { for(int i=0;i