-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathCommentPostPanelViewModel.cs
77 lines (69 loc) · 1.96 KB
/
CommentPostPanelViewModel.cs
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
using Common;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
namespace MixchSitePlugin
{
class CommentPostPanelViewModel : ViewModelBase
{
public ICommand PostCommentCommand { get; }
#region Input
private string _input;
public string Input
{
get { return _input; }
set
{
if (_input == value) return;
_input = value;
RaisePropertyChanged();
}
}
#endregion //Input
#region CanPostComment
private bool _canPostComment;
public bool CanPostComment
{
get { return _canPostComment; }
set
{
if (_canPostComment == value) return;
_canPostComment = value;
RaisePropertyChanged();
}
}
#endregion //CanPostComment
private void PostComment(string str)
{
}
private readonly CommentProvider _commentProvider;
private readonly ILogger _logger;
#region Ctors
public CommentPostPanelViewModel()
{
if ((bool)(DesignerProperties.IsInDesignModeProperty.GetMetadata(typeof(DependencyObject)).DefaultValue))
{
}
else
{
throw new NotSupportedException();
}
}
public CommentPostPanelViewModel(CommentProvider commentProvider, ILogger logger)
{
_commentProvider = commentProvider;
_logger = logger;
PostCommentCommand = new RelayCommand(() => PostComment(Input));
Input = "コメント投稿は未対応です";
CanPostComment = false;
}
#endregion
}
}