Пример #1
0
 public void PrintMessage(RunMessages message)
 {
     _syncContext.Post(x =>
     {
         printMessage((RunMessages)x);
     }, message);
 }
Пример #2
0
        private void printMessage(RunMessages message)
        {
            var msg    = message;
            var normal = true;
            var color  = "Black";

            if (msg.Type == RunMessageType.Succeeded)
            {
                color  = "Green";
                normal = false;
            }
            if (msg.Type == RunMessageType.Failed)
            {
                color  = "Red";
                normal = false;
            }

            _printMessage(msg.Message, color, normal);
        }
Пример #3
0
        private void printMessage(RunMessages message)
        {
            var msg = message;

            label1.Text = msg.Message;
            if (msg.Type == RunMessageType.Normal)
            {
                label1.ForeColor = Color.Black;
                label1.Font      = new Font(label1.Font, FontStyle.Regular);
            }
            if (msg.Type == RunMessageType.Succeeded)
            {
                label1.ForeColor = Color.Green;
                label1.Font      = new Font(label1.Font, FontStyle.Bold);
            }
            if (msg.Type == RunMessageType.Failed)
            {
                label1.ForeColor = Color.Red;
                label1.Font      = new Font(label1.Font, FontStyle.Bold);
            }
            label1.Refresh();
        }
Пример #4
0
 private void printMessage(RunMessages message)
 {
     var msg = message;
     label1.Text = msg.Message;
     if (msg.Type == RunMessageType.Normal)
     {
         label1.ForeColor = Color.Black;
         label1.Font = new Font(label1.Font, FontStyle.Regular);
     }
     if (msg.Type == RunMessageType.Succeeded)
     {
         label1.ForeColor = Color.Green;
         label1.Font = new Font(label1.Font, FontStyle.Bold);
     }
     if (msg.Type == RunMessageType.Failed)
     {
         label1.ForeColor = Color.Red;
         label1.Font = new Font(label1.Font, FontStyle.Bold);
     }
     label1.Refresh();
 }
Пример #5
0
 public void PrintMessage(RunMessages message)
 {
     _syncContext.Post(x => printMessage((RunMessages)x), message);
 }
        private void printMessage(RunMessages message)
        {
            var msg = message;
            var normal = true;
            var color = "Black";

            if (msg.Type == RunMessageType.Succeeded)
            {
                color = "Green";
                normal = false;
            }
            if (msg.Type == RunMessageType.Failed)
            {
                color = "Red";
                normal = false;
            }

            _printMessage(msg.Message, color, normal);
        }