예제 #1
0
        private void SetupStatusBar(IMahAppsService mahAppsService, IStatusService statusService)
        {
            var statusBarContent = mahAppsService.GetStatusBar();

            statusService.Initialize(statusTextBlock);
            if (statusBarContent != null)
            {
                customStatusBarItem.Content = statusBarContent;
            }
        }
예제 #2
0
        private void SetupRightCommands(
            IServiceLocator serviceLocator, IMahAppsService mahAppsService,
            ICommandManager commandManager)
        {
            var windowCommands = mahAppsService.GetRightWindowCommands();

            if (mahAppsService.GetAboutInfo() != null)
            {
                var aboutWindowCommand =
                    WindowCommandHelper.CreateWindowCommandButton("appbar_information", "about");

                var aboutService = serviceLocator.ResolveType <IAboutService>();
                commandManager.RegisterAction("Help.About", aboutService.ShowAbout);
                aboutWindowCommand.Command = commandManager.GetCommand("Help.About");

                windowCommands.Items.Add(aboutWindowCommand);
            }

            RightWindowCommands = windowCommands;
        }