Exemplo n.º 1
0
 void IPhoneInteractionLogger.LogInteraction(InteractionWho fromwho, InteractionWhat what, Color BackgroundColor, string interaction)
 {
     this.BeginInvoke((Action)(() =>
     {
         tmrBuffer.Enabled = true;
         if (fromwho == InteractionWho.server && what == InteractionWhat.Say)
         {
             WordBuffer = WordBuffer + " " + interaction;
             if (WordBuffer.Length < 100)
             {
                 tmrBuffer.Enabled = true;
                 return;
             }
         }
         LogInteractionToLog(fromwho, what, interaction);
     }));
 }
Exemplo n.º 2
0
        private void LogInteractionToLog(InteractionWho fromwho, InteractionWhat what, string interaction)
        {
            richTextBox1.SelectionColor = fromwho == InteractionWho.Phone ? Color.Red : Color.Blue;
            if (what == InteractionWhat.Dial || what == InteractionWhat.Hangup || what == InteractionWhat.Pickup)
            {
                richTextBox1.SelectionFont = new Font(richTextBox1.Font, FontStyle.Bold);
            }
            else
            {
                if (what == InteractionWhat.SMS)
                {
                    richTextBox1.SelectionFont = new Font(richTextBox1.Font, FontStyle.Bold);

                    richTextBox1.SelectionColor = Color.Black;
                }
                else
                {
                    richTextBox1.SelectionFont = new Font(richTextBox1.Font, FontStyle.Regular);
                }
            }

            richTextBox1.AppendText("\n" + DateTime.Now.ToString() + " " + fromwho.ToString() + " " + what.ToString() + " :: " + interaction);
        }