private void ShowMessages(List <Message> messages) { MessageListView.Items.Clear(); foreach (Message message in messages) { string formattedText = _format.Formatter(message.Text, message.ReceivingTime); MessageListView.Items.Add(new ListViewItem(new[] { message.User, formattedText })); } }
public void OnSMSReceived(string message) { if (InvokeRequired) { Invoke(new SMSProvider.SMSRecievedDelegate(OnSMSReceived), message); return; } string formattedMessage = _format.Formatter(message); formattedMessage += Environment.NewLine; MessageScreen.AppendText(formattedMessage); }
public void TestNoneFormat() { //Arrange Init(); //Act _format.ApplyFormat(0); string res = _format.Formatter(TestStr); //Assert Assert.AreEqual(res, TestStr); }