atraczyk | 49822a3 | 2016-08-26 17:18:44 -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 <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 |
|
| 20 | #pragma once
|
| 21 |
|
| 22 | namespace RingClientUWP
|
| 23 | {
|
| 24 |
|
| 25 | delegate void SelectIndex(int index);
|
atraczyk | 2425ddd | 2016-09-01 13:16:22 -0400 | [diff] [blame] | 26 | delegate void LoadProfileImage();
|
atraczyk | 49822a3 | 2016-08-26 17:18:44 -0400 | [diff] [blame] | 27 |
|
| 28 | namespace Configuration
|
| 29 | {
|
| 30 |
|
| 31 | /* delegates */
|
| 32 |
|
| 33 | public ref class UserPreferences sealed
|
| 34 | {
|
| 35 | public:
|
| 36 | /* singleton */
|
| 37 | static property UserPreferences^ instance
|
| 38 | {
|
| 39 | UserPreferences^ get()
|
| 40 | {
|
| 41 | static UserPreferences^ instance_ = ref new UserPreferences();
|
| 42 | return instance_;
|
| 43 | }
|
| 44 | }
|
| 45 |
|
| 46 | /* properties */
|
| 47 | property int PREF_ACCOUNT_INDEX;
|
atraczyk | 2425ddd | 2016-09-01 13:16:22 -0400 | [diff] [blame] | 48 | property bool PREF_PROFILE_PHOTO;
|
atraczyk | 49822a3 | 2016-08-26 17:18:44 -0400 | [diff] [blame] | 49 |
|
| 50 | /* functions */
|
| 51 | void save();
|
| 52 | void load();
|
| 53 | String^ Stringify();
|
| 54 | void Destringify(String^ data);
|
| 55 |
|
| 56 | internal:
|
| 57 |
|
| 58 | /* events */
|
| 59 | event SelectIndex^ selectIndex;
|
atraczyk | 2425ddd | 2016-09-01 13:16:22 -0400 | [diff] [blame] | 60 | event LoadProfileImage^ loadProfileImage;
|
atraczyk | 49822a3 | 2016-08-26 17:18:44 -0400 | [diff] [blame] | 61 | private:
|
atraczyk | 2425ddd | 2016-09-01 13:16:22 -0400 | [diff] [blame] | 62 | UserPreferences() { PREF_PROFILE_PHOTO = false; };
|
atraczyk | 49822a3 | 2016-08-26 17:18:44 -0400 | [diff] [blame] | 63 |
|
| 64 | };
|
| 65 |
|
| 66 | }
|
| 67 | } |