将PollLevelType类型改为int类型

This commit is contained in:
2025-09-05 19:59:21 +08:00
parent 8b86f079e5
commit 6e123b47cc
16 changed files with 88 additions and 146 deletions

View File

@@ -3,20 +3,19 @@ using System.Collections.Generic;
using System.Linq;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using DMS.Core.Enums;
namespace DMS.WPF.ViewModels.Dialogs
{
public partial class PollLevelDialogViewModel : DialogViewModelBase<PollLevelType?>
public partial class PollLevelDialogViewModel : DialogViewModelBase<int?>
{
[ObservableProperty]
private PollLevelType _selectedPollLevelType;
private int _selectedPollLevelType;
public List<PollLevelType> PollLevelTypes { get; }
public List<int> PollLevelTypes { get; }
public PollLevelDialogViewModel(PollLevelType currentPollLevelType)
public PollLevelDialogViewModel(int currentPollLevelType)
{
PollLevelTypes = Enum.GetValues(typeof(PollLevelType)).Cast<PollLevelType>().ToList();
PollLevelTypes = new List<int> { 10, 100, 500, 1000, 5000, 10000, 20000, 30000, 60000, 180000, 300000, 600000, 1800000, 3600000 };
SelectedPollLevelType = currentPollLevelType;
Title = "修改轮询频率";
PrimaryButText = "确定";