void gsz_fuction_update_ui_logo
public static void gsz_fuction_update_ui_logo(Sunny.UI.UIRichTextBox RTB, string Message, string FontColor = "red", string FileName = "Operation Information", bool SaveLog = true) { try { string aa = string.Format("{0}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")); if (RTB.InvokeRequired) { RTB.BeginInvoke(new MethodInvoker(delegate { if (RTB.TextLength > 200000) RTB.Text = ""; switch (FontColor) { case "red": RTB.SelectionColor = Color.Red; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "green": RTB.SelectionColor = Color.Green; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "blue": RTB.SelectionColor = Color.Blue; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "white": RTB.SelectionColor = Color.White; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "black": RTB.SelectionColor = Color.Black; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "Fuchsia": RTB.SelectionColor = Color.Fuchsia; RTB.AppendText(aa + " " + Message + "\r\n"); break; } RTB.ScrollToCaret(); })); } else { if (RTB.TextLength > 200000) RTB.Text = ""; switch (FontColor) { case "red": RTB.SelectionColor = Color.Red; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "green": RTB.SelectionColor = Color.Green; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "blue": RTB.SelectionColor = Color.Blue; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "white": RTB.SelectionColor = Color.White; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "black": RTB.SelectionColor = Color.Black; RTB.AppendText(aa + " " + Message + "\r\n"); break; case "Fuchsia": RTB.SelectionColor = Color.Fuchsia; RTB.AppendText(aa + " " + Message + "\r\n"); break; } RTB.ScrollToCaret(); } } catch (Exception) { } if (SaveLog) { //WriteTxtLog(FileName, Message); } }