private void OnDisplayModeChanged()
        {
            Mode mode = DisplayMode;

            if (mode == Mode.Menu)
            {
                // Clears the app bar.
                ApplicationBar = null;
            }
            else if (mode == Mode.BugReport)
            {
                // Makes the bug report app bar.
                ApplicationBar = new ApplicationBar();
                ApplicationBar.CreateAndAddButton("appbar.email.png", SendBugReportCommand, "send");
                ApplicationBar.CreateAndAddButton("appbar.cancel.png", CancelBugReportCommand, "cancel");
            }
        }
        private void RefreshApplicationBar()
        {
            if (ApplicationBar != null)
            {
                return;
            }

            // Creates the app bar.
            IApplicationBar appBar = new ApplicationBar()
            {
                Mode    = ApplicationBarMode.Default,
                Opacity = 0.5,
            };

            appBar.CreateAndAddMenuItem(SelectMapCartographicModeCommand, "change map background");

            appBar.CreateAndAddButton("appbar.location.circle.png", MoveMapViewToPlayerCommand, "me");

            appBar.CreateAndAddButton("appbar.location.checkin.png", MoveMapViewToOverviewCommand, "overview");

            ApplicationBar = appBar;
        }
示例#3
0
        /// <summary>
        /// Refreshes the application bar.
        /// </summary>
        private void RefreshAppBar()
        {
            if (ApplicationBar != null)
            {
                return;
            }

            // Creates the app bar.
            ApplicationBar = new ApplicationBar();

            // Adds the savegame menu item.
            ApplicationBar.CreateAndAddMenuItem(SaveGameCommand, "save game");

            // Adds the device info menu item.
            ApplicationBar.CreateAndAddMenuItem(ShowDeviceInfoCommand, "player+device info");

            // Adds the maps menu item.
            ApplicationBar.CreateAndAddButton("appbar.map.treasure.png", ShowMapCommand, "map");

            // Adds the quick save button.
            ApplicationBar.CreateAndAddButton("appbar.save.png", QuickSaveGameCommand, "quick save");
        }