예제 #1
0
 public static void ShowWindow()
 {
     DialogWindow.ShowDialog(
         DialogUnstuck_Title,
         ClientTextTagFormatter.NewFormattedTextBlock(
             DialogUnstuck_Message),
         okText: DialogUnstuck_Button,
         okAction: CharacterUnstuckSystem.ClientCreateUnstuckRequest,
         hideCancelButton: false);
 }
예제 #2
0
        public static void ShowWindow()
        {
            if (!CharacterUnstuckSystem.SharedValidateCanUnstuck(ClientCurrentCharacterHelper.Character))
            {
                return;
            }

            DialogWindow.ShowDialog(
                DialogUnstuck_Title,
                ClientTextTagFormatter.NewFormattedTextBlock(
                    DialogUnstuck_Message),
                okText: DialogUnstuck_Button,
                okAction: CharacterUnstuckSystem.ClientCreateUnstuckRequest,
                hideCancelButton: false);
        }
예제 #3
0
        private static async void ClientShowWelcomeMessageInternal(string welcomeMessage)
        {
            var game       = Client.CurrentGame;
            var serverInfo = game.ServerInfo;

            await LoadingSplashScreenManager.WaitHiddenAsync();

            if (game.ConnectionState != ConnectionState.Connected ||
                serverInfo != Client.CurrentGame.ServerInfo)
            {
                return;
            }

            var dialogWindow = DialogWindow.ShowDialog(
                ClientTextTagFormatter.EscapeTags(
                    string.Format(WelcomeToServerTitleFormat, serverInfo.ServerName)),
                new ScrollViewer()
            {
                MaxHeight = 380,
                VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
                Content = new FormattedTextBlock()
                {
                    Content             = welcomeMessage,
                    TextWrapping        = TextWrapping.Wrap,
                    TextTrimming        = TextTrimming.None,
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Center
                }
            },
                closeByEscapeKey: false);

            dialogWindow.HorizontalContentAlignment = HorizontalAlignment.Stretch;
            dialogWindow.GameWindow.FocusOnControl  = null;
            dialogWindow.GameWindow.Width           = 530;
            dialogWindow.GameWindow.UpdateLayout();
        }