/// <summary> /// Zobrazí chybovou hlášku týkající se sběrnice /// </summary> /// <param name="type">typ hlášky</param> /// <param name="message">text chyby</param> public void showDisgnosticMessage(MessageTypeEnum type, string message) { switch (type) { case MessageTypeEnum.error: //MessageBox.Show(message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); labelMessage.ForeColor = Color.Red; break; case MessageTypeEnum.success: labelMessage.ForeColor = Color.Green; break; case MessageTypeEnum.progress: labelMessage.ForeColor = Color.Blue; break; } if (labelMessage.InvokeRequired) { ShowDisagnosticMessageCallback cb = new ShowDisagnosticMessageCallback(showDisgnosticMessage); this.Invoke(cb, new object[] { type, message }); } else { labelMessage.Text = message; } }