public RtxUserManager() { RootObj = new RTXSAPIRootObj(); //创建根对象 RootObj.ServerIP = "127.0.0.1"; RootObj.ServerPort = Convert.ToInt16("8006"); UserManager = RootObj.UserManager; }
public void CreateRoot() { RootObj = new RTXSAPILib.RTXSAPIRootObj(); //创建根对象 UserAuthObj = RootObj.UserAuthObj; //通过根对象创建用户认证对象 UserAuthObj.OnRecvUserAuthRequest += new _IRTXSAPIUserAuthObjEvents_OnRecvUserAuthRequestEventHandler(UserAuthObj_OnRecvUserAuthRequest); //订阅用户认证响应事件 RootObj.ServerIP = "127.0.0.1"; RootObj.ServerPort = Convert.ToInt16("8006"); UserAuthObj.AppGUID = "{8E85315D-342C-417d-9093-57F824638040}"; //设置应用GUID UserAuthObj.AppName = "RTX_LDAP_LUGIN"; //设置应用名 }
public void CreateRoot() { //RTXSAPIRootObjClass RootObj = new RTXSAPIRootObjClass(); //创建根对象 RootObj = new RTXSAPILib.RTXSAPIRootObj(); //创建根对象 UserAuthObj = RootObj.UserAuthObj; //通过根对象创建用户认证对象 UserAuthObj.OnRecvUserAuthRequest += new _IRTXSAPIUserAuthObjEvents_OnRecvUserAuthRequestEventHandler(UserAuthObj_OnRecvUserAuthRequest); //订阅用户认证响应事件 RootObj.ServerIP = server; RootObj.ServerPort = Convert.ToInt16(port); UserAuthObj.AppGUID = "{8E85315D-342B-417d-9093-57F824638040}"; //设置应用GUID UserAuthObj.AppName = "RTX_LDAP_SERVICE"; //设置应用名 }
public Form1() { InitializeComponent(); RootObj = new RTXSAPIRootObj(); //创建根对象 ApiObj = RootObj.CreateAPIObj(); //通过根对象创建应用对象 MsgObj = ApiObj.CreateMessage(); //通过应用对象创建消息对象 DataObj = RootObj.CreateRTXSData(); //通过根对象创建SData对象 ApiObj.OnRecvMessage += new _IRTXSAPIObjEvents_OnRecvMessageEventHandler(ApiObj_OnRecvMessage); //订阅一个事件,当收到客户端插件发过来的消息时触发该事件 mydelegate = new AddText(AddTextMethod); }
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); }
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); }
protected void Page_Load(object sender, EventArgs e) { RootObj = new RTXSAPIRootObj(); //创建根对象 DeptManagerObj = RootObj.DeptManager; //通过根对象创建部门管理对象 UserManagerObj = RootObj.UserManager; //通过根对象创建用户对象 }
public MainWindow() { InitializeComponent(); app_notify = new NotifyIcon(); app_notify.Icon = new Icon(SystemIcons.Application, 40, 40); app_notify.Icon = (Icon)Properties.Resources.ResourceManager.GetObject("myappicon"); app_notify.Visible = true; app_notify.DoubleClick += new EventHandler(NotifyIcon_DoubleClicked); notify_menu = new System.Windows.Forms.ContextMenu(); MenuItem exit_item = new MenuItem("�˳�"); notify_menu.MenuItems.Add(exit_item); exit_item.Click += new EventHandler(NotifyMenuExitItem_Clicked); app_notify.ContextMenu = notify_menu; //���������� RootObj = new RTXSAPILib.RTXSAPIRootObj(); //���÷�����IP RootObj.ServerIP = _ServerIP; //���÷������˿� RootObj.ServerPort = _ServerPort; //ͨ���������û���֤���� UserAuthObj = RootObj.UserAuthObj; //�����û���֤��Ӧ�¼� UserAuthObj.OnRecvUserAuthRequest += new _IRTXSAPIUserAuthObjEvents_OnRecvUserAuthRequestEventHandler(UserAuthObj_OnRecvUserAuthRequest); //����Ӧ��GUID UserAuthObj.AppGUID = _AppGUID; //����Ӧ���� UserAuthObj.AppName = _AppName; UserManagerObj = RootObj.UserManager; DeptManagerObj = RootObj.DeptManager; OrgsManagerObj = ((RTXSAPIRootObj2)RootObj).OrgstructManager; updateAuthResult = new UpdateDisplayControl(AuthCompleted); updateSychResult = new UpdateDisplayControl(SychCompleted); try { //ע��Ӧ�� this.authExecuteResultTxtBox.Text += DateTime.Now.ToString("yy-MM-dd HH:mm:ss") + "| ����ע��Ӧ��..." + Environment.NewLine; UserAuthObj.RegisterApp(); this.authExecuteResultTxtBox.Text += DateTime.Now.ToString("yy-MM-dd HH:mm:ss") + "| Ӧ��ע��ɹ�..." + Environment.NewLine; //���Ӧ�� this.authExecuteResultTxtBox.Text += DateTime.Now.ToString("yy-MM-dd HH:mm:ss") + "| �������Ӧ��..." + Environment.NewLine; ; UserAuthObj.StartApp("", 8); this.authExecuteResultTxtBox.Text += DateTime.Now.ToString("yy-MM-dd HH:mm:ss") + "| Ӧ������ɹ�..." + Environment.NewLine; // ���ͬ���߳� sychronThread = new Thread(new ThreadStart(AccountSychronization)); sychronThread.Start(); _AppRunning = true; } catch (COMException ex) { _AppRunning = false; this.authExecuteResultTxtBox.Text += ex.Message; } }
public MainWindow() { InitializeComponent(); app_notify = new NotifyIcon(); app_notify.Icon = new Icon(SystemIcons.Application, 40, 40); app_notify.Icon = (Icon)Properties.Resources.ResourceManager.GetObject("myappicon"); app_notify.Visible = true; app_notify.DoubleClick += new EventHandler(NotifyIcon_DoubleClicked); notify_menu = new System.Windows.Forms.ContextMenu(); MenuItem exit_item = new MenuItem("退出"); notify_menu.MenuItems.Add(exit_item); exit_item.Click += new EventHandler(NotifyMenuExitItem_Clicked); app_notify.ContextMenu = notify_menu; //创建根对象 RootObj = new RTXSAPILib.RTXSAPIRootObj(); //设置服务器IP RootObj.ServerIP = _ServerIP; //设置服务器端口 RootObj.ServerPort = _ServerPort; //通过根对象创建用户认证对象 UserAuthObj = RootObj.UserAuthObj; //订阅用户认证响应事件 UserAuthObj.OnRecvUserAuthRequest += new _IRTXSAPIUserAuthObjEvents_OnRecvUserAuthRequestEventHandler(UserAuthObj_OnRecvUserAuthRequest); //设置应用GUID UserAuthObj.AppGUID = _AppGUID; //设置应用名 UserAuthObj.AppName = _AppName; UserManagerObj = RootObj.UserManager; DeptManagerObj = RootObj.DeptManager; OrgsManagerObj = ((RTXSAPIRootObj2)RootObj).OrgstructManager; updateAuthResult = new UpdateDisplayControl(AuthCompleted); updateSychResult = new UpdateDisplayControl(SychCompleted); try { //注册应用 this.authExecuteResultTxtBox.Text += DateTime.Now.ToString("yy-MM-dd HH:mm:ss") + "| 正在注册应用..." + Environment.NewLine; UserAuthObj.RegisterApp(); this.authExecuteResultTxtBox.Text += DateTime.Now.ToString("yy-MM-dd HH:mm:ss") + "| 应用注册成功..." + Environment.NewLine; //启动应用 this.authExecuteResultTxtBox.Text += DateTime.Now.ToString("yy-MM-dd HH:mm:ss") + "| 正在启动应用..." + Environment.NewLine;; UserAuthObj.StartApp("", 8); this.authExecuteResultTxtBox.Text += DateTime.Now.ToString("yy-MM-dd HH:mm:ss") + "| 应用启动成功..." + Environment.NewLine; // 启动同步线程 sychronThread = new Thread(new ThreadStart(AccountSychronization)); sychronThread.Start(); _AppRunning = true; } catch (COMException ex) { _AppRunning = false; this.authExecuteResultTxtBox.Text += ex.Message; } }