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