Пример #1
0
        /// <summary>
        /// Sets current map state.
        /// </summary>
        private void SetCurMap(IPlayableMap map, bool onlyIfDifferent)
        {
            var previousMap = bindableMap.Value;

            if (onlyIfDifferent && previousMap == map)
            {
                return;
            }

            bindableMap.SetWithoutTrigger(map);
            this.MapConfig.Value = mapConfiguration?.GetConfig(map);
            bindableMap.TriggerWithPrevious(previousMap);
        }
Пример #2
0
        /// <summary>
        /// Sets current mapset state.
        /// </summary>
        private void SetCurMapset(IMapset mapset, bool onlyIfDifferent)
        {
            var previousMapset = bindableMapset.Value;

            if (onlyIfDifferent && previousMapset == mapset)
            {
                return;
            }

            bindableMapset.SetWithoutTrigger(mapset);
            this.MapsetConfig.Value = mapsetConfiguration?.GetConfig(mapset);
            bindableMapset.TriggerWithPrevious(previousMapset);
        }
Пример #3
0
        protected override void ShowInternal(INavigationView view, bool checkActive)
        {
            // Hide all other views.
            for (int i = views.Count - 1; i >= 0; i--)
            {
                if (views[i] != view)
                {
                    HideInternal(views[i]);
                }
            }

            INavigationView prevScreen = PreviousScreen;

            curScreen.SetWithoutTrigger(view);
            base.ShowInternal(view, checkActive);
            curScreen.TriggerWithPrevious(prevScreen);
        }