~ruther/NosTale-PacketLogger

ref: 39ccc8e1759ba341c324146a6268e55dd6d340a3 NosTale-PacketLogger/src/PacketLogger/ViewModels/Settings/SettingsViewModel.cs -rw-r--r-- 1.1 KiB
39ccc8e1 — Rutherther fix: make no profile working correctly, changing to no profile on change 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
//  SettingsViewModel.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Collections.Generic;
using System.Linq;
using PacketLogger.Models.Filters;

namespace PacketLogger.ViewModels.Settings;

/// <inheritdoc />
public class SettingsViewModel : ViewModelBase
{
    private readonly FilterProfiles _filterProfiles;

    /// <summary>
    /// Initializes a new instance of the <see cref="SettingsViewModel"/> class.
    /// </summary>
    /// <param name="filterProfiles">The filter profiles.</param>
    public SettingsViewModel(FilterProfiles filterProfiles)
    {
        _filterProfiles = filterProfiles;
        Settings = new[]
        {
            new FilterSettingsViewModel(filterProfiles)
        };

        SelectedSetting = Settings.First();
    }

    /// <summary>
    /// Gets the setting tabs list.
    /// </summary>
    public IReadOnlyList<SettingViewModelBase> Settings { get; }

    /// <summary>
    /// Gets the currently selected tab.
    /// </summary>
    public SettingViewModelBase SelectedSetting { get; }
}
Do not follow this link