public string GetSettingByCode(string code)
        {
            GroupSetting gs = settings.Find(setting => setting.Code == code);

            if (gs != null)
            {
                return(gs.Setting);
            }
            else
            {
                return("");
            }
        }
        private void PrepareSettings(Data data)
        {
            groupSettings = new GroupSettings();
            settingsStackPanel.Children.Clear();

            foreach (GroupContainer i in data.Groups.GroupContainers)
            {
                GroupSetting groupSetting = new GroupSetting(i.AppliesTo, i.Name, i.Items[0].Code);
                groupSetting.PropertyChanged += groupSetting_PropertyChanged;
                groupSettings.Settings.Add(groupSetting);

                List<string> settingNames = new List<string>();

                foreach (Group group in i.Items)
                    settingNames.Add(group.Name);

                Setting setting = new Setting(i.Name, settingNames);
                setting.CurrentSetting = groupSettings.Settings[groupSettings.Settings.Count - 1];

                settingsStackPanel.Children.Add(setting.Drawable);
            }
        }