public void AddTheme() { if (Themes != null) { var theme = Themes.Count == 0 || CurrentTheme == null?DefaultTheme?.Clone() : CurrentTheme?.Clone(); if (theme != null) { if (Themes.Count > 0 && Themes.Count(x => x.Name == theme.Name) > 0) { theme.Name += "-copy"; } AddTheme(theme); } } }
public void AddCommand() { var theme = Themes.Count == 0 || CurrentTheme == null?DefaultTheme.Clone() : CurrentTheme.Clone(); if (Themes.Count > 0 && Themes.Count(x => x.Name == theme.Name) > 0) { theme.Name += "-copy"; } Add(theme); }