예제 #1
0
파일: frmAD.cs 프로젝트: hxun/RTXLDAP
 public frmAD()
 {
     InitializeComponent();
     RootObj        = new RTXSAPIRootObj();
     DeptManagerObj = RootObj.DeptManager;
     UserManagerObj = RootObj.UserManager;
     UserAuthObj    = RootObj.UserAuthObj;
     UserAuthObj.OnRecvUserAuthRequest += new _IRTXSAPIUserAuthObjEvents_OnRecvUserAuthRequestEventHandler(UserAuthObj_OnRecvUserAuthRequest); //user auth event
     RootObj.ServerIP    = config.RTXIP;                                                                                                       //rtx ip
     RootObj.ServerPort  = config.RTXPort;                                                                                                     //rtx port
     UserAuthObj.AppGUID = config.AppGUID;                                                                                                     //app guid
     UserAuthObj.AppName = config.AppName;                                                                                                     //app name
     try
     {
         UserAuthObj.RegisterApp();      //register app
         UserAuthObj.StartApp("", 8);    //start app
     }
     catch (COMException ex)
     {
         MessageBox.Show(ex.Message);
         Application.Exit();
     }
     onLogin = new OnLogin(onUserLogin);
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RootObj = new RTXSAPIRootObj();     //创建根对象
     DeptManagerObj = RootObj.DeptManager;    //通过根对象创建部门管理对象
     UserManagerObj = RootObj.UserManager;   //通过根对象创建用户对象
 }
예제 #3
0
파일: frmAD.cs 프로젝트: tangck/RTXLDAP
        RTXSAPILib.RTXSAPIUserManager UserManagerObj; //rtx user obj

        #endregion Fields

        #region Constructors

        public frmAD()
        {
            InitializeComponent();
            RootObj = new RTXSAPIRootObj();
            DeptManagerObj = RootObj.DeptManager;
            UserManagerObj = RootObj.UserManager;
            UserAuthObj = RootObj.UserAuthObj;
            UserAuthObj.OnRecvUserAuthRequest += new _IRTXSAPIUserAuthObjEvents_OnRecvUserAuthRequestEventHandler(UserAuthObj_OnRecvUserAuthRequest); //user auth event
            RootObj.ServerIP = config.RTXIP;        //rtx ip
            RootObj.ServerPort = config.RTXPort;    //rtx port
            UserAuthObj.AppGUID = config.AppGUID;   //app guid
            UserAuthObj.AppName = config.AppName;   //app name
            try
            {
                UserAuthObj.RegisterApp();      //register app
                UserAuthObj.StartApp("", 8);    //start app
            }
            catch (COMException ex)
            {
                MessageBox.Show(ex.Message);
                Application.Exit();
            }
            onLogin = new OnLogin(onUserLogin);
        }