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)),
            };
        }
示例#2
0
        /*
         ************************************
         *      Fragment methods
         ************************************
         */

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

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

            LightsFragment lightsFragment = new LightsFragment();

            lightsFragment.Arguments = bundle;

            return(lightsFragment);
        }