Created
October 21, 2015 15:22
-
-
Save pjmagee/c5ea3f29b63be5d23d71 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Caliburn.Micro; | |
namespace SwtorCaster.ViewModels | |
{ | |
using System.Windows.Media; | |
using SwtorCaster.Core; | |
using SwtorCaster.Core.Domain; | |
public class AbilitySettingViewModel : PropertyChangedBase | |
{ | |
private readonly AbilitySetting _abilitySetting; | |
private readonly SettingsViewModel _settingsViewModel; | |
public AbilitySetting AbilitySetting => _abilitySetting; | |
public AbilitySettingViewModel(AbilitySetting abilitySetting, SettingsViewModel settingsViewModel) | |
{ | |
_abilitySetting = abilitySetting; | |
_settingsViewModel = settingsViewModel; | |
} | |
public string Id | |
{ | |
get { return _abilitySetting.AbilityId; } | |
set { _abilitySetting.AbilityId = value; } | |
} | |
public string Image | |
{ | |
get { return _abilitySetting.Image; } | |
set { _abilitySetting.Image = value; } | |
} | |
public Color Border | |
{ | |
get { return _abilitySetting.BorderColor.ToColorFromRgb(); } | |
set { _abilitySetting.BorderColor = value.ToRgbFromColor(); } | |
} | |
public void Delete() | |
{ | |
_settingsViewModel.AbilitySettingViewModels.Remove(this); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment