blob: e5e38b09b9d0c7e946ffee14c009107d3915dc35 [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,
32 String^ accountType)
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -040033{
34 name_ = name;
35 ringID_ = ringID;
atraczyk8ce1dee2016-08-25 18:15:07 -040036 accountType_ = accountType;
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -040037}
38
39void
40Account::NotifyPropertyChanged(String^ propertyName)
41{
42 CoreApplicationView^ view = CoreApplication::MainView;
43 view->CoreWindow->Dispatcher->RunAsync(
44 CoreDispatcherPriority::Normal,
45 ref new DispatchedHandler([this, propertyName]()
46 {
47 PropertyChanged(this, ref new PropertyChangedEventArgs(propertyName));
Nicolas Jagerbff5fbb2016-08-18 08:58:56 -040048 }));
49}