public MessageFormatting()
 {
     InitializeComponent();
     this.FormattingListComboBox.DrawMode  = DrawMode.OwnerDrawFixed;
     this.FormattingListComboBox.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.FormattingListComboBox_DrawItem);
     mobile.SMSProvider.SMSReceived       += ShowMessage;
     SMSProvider.SMSStartSendingDelegate startDel = mobile.SMSProvider.ReceiveMessage;
     startDel.BeginInvoke(100, null, null);
 }
示例#2
0
        public void EventMessageTest()
        {
            SimCorpMobilePhone mobile = new SimCorpMobilePhone();

            mobile.SMSProvider.SMSReceived += CheckEventMessage;
            SMSProvider.SMSStartSendingDelegate startDel = mobile.SMSProvider.ReceiveMessage;
            startDel(1);
            var expectedEventMessage = "Message #0 received!";

            Assert.AreEqual(expectedEventMessage, actualEventMessage);
        }