Adjust project structure
This commit is contained in:
1 parent
89875792aa
commit
16ef430a39
82 files changed
+271
-10113
No files matched your search
@@ -1,6 +1,10 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
#endif
|
||||
|
||||
namespace HandyControlDemo.ViewModel.Controls
|
||||
{
|
||||
@@ -11,7 +15,11 @@ namespace HandyControlDemo.ViewModel.Controls
|
||||
public int Count
|
||||
{
|
||||
get => _count;
|
||||
#if netle40
|
||||
set => Set(nameof(Count), ref _count, value);
|
||||
#else
|
||||
set => Set(ref _count, value);
|
||||
#endif
|
||||
}
|
||||
|
||||
public RelayCommand CountCmd => new Lazy<RelayCommand>(() =>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using GalaSoft.MvvmLight;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using System.Threading.Tasks;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
#endif
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Tools.Extension;
|
||||
using HandyControlDemo.UserControl;
|
||||
@@ -17,7 +21,11 @@ namespace HandyControlDemo.ViewModel
|
||||
public string DialogResult
|
||||
{
|
||||
get => _dialogResult;
|
||||
#if netle40
|
||||
set => Set(nameof(DialogResult), ref _dialogResult, value);
|
||||
#else
|
||||
set => Set(ref _dialogResult, value);
|
||||
#endif
|
||||
}
|
||||
|
||||
public RelayCommand ShowTextCmd => new Lazy<RelayCommand>(() =>
|
||||
@@ -28,6 +36,17 @@ namespace HandyControlDemo.ViewModel
|
||||
Dialog.Show(new TextDialog());
|
||||
}
|
||||
|
||||
#if netle40
|
||||
public RelayCommand ShowInteractiveDialogCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(ShowInteractiveDialog)).Value;
|
||||
|
||||
private void ShowInteractiveDialog()
|
||||
{
|
||||
Dialog.Show<InteractiveDialog>()
|
||||
.Initialize<InteractiveDialogViewModel>(vm => vm.Message = DialogResult)
|
||||
.GetResultAsync<string>().ContinueWith(str => DialogResult = str.Result);
|
||||
}
|
||||
#else
|
||||
public RelayCommand ShowInteractiveDialogCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(async () => await ShowInteractiveDialog())).Value;
|
||||
|
||||
@@ -37,5 +56,6 @@ namespace HandyControlDemo.ViewModel
|
||||
.Initialize<InteractiveDialogViewModel>(vm => vm.Message = DialogResult)
|
||||
.GetResultAsync<string>();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
using System;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControlDemo.Window;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
using System;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using HandyControl.Controls;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using HandyControl.Controls;
|
||||
using HandyControlDemo.Data;
|
||||
|
||||
@@ -15,7 +19,11 @@ namespace HandyControlDemo.ViewModel
|
||||
get => _contextMenuIsShow;
|
||||
set
|
||||
{
|
||||
#if netle40
|
||||
Set(nameof(ContextMenuIsShow), ref _contextMenuIsShow, value);
|
||||
#else
|
||||
Set(ref _contextMenuIsShow, value);
|
||||
#endif
|
||||
GlobalData.NotifyIconIsShow = ContextMenuIsShow || ContextContentIsShow;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +33,11 @@ namespace HandyControlDemo.ViewModel
|
||||
public bool ContextMenuIsBlink
|
||||
{
|
||||
get => _contextMenuIsBlink;
|
||||
#if netle40
|
||||
set => Set(nameof(ContextMenuIsBlink), ref _contextMenuIsBlink, value);
|
||||
#else
|
||||
set => Set(ref _contextMenuIsBlink, value);
|
||||
#endif
|
||||
}
|
||||
|
||||
private bool _contextContentIsShow;
|
||||
@@ -35,7 +47,11 @@ namespace HandyControlDemo.ViewModel
|
||||
get => _contextContentIsShow;
|
||||
set
|
||||
{
|
||||
#if netle40
|
||||
Set(nameof(ContextContentIsShow), ref _contextContentIsShow, value);
|
||||
#else
|
||||
Set(ref _contextContentIsShow, value);
|
||||
#endif
|
||||
GlobalData.NotifyIconIsShow = ContextMenuIsShow || ContextContentIsShow;
|
||||
}
|
||||
}
|
||||
@@ -45,7 +61,11 @@ namespace HandyControlDemo.ViewModel
|
||||
public bool ContextContentIsBlink
|
||||
{
|
||||
get => _contextContentIsBlink;
|
||||
#if netle40
|
||||
set => Set(nameof(ContextContentIsBlink), ref _contextContentIsBlink, value);
|
||||
#else
|
||||
set => Set(ref _contextContentIsBlink, value);
|
||||
#endif
|
||||
}
|
||||
|
||||
public RelayCommand<object> MouseCmd => new Lazy<RelayCommand<object>>(() =>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using HandyControl.Data;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Service;
|
||||
@@ -26,7 +30,11 @@ namespace HandyControlDemo.ViewModel
|
||||
public int PageIndex
|
||||
{
|
||||
get => _pageIndex;
|
||||
#if netle40
|
||||
set => Set(nameof(PageIndex), ref _pageIndex, value);
|
||||
#else
|
||||
set => Set(ref _pageIndex, value);
|
||||
#endif
|
||||
}
|
||||
|
||||
public PaginationDemoViewModel(DataService dataService)
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using HandyControl.Controls;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows.Controls;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using HandyControl.Controls;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Service;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using HandyControlDemo.Tools;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
|
||||
Reference in new issue
Block a user