예제 #1
0
        private void debugShowConfirmOverwritePackageDialog_Click(object sender, RoutedEventArgs e)
        {
            var dialog       = new ConfirmOverwritePackageDialog(!Data.Settings.ConfirmOverwritePackage);
            var dialogResult = dialog.ShowDialog();

            MessageBox.Show($"ShowDialog Result: {dialogResult}\r\n\r\nOverwrite Result:{dialog.OvewriteResult}\r\n\r\nAlwaysOvewrite:{dialog.AlwaysOverwritePackage}");
        }
예제 #2
0
        private void CommandBinding_SavePackageExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            // confirm
            if (Data.Settings.ConfirmOverwritePackage)
            {
                var confirmDialog = new ConfirmOverwritePackageDialog(!Data.Settings.ConfirmOverwritePackage);
                if (confirmDialog.ShowDialog() != true || !confirmDialog.OvewriteResult)
                {
                    return;
                }

                if (confirmDialog.AlwaysOverwritePackage)
                {
                    Data.Settings.ConfirmOverwritePackage = false;
                }
            }

            SavePackageAs(Data.Package.ZipFile);
        }