private void HamMaHoa(byte[] buff) { MyStruct.Structure str = new MyStruct.Structure(); MemoryStream stream = new MemoryStream(buff); BinaryFormatter bFormat = new BinaryFormatter(); str = (Structure)bFormat.Deserialize(stream); rtbMsg.SelectionFont = str.MyFont; rtbMsg.SelectionColor = str.MyColor; rtbMsg.AppendText(str.TextChat); rtbMsg.ScrollToCaret(); }
public Structure(Structure st) { this.TextChat = st.TextChat; this.MyFont = st.MyFont; this.MyColor = st.MyColor; }