Exemplo n.º 1
0
        private void MenuLoadLayoutFromJsonClick(object sender, RoutedEventArgs e)
        {
            string language = Localization.Localization.GetLanguageCodeFromName(SelectedLanguage);

            var input = InputWindow.Prompt(Localization.Localization.Translations[language]["LoadLayoutMessage"],
                                           Localization.Localization.Translations[language]["LoadLayoutHeader"]);

            LoadLayoutFromJson(input, false);
        }
Exemplo n.º 2
0
        public static string Prompt(MainViewModel context, string message, string title, string defaultValue = "")
        {
            var inputWindow = new InputWindow(context, message, title, defaultValue);

            inputWindow.ShowDialog();

            if (inputWindow.DialogResult == true)
            {
                return(inputWindow.ResponseText);
            }

            return(null);
        }