Пример #1
0
 public bool ChangeIp(string IPAddress)
 {
     serverHandling = new ServerOrganization(ref myself, IPAddress);
     if (myself == null)
     {
         return(false);
     }
     else
     {
         return(true);
     }
 }
Пример #2
0
        //Konstuktor
        public Organization(string UserName, string Comment, byte[] ProfilePic)
        {
            //connect to server and get my ID
            string ID = "";


            //now create mySelf
            myself           = new User(UserName, Comment, ProfilePic, ID);
            serverHandling   = new ServerOrganization(ref myself, "192.168.1.1");
            currentConnetced = new User[0];
            ChatHistory      = new Message[0];
            MessageChanged   = true;
            refreshThread    = new Thread(refreshContent);
            refreshThread.Start();
        }
Пример #3
0
        //Konstuktor
        public Organization(string UserName, string Comment, byte[] ProfilePic)
        {
            //connect to server and get my ID
            string ID    = "";
            bool   check = true;

            serverHandling = new ServerOrganization(ref ID);
            //now create mySelf
            myself = new User(UserName, Comment, ProfilePic, ID);
            serverHandling.SendMyself(true);
            currentConnetced = new User[0];
            ChatHistory      = new Message[0];
            refreshThread    = new Thread(refreshContent)
                               refreshThread.Start();
        }
Пример #4
0
        public bool ChangeIp(string IPAddress)
        {
            string ID = "";

            serverHandling = new ServerOrganization(ref ID, IPAddress, myself);
            if (ID == "")
            {
                return(false);
            }
            else
            {
                myself.SetUserID(ID);
                return(true);
            }
        }