コード例 #1
0
 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 }));
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        public void TestNoneFormat()
        {
            //Arrange
            Init();

            //Act
            _format.ApplyFormat(0);
            string res = _format.Formatter(TestStr);

            //Assert
            Assert.AreEqual(res, TestStr);
        }