private void LoadGeneral() { tmedia_profile_t profile = (tmedia_profile_t)Enum.Parse(typeof(tmedia_profile_t), this.configurationService.Get(Configuration.ConfFolder.MEDIA, Configuration.ConfEntry.PROFILE, Configuration.DEFAULT_MEDIA_PROFILE)); int profileIndex = Profiles.ToList().FindIndex(x => x.Value == profile); this.comboBoxProfile.SelectedIndex = Math.Max(0, profileIndex); this.checkBoxLaunchWhenStart.IsChecked = this.configurationService.Get(Configuration.ConfFolder.GENERAL, Configuration.ConfEntry.AUTO_START, Configuration.DEFAULT_GENERAL_AUTOSTART); this.textBoxENUM.Text = this.configurationService.Get(Configuration.ConfFolder.GENERAL, Configuration.ConfEntry.ENUM_DOMAIN, Configuration.DEFAULT_GENERAL_ENUM_DOMAIN); }
private bool UpdateGeneral() { tmedia_profile_t profile = (this.comboBoxProfile.SelectedValue as Profile).Value; this.configurationService.Set(Configuration.ConfFolder.MEDIA, Configuration.ConfEntry.PROFILE, profile.ToString()); this.configurationService.Set(Configuration.ConfFolder.GENERAL, Configuration.ConfEntry.AUTO_START, this.checkBoxLaunchWhenStart.IsChecked.Value); this.configurationService.Set(Configuration.ConfFolder.GENERAL, Configuration.ConfEntry.ENUM_DOMAIN, this.textBoxENUM.Text); // Transmit values to the native part (global) MediaSessionMgr.defaultsSetProfile(profile); return(true); }
public static tmedia_profile_t defaultsGetProfile() { tmedia_profile_t ret = (tmedia_profile_t)tinyWRAPPINVOKE.MediaSessionMgr_defaultsGetProfile(); return(ret); }
public static bool defaultsSetProfile(tmedia_profile_t profile) { bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetProfile((int)profile); return(ret); }
public static bool defaultsSetProfile(tmedia_profile_t profile) { bool ret = tinyWRAPPINVOKE.MediaSessionMgr_defaultsSetProfile((int)profile); return ret; }
public Profile(String text, tmedia_profile_t value) { this.text = text; this.value = value; }