| | |
| | | /// </summary> |
| | | public partial class SettingControl : PluginControl |
| | | { |
| | | #region ... |
| | | public virtual event PropertyChangedEventHandler PropertyChanged; |
| | | |
| | | protected virtual void Set(string name) |
| | | { |
| | | |
| | | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); |
| | | } |
| | | |
| | | protected void Set<T>(ref T old, T @new, [CallerMemberName] string propertyName = null) |
| | | { |
| | | old = @new; |
| | | if (propertyName != null) |
| | | { |
| | | Set(propertyName); |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 属性 |
| | | private ILog log; |
| | | private ObservableCollection<TabItem> tabItems; |
| | | |
| | | public ObservableCollection<TabItem> TabItems |
| | | { |
| | | get { return tabItems; } |
| | | set { Set(ref tabItems, value); } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region PluginApi |
| | | |
| | | public object Init() |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | public object Active() |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | public object DeActive() |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | public void OnTabChange(object sender, object args) |
| | | { |
| | | |
| | | } |
| | | |
| | | public void SetLogger(ILog logger) |
| | | { |
| | | log = logger; |
| | | } |
| | | #endregion |
| | | |