Candy.Client.ViewModels.MainWindowViewModel.InstallApplication C# (CSharp) Method

InstallApplication() public method

public InstallApplication ( ) : void
return void
        public async void InstallApplication()
        {
            if (String.IsNullOrEmpty(_manager.Settings.ApplicationRootDirectoryPath))
            {
                Messenger.Raise(new AsyncInformationMessage
                {
                    MessageKey = "Information",
                    Caption = "エラー",
                    Text = "アプリケーション ディレクトリが設定されていません。設定画面でディレクトリを指定してください。"
                });

                ShowSettings();
                return;
            }

            if (!Directory.Exists(_manager.Settings.ApplicationRootDirectoryPath))
            {
                Messenger.Raise(new AsyncInformationMessage
                {
                    MessageKey = "Information",
                    Caption = "エラー",
                    Text = "指定されているアプリケーション ディレクトリが存在しません。設定画面でディレクトリを確認してください。"
                });

                IsSettingsOpen.Value = true;
                return;
            }

            var id = await Messenger.GetResponse(new AsyncInputMessage
            {
                MessageKey = "Input",
                Caption = "アプリケーションのインストール",
                Text = "アプリケーションの識別子を入れてください"

            }).Response;

            if (String.IsNullOrEmpty(id)) return;

            var success = await _manager.InstallApplicationAsync(id);

            if (success)
            {
                Messenger.Raise(new AsyncInformationMessage
                {
                    MessageKey = "Information",
                    Caption = "インストール完了",
                    Text = "アプリケーションのインストールが完了しました。"
                });
            }
        }
        /// <summary>