public EffectColorThemeComponent(ThemeComponentType componentType, string componentName, EffectColor componentEffectColor, bool componentTemporary) { ComponentType = componentType; ComponentName = componentName ?? throw new ArgumentException("Null parameters not allowed in EffectColorThemeComponent constructor"); EffectColor = componentEffectColor; Temporary = componentTemporary; }
public bool ComponentExists(ThemeComponentType componentType, string componentName) { var componentCount = Components.Count(c => c.ComponentName == componentName && c.ComponentType == componentType); return(componentCount > 0); }
private void OnAddThemeComponentCommand(ThemeComponentType themeComponentType) { switch (themeComponentType) { case ThemeComponentType.BackgroundColor: case ThemeComponentType.BorderColor: case ThemeComponentType.TextColor: Components.Add(new ColorThemeComponent(themeComponentType, "Untitled Component", new Color { A = 240, R = 255, G = 255, B = 255 })); break; case ThemeComponentType.FontSize: Components.Add(new IntegerThemeComponent(themeComponentType, "Untitled Component", 35)); break; case ThemeComponentType.AlertSound: Components.Add(new StrIntThemeComponent(themeComponentType, "Untitled Component", "1", 100)); break; case ThemeComponentType.CustomSound: Components.Add(new StringThemeComponent(themeComponentType, "Untitled Component", "")); break; case ThemeComponentType.Icon: Components.Add(new IconThemeComponent(themeComponentType, "Untitled Component", IconSize.Largest, IconColor.Red, IconShape.Circle)); break; case ThemeComponentType.Effect: Components.Add(new EffectColorThemeComponent(themeComponentType, "Untitled Component", EffectColor.Red, false)); break; } }
private void OnAddThemeComponentCommand(ThemeComponentType themeComponentType) { Components.Add(new ThemeComponent(themeComponentType, "Untitled Component", new Color { A = 255, R = 255, G = 255, B = 255 })); }
public ThemeComponent(ThemeComponentType componentType, string componentName, Color componentColor) { if (componentName == null || componentColor == null) { throw new ArgumentException("Null parameters not allowed in ThemeComponent constructor"); } ComponentType = componentType; Color = componentColor; ComponentName = componentName; }
public IntegerThemeComponent(ThemeComponentType componentType, string componentName, int componentValue) { if (componentName == null) { throw new ArgumentException("Null parameters not allowed in IntegerThemeComponent constructor"); } ComponentType = componentType; Value = componentValue; ComponentName = componentName; }
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, EffectColor componentEffectColor, bool componentTemporary) { if (ComponentExists(componentType, componentName)) { return(Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType)); } var component = new EffectColorThemeComponent(componentType, componentName, componentEffectColor, componentTemporary); Items.Add(component); return(component); }
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape) { if (ComponentExists(componentType, componentName)) { return(Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType)); } var component = new IconThemeComponent(componentType, componentName, componentIconSize, componentIconColor, componentIconShape); Items.Add(component); return(component); }
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, string componentValue) { if (ComponentExists(componentType, componentName)) { return(Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType)); } var component = new StringThemeComponent(componentType, componentName, componentValue); Items.Add(component); return(component); }
public IconThemeComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape) { if (componentName == null) { throw new ArgumentException("Null parameters not allowed in IconThemeComponent constructor"); } ComponentType = componentType; ComponentName = componentName; IconSize = componentIconSize; IconColor = componentIconColor; IconShape = componentIconShape; }
public StringThemeComponent(ThemeComponentType componentType, string componentName, string componentValue) { if (componentName == null || componentValue == null) { throw new ArgumentException("Null parameters not allowed in StringThemeComponent constructor"); } ComponentType = componentType; Value = componentValue; ComponentName = componentName; if (_customSoundsAvailable == null || _customSoundsAvailable.Count < 1) { _customSoundsAvailable = new ObservableCollection <string>(); var poeFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString() + @"\My Games\Path of Exile\"; if (System.IO.Directory.Exists(poeFolderPath)) { var poeFolderFiles = System.IO.Directory.GetFiles(poeFolderPath).Where( s => s.EndsWith(".mp3") || s.EndsWith(".wav") || s.EndsWith(".wma") || s.EndsWith(".3gp") || s.EndsWith(".aag") || s.EndsWith(".m4a") || s.EndsWith(".ogg") ).OrderBy(f => f); foreach (var file in poeFolderFiles) { _customSoundsAvailable.Add(file.Replace(poeFolderPath, "")); } } } if (string.IsNullOrWhiteSpace(Value)) { Value = _customSoundsAvailable.Count > 0 ? _customSoundsAvailable[0] : ""; } else if (_customSoundsAvailable.IndexOf(Value) < 0) { _customSoundsAvailable.Add(Value); } CustomSoundFileDialogCommand = new RelayCommand(OnCustomSoundFileDialog); }
public void AddComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue) { Components.Add(new StrIntThemeComponent(componentType, componentName, componentValue, componentSecondValue)); }
public void AddComponent(ThemeComponentType componentType, string componentName, int componentValue) { Components.Add(new IntegerThemeComponent(componentType, componentName, componentValue)); }
public void AddComponent(ThemeComponentType componentType, string componentName, Color componentColor) { Components.Add(new ColorThemeComponent(componentType, componentName, componentColor)); }
public void AddComponent(ThemeComponentType componentType, string componentName, Color componentColor) { _components.Add(new ThemeComponent(componentType, componentName, componentColor)); }
private void OnAddThemeComponentCommand(ThemeComponentType themeComponentType) { Components.Add(new ThemeComponent(themeComponentType, "Untitled Component", new Color {A = 255, R = 255, G = 255, B = 255})); }
public bool ComponentExists(ThemeComponentType componentType, string componentName) { var componentCount = _components.Count(c => c.ComponentName == componentName && c.ComponentType == componentType); return componentCount > 0; }