if (String.IsNullOrEmpty(txtMessage.Text))
return;
if (WhatSocket.Instance != null)
{
if (WhatSocket.Instance.ConnectionStatus == ApiBase.CONNECTION_STATUS.LOGGEDIN)
{
if (txtMessage.Text == "Image")
{
byte[] img = File.ReadAllBytes(fileName);
WhatSocket.Instance.SendMessageImage(txtto.Text + "@s.whatsapp.net", img, ApiBase.ImageType.JPEG);
}
else {
WhatSocket.Instance.SendMessage(txtto.Text, txtMessage.Text);
}
txtstatus.Text += string.Format("\r\n {0}:{1}", user.Nickname, txtMessage.Text);
txtMessage.Clear();
txtMessage.Focus();
}
}
return;
if (WhatSocket.Instance != null)
{
if (WhatSocket.Instance.ConnectionStatus == ApiBase.CONNECTION_STATUS.LOGGEDIN)
{
if (txtMessage.Text == "Image")
{
byte[] img = File.ReadAllBytes(fileName);
WhatSocket.Instance.SendMessageImage(txtto.Text + "@s.whatsapp.net", img, ApiBase.ImageType.JPEG);
}
else {
WhatSocket.Instance.SendMessage(txtto.Text, txtMessage.Text);
}
txtstatus.Text += string.Format("\r\n {0}:{1}", user.Nickname, txtMessage.Text);
txtMessage.Clear();
txtMessage.Focus();
}
}
1 Comments
i got error yar not authrised
ReplyDeleteplease give me suggestion