Exemplo n.º 1
0
        public chatmesg(string message, msgtype messagetype)
        {
            InitializeComponent();
            if (message.Contains("/"))
            {
                // Image img = Image.FromFile(message);
                //pictureBox1.Image = img;
                //pictureBox1.ImageLocation = message;

                // pictureBox1.Visible = true;
                // pictureBox1.Refresh();

                //does the work here
                //storing and retreiving values from datadase

                //pictureBox1.Visible = false;
            }
            else
            {
                Iblmessage.Text = message;
                Ibltime.Text    = DateTime.Now.ToShortTimeString();
                if (messagetype.ToString() == "In")
                { //incoming message
                    this.BackColor = Color.FromArgb(0, 164, 147);
                }
                else
                { //outgoing message
                    this.BackColor = Color.Gray;
                }
                //lets add the function which adjust the bubble height
            }
            Setheight();
        }
Exemplo n.º 2
0
        public bubble(string fileName, string filePath, string timee, msgtype messagetype, chatbox2 parent)
        {
            InitializeComponent();
            this.parent = parent;
            saveFileDialog1.FileName = fileName;
            this.path       = filePath;
            time.Text       = timee;
            msg.Text        = "Filenadsssssssssssssssssssssssssssssssmesssssssssssssssssssssssssssssssssssssssssssme:";
            nameOfFile.Text = fileName;

            if (messagetype.ToString() == "In")
            {
                this.BackColor = Color.Gray;
                this.bunifuFlatButton1.Normalcolor  = Color.FromArgb(26, 177, 136);
                this.bunifuFlatButton1.OnHovercolor = Color.FromArgb(20, 155, 118);
            }
            else
            {
                this.BackColor = Color.FromArgb(26, 177, 136);
                this.bunifuFlatButton1.Normalcolor  = Color.Gray;
                this.bunifuFlatButton1.OnHovercolor = Color.DimGray;
            }
            msg.Visible               = false;
            bunifuFlatButton1.Top     = 25;
            bunifuFlatButton1.Left    = 250;
            bunifuFlatButton1.Visible = true;
            labelFilename.Visible     = true;
            nameOfFile.Visible        = true;
        }
Exemplo n.º 3
0
 public chatmesg(string message, string time, msgtype messagetype)
 {
     InitializeComponent();
     Iblmessage.Text = message;
     Ibltime.Text    = time;
     if (messagetype.ToString() == "In")
     { //incoming message
         this.BackColor = Color.FromArgb(0, 164, 147);
     }
     else
     { //outgoing message
         this.BackColor = Color.Gray;
     }
     //lets add the function which adjust the bubble height
     Setheight();
 }
Exemplo n.º 4
0
 public bubble(string message, string timee, msgtype messagetype, chatbox2 parent)
 {
     InitializeComponent();
     msg.Text    = message;
     time.Text   = timee;
     this.parent = parent;
     if (messagetype.ToString() == "In")
     {
         this.BackColor = Color.Gray;
     }
     else
     {
         this.BackColor = Color.FromArgb(26, 177, 136);
     }
     Setheight();
 }
Exemplo n.º 5
0
        public bubble(string message, string time, msgtype messagetype)
        {
            InitializeComponent();
            lblmessgae.Text = message;
            lbltime.Text    = time;

            if (messagetype.ToString() == "In")
            {
                BackColor = Color.FromArgb(0, 164, 147);
            }
            else
            {
                BackColor = Color.Gray;
            }

            Setheight();
        }
Exemplo n.º 6
0
        public bubble(string message, msgtype messagetype)
        {
            InitializeComponent();

            // Set the text in the bubble from the message in the parameter.
            lblmessage.Text = message;

            // Change Color based on Message type.
            if (messagetype.ToString() == "In")
            {
                // incoming User message
                this.BackColor = Color.Gray;
            }
            else
            {
                // Outgoing Bot Message
                this.BackColor = Color.FromArgb(0, 164, 147);
            }
            Setheight();
        }
Exemplo n.º 7
0
        public bubble(Image img, String timee, msgtype messagetype, chatbox2 parent)
        {
            InitializeComponent();
            this.parent = parent;
            this.img    = img;
            msg.Text    = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdfffffffffffffffffffffffffsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdfffffffffffffffffffffffffsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdfffffffffffffffffffffffffsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdfffffffffffffffffffffffffsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdfffffffffffffffffffffffffsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
            time.Text   = timee;

            if (messagetype.ToString() == "In")
            {
                this.BackColor = Color.Gray;
            }
            else
            {
                this.BackColor = Color.FromArgb(26, 177, 136);
            }
            this.Height         = 360;
            this.Width          = 458;
            pictureBox1.Visible = true;
            pictureBox1.Image   = ResizeImage(img, 350, 350);
            pictureBox1.Top     = 25;
            pictureBox1.Left    = 30;
            msg.Visible         = false;
        }