summaryrefslogtreecommitdiff
path: root/Juick/ViewModels/ThreadViewModel.cs
blob: c00485130070ab748f8d6e398df4ad25ceb62d5c (plain) (blame)
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
using Juick.Classes;

namespace Juick.ViewModels
{
    public class ThreadViewModel : PageViewModel
    {
        public ThreadViewModel(AppViewModel context) : base(context)
        {
            
        }

        static readonly string CaptionPropertyName = ExpressionHelper.GetPropertyName<ThreadViewModel>(x => x.Caption);

        private int _mid;
        public int Mid
        {
            get { return _mid; }
            set 
            { 
                _mid = value;
                RestUri = string.Format("/thread?mid={0}", _mid);
                NotifyPropertyChanged(CaptionPropertyName);
            }
        }

        public override string Caption {
            get { return "#" + _mid; }
        }
    }
}