From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点
---
Plugin.TestResult/Constant/CommonConstant.cs | 72 ++++++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+), 0 deletions(-)
diff --git a/Plugin.TestResult/Constant/CommonConstant.cs b/Plugin.TestResult/Constant/CommonConstant.cs
new file mode 100644
index 0000000..b9cb371
--- /dev/null
+++ b/Plugin.TestResult/Constant/CommonConstant.cs
@@ -0,0 +1,72 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Data;
+
+namespace Plugin.TestResult_WPF.Constant
+{
+ public class CommonStatus
+ {
+ public static readonly string OK = "ok";
+ public static readonly string NG = "ng";
+ public static readonly string WAITING = "waiting";
+ public static readonly string CHECKINFAILED = "checkInFailed";
+ public static readonly string CHECK_IN = "checkIn";
+ public static readonly string TESTING = "testing";
+ public static readonly string ALERT = "alert";
+ public static readonly string READY = "ready";
+
+ private static string[] cache = new string[] { "ok", "ng", "waiting", "checkInFailed", "checkIn", "testing", "alert", "ready" };
+
+ public static readonly Dictionary<string, string> STATUS_MAP = new Dictionary<string, string>() {
+ { "ok","姝e父"},
+ { "ng","寮傚父"},
+ { "waiting","绛夊緟涓�"},
+ { "checkInFailed","CheckIn澶辫触"},
+ { "checkIn","CheckIn"},
+ { "testing","娴嬭瘯涓�"},
+ { "alert","鎶ヨ"},
+ { "ready","鍑嗗灏辩华"},
+ { "abort","鎵嬪姩鍋滄"},
+ };
+
+ public static readonly Dictionary<string, SolidBrush> COLOR_MAP = new Dictionary<string, SolidBrush>() {
+ { "ok",new SolidBrush(Color.FromArgb(0,0,0,0))},
+ { "ng",new SolidBrush(Color.FromArgb(0,0,0,0))},
+ { "waiting",new SolidBrush(Color.FromArgb(0,0,0,0))},
+ { "testing",new SolidBrush(Color.FromArgb(0,0,0,0))},
+ { "checkInFailed",new SolidBrush(Color.FromArgb(0,0,0,0))},
+ { "checkIn",new SolidBrush(Color.FromArgb(0,0,0,0))},
+ { "abort",new SolidBrush(Color.FromArgb(0,0,0,0))},
+ };
+
+ public static string GetRandomStatus()
+ {
+ return cache[new Random().Next(cache.Length)];
+ }
+
+ public static string GetStatusDescription(string status)
+ {
+ if (STATUS_MAP.ContainsKey(status)) return STATUS_MAP[status];
+ return "";
+ }
+ }
+
+ public class StatusColorConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is string status)
+ {
+
+ }
+ return null;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
--
Gitblit v1.9.1