//------------------------------------------------------------------------------ public AdvexpSettingsViewController() : base(null, true) { AdvexpSettings.LoadSettings(); this.Root = CreateRoot(); NSNotificationCenter.DefaultCenter.AddObserver( UIApplication.DidBecomeActiveNotification, (notify) => { InvokeOnMainThread(() => { UpdateAdvexpSettings(); }); }); }
//------------------------------------------------------------------------------ void UpdateAdvexpSettings() { AdvexpSettings.LoadSettings(); m_airplaneMode.Value = AdvexpSettings.AirplaneMode; m_notifications.Value = AdvexpSettings.Notifications; m_brightness.SetValue(AdvexpSettings.Brightness); m_autoBrightness.Value = AdvexpSettings.AutoBrightness; m_bluetooth.Value = AdvexpSettings.Bluetooth; m_locationService.Value = AdvexpSettings.LocationServices; m_autoLock.RadioSelected = (int)AdvexpSettings.AutoLock; m_homeButtonDoubleClick.RadioSelected = (int)AdvexpSettings.HomeButtonDoubleClick; }