Example #1
0
        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());
        }
Example #2
0
        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);
        }
Example #3
0
 public void EndMenuEdit()
 {
     MenuEditModel = null;
 }