예제 #1
0
파일: Theme.cs 프로젝트: se7ensoft/dnSpy
 HighlightingBrush GetForeground(ColorInfo info, bool canIncludeDefault)
 {
     while (info != null) {
         if (!canIncludeDefault && info.ColorType == ColorType.DefaultText)
             break;
         var color = hlColors[(int)info.ColorType];
         var val = color.OriginalColor.Foreground;
         if (val != null)
             return val;
         info = info.Parent;
     }
     return null;
 }
예제 #2
0
파일: Theme.cs 프로젝트: se7ensoft/dnSpy
 static void InitColorInfos(ColorInfo[] infos)
 {
     foreach (var info in infos) {
         int i = (int)info.ColorType;
         if (colorInfos[i] != null) {
             Debug.Fail("Duplicate");
             throw new Exception("Duplicate");
         }
         colorInfos[i] = info;
         InitColorInfos(info.Children);
     }
 }
예제 #3
0
파일: Theme.cs 프로젝트: se7ensoft/dnSpy
 FontStyle? GetFontStyle(ColorInfo info, bool canIncludeDefault)
 {
     while (info != null) {
         if (!canIncludeDefault && info.ColorType == ColorType.DefaultText)
             break;
         var color = hlColors[(int)info.ColorType];
         var val = color.OriginalColor.FontStyle;
         if (val != null)
             return val;
         info = info.Parent;
     }
     return null;
 }
예제 #4
0
파일: Theme.cs 프로젝트: se7ensoft/dnSpy
 public Color(ColorInfo colorInfo)
 {
     this.ColorInfo = colorInfo;
 }