blob: cdbd9e257fc49396ece5045c4decba8026d11e57 [file] [log] [blame]
atraczyk8ce1dee2016-08-25 18:15:07 -04001/***************************************************************************
2 * Copyright (C) 2016 by Savoir-faire Linux *
3 * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
4 * Author: Traczyk Andreas <andreas.traczyk@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
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -040020#include "pch.h"
21
22#include "Account.h"
23
24using namespace Windows::ApplicationModel::Core;
25using namespace Platform;
26using namespace Windows::UI::Core;
27
28using namespace RingClientUWP;
29
30Account::Account(String^ name,
atraczyk8ce1dee2016-08-25 18:15:07 -040031 String^ ringID,
atraczyk797fa1a2016-08-31 09:55:53 -040032 String^ accountType,
33 String^ accountID)
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -040034{
35 name_ = name;
36 ringID_ = ringID;
atraczyk8ce1dee2016-08-25 18:15:07 -040037 accountType_ = accountType;
atraczyk797fa1a2016-08-31 09:55:53 -040038 accountID_ = accountID;
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -040039}
40
41void
42Account::NotifyPropertyChanged(String^ propertyName)
43{
44 CoreApplicationView^ view = CoreApplication::MainView;
45 view->CoreWindow->Dispatcher->RunAsync(
46 CoreDispatcherPriority::Normal,
47 ref new DispatchedHandler([this, propertyName]()
48 {
49 PropertyChanged(this, ref new PropertyChangedEventArgs(propertyName));
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -040050 }));
51}