Пример #1
0
        public async void ShowMetroWindow()
        {
            var metroWindow = Application.Current.MainWindow as MetroWindow;
            var dialog      = await metroWindow.ShowMessageAsync(
                "Błąd połaczenia",
                $"Czy chcesz zmienić ustawienia?",
                MessageDialogStyle.AffirmativeAndNegative);

            if (dialog == MessageDialogResult.Affirmative)
            {
                var userSettingsWindow = new UserSettingsView();
                userSettingsWindow.ShowDialog();
            }


            else if (dialog == MessageDialogResult.Negative)
            {
                Application.Current.Shutdown();
            }
        }
Пример #2
0
        private void UserSettings(object obj)
        {
            var userSettingWindow = new UserSettingsView();

            userSettingWindow.ShowDialog();
        }