blob: b8a46da8b0a8e6ebe5beb368e9a43c0c32ed40fe [file] [log] [blame]
Nicolas Jagerbf406b22016-10-21 11:32:33 -04001#pragma once
2/**************************************************************************
3* Copyright (C) 2016 by Savoir-faire Linux *
4* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
5* Author: Traczyk Andreas <traczyk.andreas@savoirfairelinux.com> *
6* *
7* This program is free software; you can redistribute it and/or modify *
8* it under the terms of the GNU General Public License as published by *
9* the Free Software Foundation; either version 3 of the License, or *
10* (at your option) any later version. *
11* *
12* This program is distributed in the hope that it will be useful, *
13* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15* GNU General Public License for more details. *
16* *
17* You should have received a copy of the GNU General Public License *
18* along with this program. If not, see <http://www.gnu.org/licenses/>. *
19**************************************************************************/
20using namespace Platform;
21using namespace Windows::Data::Json;
22using namespace Windows::UI::Xaml;
23using namespace Windows::UI::Xaml::Data;
24
Nicolas Jager72b42922016-10-25 07:52:42 -040025#include <RingDebug.h>
26
Nicolas Jagerbf406b22016-10-21 11:32:33 -040027namespace RingClientUWP
28{
29namespace Controls {
30public ref class AccountListItem sealed : public INotifyPropertyChanged
31{
32public:
33 AccountListItem(Account^ a);
34
35 virtual event PropertyChangedEventHandler^ PropertyChanged;
36 property Account^ _account;
37 property bool _isSelected {
38 void set(bool value) {
39 isSelected_ = value;
Nicolas Jager5a197d52016-10-25 11:24:03 -040040 if (!_disconnected)
41 NotifyPropertyChanged("_isSelected");
Nicolas Jagerbf406b22016-10-21 11:32:33 -040042 }
43 bool get() {
44 return isSelected_;
45 }
46 }
Nicolas Jager6abfc0d2016-10-21 14:57:47 -040047 property bool _editionMode;
Nicolas Jager5a197d52016-10-25 11:24:03 -040048 property bool _disconnected;
Nicolas Jagerbf406b22016-10-21 11:32:33 -040049
50protected:
51 void NotifyPropertyChanged(String^ propertyName);
52
53private:
54 bool isSelected_;
Nicolas Jagerbf406b22016-10-21 11:32:33 -040055};
56}
57}
58