blob: 35c77deebc1644b2aa8fc466397a724f4d26f634 [file] [log] [blame]
Nicolas Jager7c409f32016-09-08 09:35:16 -04001/**************************************************************************
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**************************************************************************/
19#include "pch.h"
20
21#include "SmartPanelItem.h"
22
23using namespace Windows::ApplicationModel::Core;
24using namespace Platform;
25using namespace Windows::Data::Json;
26using namespace Windows::UI::Core;
27
28using namespace RingClientUWP;
29using namespace RingClientUWP::Controls;
30using namespace ViewModel;
31
32SmartPanelItem::SmartPanelItem()
Nicolas Jagerc551c362016-10-01 19:24:50 -040033{
34 /* create an empty call to avoid the call bar */
35 _call = ref new Call("", "", "");
Nicolas Jager9edbea32016-10-03 09:13:53 -040036 _callId = "";
37
Nicolas Jagerc551c362016-10-01 19:24:50 -040038}
Nicolas Jager7c409f32016-09-08 09:35:16 -040039
40void
41SmartPanelItem::NotifyPropertyChanged(String^ propertyName)
42{
43 CoreApplicationView^ view = CoreApplication::MainView;
44 view->CoreWindow->Dispatcher->RunAsync(
Nicolas Jager9edbea32016-10-03 09:13:53 -040045 CoreDispatcherPriority::High,
Nicolas Jager7c409f32016-09-08 09:35:16 -040046 ref new DispatchedHandler([this, propertyName]()
47 {
48 PropertyChanged(this, ref new PropertyChangedEventArgs(propertyName));
49 }));
Nicolas Jager5750df02016-09-13 11:20:33 -040050}