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)),
            };
        }
Exemplo n.º 2
0
        /*
         ************************************
         *      Fragment methods
         ************************************
         */

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

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

            HeaterFragment heaterFragment = new HeaterFragment();

            heaterFragment.Arguments = bundle;

            return(heaterFragment);
        }