Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -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 | **************************************************************************/
|
| 19 | #include "pch.h"
|
| 20 |
|
| 21 | #include "SmartPanelItem.h"
|
| 22 |
|
| 23 | using namespace Windows::ApplicationModel::Core;
|
| 24 | using namespace Platform;
|
| 25 | using namespace Windows::Data::Json;
|
| 26 | using namespace Windows::UI::Core;
|
| 27 |
|
| 28 | using namespace RingClientUWP;
|
| 29 | using namespace RingClientUWP::Controls;
|
| 30 | using namespace ViewModel;
|
| 31 |
|
| 32 | SmartPanelItem::SmartPanelItem()
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 33 | {
|
| 34 | /* create an empty call to avoid the call bar */
|
| 35 | _call = ref new Call("", "", "");
|
Nicolas Jager | 9edbea3 | 2016-10-03 09:13:53 -0400 | [diff] [blame^] | 36 | _callId = "";
|
| 37 |
|
Nicolas Jager | c551c36 | 2016-10-01 19:24:50 -0400 | [diff] [blame] | 38 | }
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 39 |
|
| 40 | void
|
| 41 | SmartPanelItem::NotifyPropertyChanged(String^ propertyName)
|
| 42 | {
|
| 43 | CoreApplicationView^ view = CoreApplication::MainView;
|
| 44 | view->CoreWindow->Dispatcher->RunAsync(
|
Nicolas Jager | 9edbea3 | 2016-10-03 09:13:53 -0400 | [diff] [blame^] | 45 | CoreDispatcherPriority::High,
|
Nicolas Jager | 7c409f3 | 2016-09-08 09:35:16 -0400 | [diff] [blame] | 46 | ref new DispatchedHandler([this, propertyName]()
|
| 47 | {
|
| 48 | PropertyChanged(this, ref new PropertyChangedEventArgs(propertyName));
|
| 49 | }));
|
Nicolas Jager | 5750df0 | 2016-09-13 11:20:33 -0400 | [diff] [blame] | 50 | } |