public InteropManage()
        {
            isInitialized = true;
            _isDisposed   = false;

            ManagerDll.Init();
        }
        public void Dispose()
        {
            if (_isDisposed)
            {
                return;
            }

            _isDisposed = true;
            ManagerDll.Close();
        }
        public List <string> list_user()
        {
            //ArrayList
            List <string> users = new List <string>();

            ManagerDll.ReceiveUserL_start();

            while (!ManagerDll.ReceiveUserL_all())
            {
                string temp = Marshal.PtrToStringAnsi(ManagerDll.ReceiveUserL_get());
                users.Add(temp);
            }


            return(users);
        }
 public void SendMessage(string name, string mes)
 {
     ManagerDll.SendMessage(name, mes);
 }
 public string ReceiveMessage()
 {
     return(Marshal.PtrToStringAnsi(ManagerDll.ReceiveMessage()));
 }
 public void set_server(string addr, int port, string user, string pasword)
 {
     ManagerDll.Login1(addr, (ushort)port, user, pasword);
 }
 public void Disconect()
 {
     ManagerDll.Close();
 }
 public bool Conect()
 {
     return(ManagerDll.Connect());
 }