chore: use file-scoped namespace
This commit is contained in:
1 parent
99d2fafb72
commit
bbf1b7d4c6
748 files changed
+57929
-58678
No files matched your search
@@ -5,48 +5,47 @@ using HandyControl.Controls;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Service;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
namespace HandyControlDemo.ViewModel;
|
||||
|
||||
public class StepBarDemoViewModel : DemoViewModelBase<StepBarDemoModel>
|
||||
{
|
||||
public class StepBarDemoViewModel : DemoViewModelBase<StepBarDemoModel>
|
||||
public StepBarDemoViewModel(DataService dataService) => DataList = dataService.GetStepBarDemoDataList();
|
||||
|
||||
private int _stepIndex;
|
||||
|
||||
public int StepIndex
|
||||
{
|
||||
public StepBarDemoViewModel(DataService dataService) => DataList = dataService.GetStepBarDemoDataList();
|
||||
|
||||
private int _stepIndex;
|
||||
|
||||
public int StepIndex
|
||||
{
|
||||
get => _stepIndex;
|
||||
get => _stepIndex;
|
||||
#if NET40
|
||||
set => Set(nameof(StepIndex), ref _stepIndex, value);
|
||||
set => Set(nameof(StepIndex), ref _stepIndex, value);
|
||||
#else
|
||||
set => Set(ref _stepIndex, value);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下一步
|
||||
/// </summary>
|
||||
public RelayCommand<Panel> NextCmd => new(Next);
|
||||
/// <summary>
|
||||
/// 下一步
|
||||
/// </summary>
|
||||
public RelayCommand<Panel> NextCmd => new(Next);
|
||||
|
||||
/// <summary>
|
||||
/// 上一步
|
||||
/// </summary>
|
||||
public RelayCommand<Panel> PrevCmd => new(Prev);
|
||||
/// <summary>
|
||||
/// 上一步
|
||||
/// </summary>
|
||||
public RelayCommand<Panel> PrevCmd => new(Prev);
|
||||
|
||||
private void Next(Panel panel)
|
||||
private void Next(Panel panel)
|
||||
{
|
||||
foreach (var stepBar in panel.Children.OfType<StepBar>())
|
||||
{
|
||||
foreach (var stepBar in panel.Children.OfType<StepBar>())
|
||||
{
|
||||
stepBar.Next();
|
||||
}
|
||||
}
|
||||
|
||||
private void Prev(Panel panel)
|
||||
{
|
||||
foreach (var stepBar in panel.Children.OfType<StepBar>())
|
||||
{
|
||||
stepBar.Prev();
|
||||
}
|
||||
stepBar.Next();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Prev(Panel panel)
|
||||
{
|
||||
foreach (var stepBar in panel.Children.OfType<StepBar>())
|
||||
{
|
||||
stepBar.Prev();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user