Esempio n. 1
0
        /// <summary>
        /// Выставляет состояние индикатора эмулятора
        /// </summary>
        /// <param name="statusEmulator"></param>
        private void StatusLabel(StatusCommunications status, object o, string text = "")
        {
            string textLabel = "";
            Color  col       = Color.Black;

            switch (status)
            {
            case StatusCommunications.Default:
                textLabel = "Выбирете порт и нажмите 'Test'";
                col       = Color.Black;
                break;

            case StatusCommunications.Found:
                textLabel = "Обнаружен: ";
                col       = Color.Green;
                break;

            case StatusCommunications.NotFound:
                textLabel = "Устройство не обнаружено";
                col       = Color.Red;
                break;

            case StatusCommunications.Search:
                textLabel = "Поиск...";
                col       = Color.Yellow;
                break;

            default:
                break;
            }
            StatusLabel(textLabel + " " + text, col, o);
        }
Esempio n. 2
0
 /// <summary>
 /// Выставляет состояние индикатора эмулятора
 /// </summary>
 /// <param name="statusEmulator"></param>
 private void StatusLabel(StatusCommunications status, object o, string text = "")
 {
     string textLabel = "";
     Color col = Color.Black;
     switch (status)
     {
         case StatusCommunications.Default:
             textLabel = "Выбирете порт и нажмите 'Test'";
             col = Color.Black;
             break;
         case StatusCommunications.Found:
             textLabel = "Обнаружен: ";
             col = Color.Green;
             break;
         case StatusCommunications.NotFound:
             textLabel = "Устройство не обнаружено";
             col = Color.Red;
             break;
         case StatusCommunications.Search:
             textLabel = "Поиск...";
             col = Color.Yellow;
             break;
         default:
             break;
     }
     StatusLabel(textLabel + " " + text, col, o);
 }