예제 #1
0
파일: Themes.cs 프로젝트: arkanoid1/dnSpy
			public SetThemeCommand(Theme theme) {
				this.theme = theme;
			}
예제 #2
0
		static void UpdateBackground(Theme theme, ColorType colorType) {
			var color = theme.GetColor(colorType).TextInheritedColor;
			App.Current.Resources[GetBackgroundResourceKey(colorType)] = GetBrush(color.Background);
		}
예제 #3
0
파일: Themes.cs 프로젝트: arkanoid1/dnSpy
		static Theme Load(string filename) {
			try {
				var root = XDocument.Load(filename).Root;
				if (root.Name != "theme")
					return null;

				var theme = new Theme(root);
				if (string.IsNullOrEmpty(theme.Name) || string.IsNullOrEmpty(theme.MenuName))
					return null;

				themes[theme.Name] = theme;
				return theme;
			}
			catch (Exception) {
				Debug.Fail(string.Format("Failed to load file '{0}'", filename));
			}
			return null;
		}