37 lines
889 B
C#
37 lines
889 B
C#
using System;
|
|
using System.Windows.Controls;
|
|
using Prism.Events;
|
|
|
|
namespace MaterialModernWPF.Service
|
|
{
|
|
public abstract class CalculationPackage
|
|
{
|
|
private readonly IEventAggregator _eventAggregator;
|
|
private bool _isSelected;
|
|
|
|
protected CalculationPackage(IEventAggregator eventAggregator)
|
|
{
|
|
_eventAggregator = eventAggregator;
|
|
}
|
|
|
|
public abstract string Name { get; }
|
|
|
|
public bool IsSelected
|
|
{
|
|
get => _isSelected;
|
|
set
|
|
{
|
|
if (_isSelected == value) return;
|
|
_isSelected = value;
|
|
_eventAggregator.GetEvent<CalculationPackageSelectionChangedEvent>().Publish((this, value));
|
|
}
|
|
}
|
|
|
|
public abstract Type CalculationViewType { get; }
|
|
}
|
|
|
|
public class CalculationView : UserControl
|
|
{
|
|
|
|
}
|
|
} |