public void ChangeContactState(int id, bool state) { if (ContactList_State) { int index = ContactObjects.GetIndexById(id); ContactObjects.ContactStruct[index].IsConneced = state; ItemChangeState(index, state); } }
public void WriteAway(int ID, string message) { int index = ContactObjects.GetIndexById(ID); if (ContactObjects.IsOpendMessage(index)) { AddTime(index); string Nick = ContactObjects.ContactStruct[index].Nick; WriteRTB(ContactObjects.ContactStruct[index].MessageDialog.ServerText, String.Format("{0} personal message is : \n{1}", Nick, message), Color.Red, ServerText.Font); } }
public void ChangeTypingState(int TyperId, bool State) { int TyperIndex = ContactObjects.GetIndexById(TyperId); if (ContactObjects.ContactStruct[TyperIndex].IsMessagsOpend) { if (ContactObjects.ContactStruct[TyperIndex].MessageDialog.StatusBox.InvokeRequired) { ChangeTypingStateCallBack thisthread = new ChangeTypingStateCallBack(ChangeTypingState); ContactObjects.ContactStruct[TyperIndex].MessageDialog.Invoke(thisthread, new object[] { TyperId, State }); } else { ContactObjects.ContactStruct[TyperIndex].MessageDialog.StatusBox.Visible = State; ContactObjects.ContactStruct[TyperIndex].MessageDialog.StatusBox.Text = string.Format("{0} is typeing ...", ContactObjects.ContactStruct[TyperIndex].Nick); } } }
public void WriteMessage(int senderid, string message) { int index = ContactObjects.GetIndexById(senderid); if (ContactObjects.IsOpendMessage(index)) { ContactObjects.ContactStruct[index].MessageDialog.Activate(); AddTime(index); string format = ContactObjects.ContactStruct[index].Nick + " Says: " + message; WriteRTB(ContactObjects.ContactStruct[index].MessageDialog.ServerText, message, Color.Red, ServerText.Font); } else { OpenDialog(index); Thread.Sleep(100); WriteMessage(senderid, message); } }