Exemplo n.º 1
0
        public async void ChangeServer()
        {
            // サーバIP・ポートを入力させる
            var config = new ConfigWindowViewModel(Model, Model.ServerIP, Model.ServerPort);
            await Messenger.RaiseAsync(new TransitionMessage(
                                           typeof(Views.ConfigWindow), config, TransitionMode.Modal, "FromMain"));

            if (config.Succeeded)
            {
                Model.Reconnect();
            }
        }
Exemplo n.º 2
0
        private async Task ServerAddressRequired(object sender, string reason)
        {
            // サーバIP・ポートを入力させる
            var config = new ConfigWindowViewModel(Model, Model.ServerIP, Model.ServerPort);

            config.Description = reason;
            await Messenger.RaiseAsync(new TransitionMessage(
                                           typeof(Views.ConfigWindow), config, TransitionMode.Modal, "FromMain"));

            if (config.Succeeded == false)
            {
                // キャンセルされたら継続できないので終了
                Messenger.Raise(new WindowActionMessage(WindowAction.Close, "MainWindowAction"));
                return;
            }
        }