blob: aa5484b53e1db2ea7ab03cb14cac1fa7bb7f7255 [file] [log] [blame]
Nicolas Jager7c409f32016-09-08 09:35:16 -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
25namespace RingClientUWP
26{
27namespace Controls {
28public ref class SmartPanelItem sealed : public INotifyPropertyChanged
29{
30public:
31 SmartPanelItem();
32
33 virtual event PropertyChangedEventHandler^ PropertyChanged;
Nicolas Jager7c409f32016-09-08 09:35:16 -040034 property Contact^ _contact;
Nicolas Jager5750df02016-09-13 11:20:33 -040035 property Visibility _IncomingCallBar
36 {
37 Visibility get()
38 {
39 return incomingCallBar_;
40 }
41 void set(Visibility value)
42 {
43 incomingCallBar_ = value;
44 PropertyChanged(this, ref new PropertyChangedEventArgs("_IncomingCallBar"));
45 }
46 }
47 property Visibility _OutGoingCallBar
48 {
49 Visibility get()
50 {
51 return outGoingCallBar_;
52 }
53 void set(Visibility value)
54 {
55 outGoingCallBar_ = value;
56 PropertyChanged(this, ref new PropertyChangedEventArgs("_OutGoingCallBar"));
57 }
58 }
Nicolas Jager7c409f32016-09-08 09:35:16 -040059 property Visibility _callBar
60 {
61 Visibility get()
62 {
63 return callBar_;
64 }
65 void set(Visibility value)
66 {
67 callBar_ = value;
68 PropertyChanged(this, ref new PropertyChangedEventArgs("_callBar"));
69 }
70 }
71 property Call^ _call
72 {
73 Call^ get()
74 {
75 return call_;
76 }
77 void set(Call^ value)
78 {
79 call_ = value;
80 PropertyChanged(this, ref new PropertyChangedEventArgs("_call"));
81 }
82 }
83
84protected:
85 void NotifyPropertyChanged(String^ propertyName);
86
87private:
Nicolas Jager5750df02016-09-13 11:20:33 -040088 Visibility incomingCallBar_ = Visibility::Collapsed;
89 Visibility outGoingCallBar_ = Visibility::Collapsed;
Nicolas Jager7c409f32016-09-08 09:35:16 -040090 Visibility callBar_ = Visibility::Collapsed;
91 Call^ call_;
92};
93}
94}
95