public void BeginMenuEdit() { // The dialog binds to the edit model, which handles editing the list MenuEditModel = new MenuEditModel(HOME_STATE_ID, _settingsWatcher.Settings.HomeMenuActionIds); // Show the dialog and set a callback to clear the edit model when it closes var sm = ServiceRegistration.Get <IScreenManager>(); sm.ShowDialog("DialogEditMenu", (n, i) => EndMenuEdit()); }
public void SaveMenuEdit() { // Check we've got a valid edit model MenuEditModel editModel = MenuEditModel; if (editModel == null) { return; } // Get the updated action ids and update the settings, we'll update // the menu automatically when we get the settings changed event. var sm = ServiceRegistration.Get <ISettingsManager>(); var settings = sm.Load <NereusSkinSettings>(); settings.HomeMenuActionIds = editModel.GetCurrentActionIds().ToArray(); sm.Save(settings); }
public void EndMenuEdit() { MenuEditModel = null; }