Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 1 | #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 | **************************************************************************/
|
| 20 | using namespace Platform;
|
| 21 | using namespace Windows::Data::Json;
|
| 22 | using namespace Windows::UI::Xaml;
|
| 23 | using namespace Windows::UI::Xaml::Data;
|
| 24 |
|
| 25 | namespace RingClientUWP
|
| 26 | {
|
| 27 | namespace Controls {
|
| 28 | public ref class SmartPanelItem sealed : public INotifyPropertyChanged
|
| 29 | {
|
| 30 | public:
|
| 31 | SmartPanelItem();
|
| 32 |
|
| 33 | virtual event PropertyChangedEventHandler^ PropertyChanged;
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 34 | property Contact^ _contact;
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 35 | /*property Call^ _call
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 36 | {
|
| 37 | Call^ get()
|
| 38 | {
|
| 39 | return call_;
|
| 40 | }
|
| 41 | void set(Call^ value)
|
| 42 | {
|
| 43 | call_ = value;
|
| 44 | PropertyChanged(this, ref new PropertyChangedEventArgs("_call"));
|
| 45 | }
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 46 | }*/
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 47 | property Visibility _hovered
|
| 48 | {
|
| 49 | Visibility get()
|
| 50 | {
|
| 51 | return hovered_;
|
| 52 | }
|
| 53 | void set(Visibility value)
|
| 54 | {
|
| 55 | hovered_ = value;
|
Nicolas Jager | d8e4959 | 2016-10-25 08:00:11 -0400 | [diff] [blame^] | 56 | NotifyPropertyChanged("_hovered");
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 57 | }
|
| 58 | }
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 59 |
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 60 | property String^ _callId; /*{
|
| 61 | String^ get() {
|
| 62 | return callId_;
|
| 63 | }
|
| 64 | void set(String^ value) {
|
| 65 | _callId = value;
|
| 66 | }
|
| 67 | }*/
|
| 68 | property CallStatus _callStatus {
|
| 69 | CallStatus get() {
|
| 70 | return callStatus_;
|
| 71 | }
|
| 72 | void set(CallStatus value) {
|
| 73 | callStatus_ = value;
|
Nicolas Jager | d8e4959 | 2016-10-25 08:00:11 -0400 | [diff] [blame^] | 74 | NotifyPropertyChanged("_callStatus");
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 75 | }
|
| 76 | }
|
Nicolas Jager | 9edbea3 | 2016-10-03 09:13:53 -0400 | [diff] [blame] | 77 |
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 78 | protected:
|
| 79 | void NotifyPropertyChanged(String^ propertyName);
|
| 80 |
|
| 81 | private:
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 82 | Visibility hovered_ = Visibility::Collapsed;
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 83 | CallStatus callStatus_;
|
| 84 | String^ callId_;
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 85 |
|
Nicolas Jager | 083b3ae | 2016-10-04 08:46:19 -0400 | [diff] [blame] | 86 | void OncallPlaced(Platform::String ^callId);
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 87 | };
|
| 88 | }
|
| 89 | }
|
| 90 |
|