Esempio n. 1
0
        public Form1(Dangnhap _dangnhapTemp, int stt, string _userTemp, string Email, Image _imageTemp, string status, ClientManager ClientTemp)
        {
            InitializeComponent();
            _dangnhapForm = _dangnhapTemp;
            _stt = stt;
            _email = Email;
            _userName = _userTemp;
            client = ClientTemp;
            lbl_user.Text = _userName;
            Image RoundedImage = this.RoundCorners(_imageTemp, 55, Color.Transparent);
            ptb_avatar.Image = RoundedImage;
            _image = _imageTemp;
            _status = status;
            if (status == "\n")
            {
                txt_status.Text = "Bạn đang nghĩ gì.... 	";
            }
            else
                txt_status.Text = status;

            var pic = new Bitmap(this.bbt_addfriend.BackgroundImage, new Size(this.bbt_addfriend.Width, this.bbt_addfriend.Height));
            this.bbt_addfriend.BackgroundImage = pic;
            var picture = new Bitmap(this.bbt_notice.BackgroundImage, new Size(this.bbt_notice.Width, this.bbt_notice.Height));
            this.bbt_notice.BackgroundImage = picture;
            var picture1 = new Bitmap(this.bbt_check.BackgroundImage, new Size(this.bbt_notice.Width, this.bbt_notice.Height));
            this.bbt_check.BackgroundImage = picture1;
            Rectangle r = Screen.PrimaryScreen.WorkingArea;
            this.StartPosition = FormStartPosition.Manual;
            this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width, Screen.PrimaryScreen.WorkingArea.Height - this.Height);
        }
Esempio n. 2
0
 public Form1(Dangnhap _dangnhapTemp, string _userTemp, Image _imageTemp)
 {
     InitializeComponent();
     _dangnhapForm    = _dangnhapTemp;
     _userName        = _userTemp;
     lbl_user.Text    = _userName;
     ptb_avatar.Image = _imageTemp;
 }
Esempio n. 3
0
 public Form1(Dangnhap _dangnhapTemp, string _userTemp,Image _imageTemp)
 {
     InitializeComponent();
     _dangnhapForm = _dangnhapTemp;
     _userName = _userTemp;
     lbl_user.Text = _userName;
     ptb_avatar.Image = _imageTemp;
 }
Esempio n. 4
0
 public ClientManager(Dangnhap _dangnhap, Socket _temp)
 {
     dangnhapForm       = _dangnhap;
     socket             = _temp;
     this._Port         = ((IPEndPoint)this.socket.RemoteEndPoint).Port;
     this._ipAdress     = ((IPEndPoint)this.socket.RemoteEndPoint).Address;
     stream             = new NetworkStream(socket);
     bw_receive         = new BackgroundWorker();
     bw_receive.DoWork += bw_receive_DoWork;
     bw_receive.RunWorkerAsync();
 }
Esempio n. 5
0
 public ClientManager(Dangnhap _dangnhap, Socket _temp)
 {
     dangnhapForm = _dangnhap;
     socket = _temp;
     this._Port = ((IPEndPoint)this.socket.RemoteEndPoint).Port;
     this._ipAdress = ((IPEndPoint)this.socket.RemoteEndPoint).Address;
     stream = new NetworkStream(socket);
     bw_receive = new BackgroundWorker();
     bw_receive.DoWork += bw_receive_DoWork;
     bw_receive.RunWorkerAsync();
 }
Esempio n. 6
0
        public Form1(Dangnhap _dangnhapTemp, int stt, string _userTemp, string Email, Image _imageTemp, string status, ClientManager ClientTemp)
        {
            InitializeComponent();
            _dangnhapForm = _dangnhapTemp;
            _stt          = stt;
            _email        = Email;
            _userName     = _userTemp;
            client        = ClientTemp;
            lbl_user.Text = _userName;
            Image RoundedImage = this.RoundCorners(_imageTemp, 55, Color.Transparent);

            ptb_avatar.Image = RoundedImage;
            _image           = _imageTemp;
            _status          = status;
            if (status == "\n")
            {
                txt_status.Text = "Bạn đang nghĩ gì.... 	";
            }
            else
            {
                txt_status.Text = status;
            }

            var pic = new Bitmap(this.bbt_addfriend.BackgroundImage, new Size(this.bbt_addfriend.Width, this.bbt_addfriend.Height));

            this.bbt_addfriend.BackgroundImage = pic;
            var picture = new Bitmap(this.bbt_notice.BackgroundImage, new Size(this.bbt_notice.Width, this.bbt_notice.Height));

            this.bbt_notice.BackgroundImage = picture;
            var picture1 = new Bitmap(this.bbt_check.BackgroundImage, new Size(this.bbt_notice.Width, this.bbt_notice.Height));

            this.bbt_check.BackgroundImage = picture1;
            Rectangle r = Screen.PrimaryScreen.WorkingArea;

            this.StartPosition = FormStartPosition.Manual;
            this.Location      = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width, Screen.PrimaryScreen.WorkingArea.Height - this.Height);
        }