示例#1
0
		static void InitColorInfos(ColorInfo[] infos) {
			foreach (var info in infos) {
				int i = ToIndex(info.ColorType);
				if (colorInfos[i] != null) {
					Debug.Fail("Duplicate");
					throw new Exception("Duplicate");
				}
				colorInfos[i] = info;
				InitColorInfos(info.Children);
			}
		}
示例#2
0
 FontWeight?GetFontWeight(ColorInfo info, bool canIncludeDefault)
 {
     while (info != null)
     {
         if (!canIncludeDefault && info.ColorType == ColorType.DefaultText)
         {
             break;
         }
         var color = hlColors[ToIndex(info.ColorType)];
         var val   = color.OriginalColor.FontWeight;
         if (val != null)
         {
             return(val);
         }
         info = info.Parent;
     }
     return(null);
 }
示例#3
0
		FontWeight? GetFontWeight(ColorInfo info, bool canIncludeDefault) {
			while (info != null) {
				if (!canIncludeDefault && info.ColorType == ColorType.DefaultText)
					break;
				var color = hlColors[ToIndex(info.ColorType)];
				var val = color.OriginalColor.FontWeight;
				if (val != null)
					return val;
				info = info.Parent;
			}
			return null;
		}
示例#4
0
		public Color(ColorInfo colorInfo) {
			ColorInfo = colorInfo;
		}
示例#5
0
文件: Color.cs 项目: haise0/dnSurgeon
#pragma warning disable CS8618 // Non-nullable field is uninitialized.
        public Color(ColorInfo colorInfo) => ColorInfo = colorInfo;
示例#6
0
 public Color(ColorInfo colorInfo)
 {
     this.ColorInfo = colorInfo;
 }
示例#7
0
 public Color(ColorInfo colorInfo)
 {
     ColorInfo = colorInfo;
 }
示例#8
0
 public Color(ColorInfo colorInfo)
 {
     this.ColorInfo = colorInfo;
 }