|
|
@@ -449,6 +449,23 @@ namespace UAS_MES_NEW.Make
|
|
|
}
|
|
|
lstFiles.Items.Add($"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}] {message}");
|
|
|
lstFiles.TopIndex = lstFiles.Items.Count - 1;
|
|
|
+ lstFiles.DrawMode = DrawMode.OwnerDrawFixed;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void lstFiles_DrawItem_1(object sender, DrawItemEventArgs e)
|
|
|
+ {
|
|
|
+ e.DrawBackground();
|
|
|
+ Brush mybsh = Brushes.Black;
|
|
|
+ if (lstFiles.Items[e.Index].ToString().Contains("NG"))
|
|
|
+ {
|
|
|
+ mybsh = Brushes.Red;
|
|
|
+ }
|
|
|
+ else if (lstFiles.Items[e.Index].ToString().Contains("ERROR"))
|
|
|
+ {
|
|
|
+ mybsh = Brushes.Red;
|
|
|
+ }
|
|
|
+ e.DrawFocusRectangle();
|
|
|
+ e.Graphics.DrawString(lstFiles.Items[e.Index].ToString(), e.Font, mybsh, e.Bounds, StringFormat.GenericDefault);
|
|
|
}
|
|
|
|
|
|
public string CheckFileAccess(string filePath)
|