Changeset 12 for Common/Theme.cs
- Timestamp:
- Mar 14, 2020, 1:11:28 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/Theme.cs
r4 r12 1 using System;1 using System; 2 2 using System.Collections.Generic; 3 3 using System.Linq; … … 7 7 using System.Drawing; 8 8 using System.ComponentModel; 9 using System.IO; 9 10 10 11 namespace Common … … 61 62 } 62 63 64 public static Color AdjustColor(Color color) 65 { 66 if (color == Color.White) color = ColorWindow; 67 else if (color == Color.Black) color = ColorWindowText; 68 else 69 { 70 if (Name == "Dark") 71 { 72 // Exchange dark with light colors and vice versa 73 if (color == Color.DarkBlue) color = Color.LightBlue; 74 if (color == Color.LightBlue) color = Color.DarkBlue; 75 else if (color == Color.DarkGreen) color = Color.LightGreen; 76 else if (color == Color.LightGreen) color = Color.DarkGreen; 77 else if (color == Color.DarkRed) color = Color.LightCoral; 78 else if (color == Color.LightCoral) color = Color.DarkRed; 79 else if (color == Color.PowderBlue) color = Color.Navy; 80 else if (color == Color.Navy) color = Color.PowderBlue; 81 else if (color == Color.LightCyan) color = Color.DarkCyan; 82 else if (color == Color.DarkCyan) color = Color.LightCyan; 83 else if (color == Color.Cyan) color = Color.Teal; 84 else if (color == Color.Teal) color = Color.Cyan; 85 else if (color == Color.Yellow) color = Color.Brown; 86 else if (color == Color.Brown) color = Color.Yellow; 87 else if (color == Color.LightGray) color = Color.DarkGray; 88 else if (color == Color.DarkGray) color = Color.LightGray; 89 } 90 } 91 92 return color; 93 } 94 63 95 public static void ApplyTheme(Component component) 64 96 {
Note:
See TracChangeset
for help on using the changeset viewer.