private void GenerateSettingsMenuItems()
        {
            // Generate fake menu items based on settings for each sauna
            this.settingItemModelsList = new List <SettingItemModel>()
            {
                new SettingItemModel("Ventilation",
                                     (this.saunaModel.Ventilation.Status ? "On" : "Off"),
                                     Resource.Mipmap.ic_settings_ventilation,
                                     VentilationFragment.NewInstance(this.saunaModel.Id)),

                new SettingItemModel("Heater",
                                     (this.saunaModel.Heater.Status ? "On" : "Off"),
                                     Resource.Mipmap.ic_settings_heating,
                                     HeaterFragment.NewInstance(this.saunaModel.Id)),

                new SettingItemModel("Lights",
                                     (this.saunaModel.LightsStatus ? "On" : "Off"),
                                     Resource.Mipmap.ic_settings_lights,
                                     LightsFragment.NewInstance(this.saunaModel.Id)),

                new SettingItemModel("Sound",
                                     (this.saunaModel.Sound.Status ? "On" : "Off"),
                                     Resource.Mipmap.ic_settings_sound,
                                     SoundFragment.NewInstance(this.saunaModel.Id)),
            };
        }
Example #2
0
        /*
         ************************************
         *      Fragment methods
         ************************************
         */

        public static SoundFragment NewInstance(int saunaId)
        {
            Bundle bundle = new Bundle();

            bundle.PutInt(Helpers.Helpers.ARG_1, saunaId);

            SoundFragment soundFragment = new SoundFragment();

            soundFragment.Arguments = bundle;

            return(soundFragment);
        }