using System; using Material.Icons; namespace Artemis.UI.Shared.Services.ProfileEditor; /// /// Represents a profile editor tool. /// public interface IToolViewModel : IDisposable { /// /// Gets or sets a boolean indicating whether the tool is selected. /// public bool IsSelected { get; set; } /// /// Gets a boolean indicating whether the tool is enabled. /// public bool IsEnabled { get; } /// /// Gets a boolean indicating whether or not this tool is exclusive. /// Exclusive tools deactivate any other exclusive tools when activated. /// public bool IsExclusive { get; } /// /// Gets or sets a boolean indicating whether this tool should be shown in the toolbar. /// public bool ShowInToolbar { get; } /// /// Gets the order in which this tool should appear in the toolbar. /// public int Order { get; } /// /// Gets the icon which this tool should show in the toolbar. /// public MaterialIconKind Icon { get; } /// /// Gets the tooltip which this tool should show in the toolbar. /// public string ToolTip { get; } } /// public abstract class ToolViewModel : ActivatableViewModelBase, IToolViewModel { private bool _isSelected; /// /// Releases the unmanaged resources used by the object and optionally releases the managed resources. /// /// /// to release both managed and unmanaged resources; /// to release only unmanaged resources. /// protected virtual void Dispose(bool disposing) { if (disposing) { } } /// public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } #region Implementation of IToolViewModel /// public bool IsSelected { get => _isSelected; set => RaiseAndSetIfChanged(ref _isSelected, value); } /// public abstract bool IsEnabled { get; } /// public abstract bool IsExclusive { get; } /// public abstract bool ShowInToolbar { get; } /// public abstract int Order { get; } /// public abstract MaterialIconKind Icon { get; } /// public abstract string ToolTip { get; } #endregion }