Ejemplo n.º 1
0
        public bool? ShowDialog(ConfirmParams data)
        {
            var win = new ConfirmDialog
            {
                DataContext = data,
                WindowStyle = WindowStyle.None,
                Owner = Application.Current.MainWindow,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                Opacity = 0.85
            };

            return win.ShowDialog();
        }
        private void DeleteMetaRegionMapping()
        {
            if (SelectedMetaRegionMapping == null) return;

            var confirmParams = new ConfirmParams("Delete Meta-Region Mapping",
                                                  "Are you sure you wish you delete this mapping?",
                                                  ExecuteDeleteMetaRegionMapping);

            _eventAggregator.GetEvent<UserConfirmationEvent>().Publish(confirmParams);
        }
        private void DeleteGeoRegion()
        {
            if (SelectedGeoRegion == null) return;

            ConfirmParams confirmParams;
            if (SelectedGeoRegion.Level == MaintenanceConstants.GeoRegionMappingLevel)
            {
                confirmParams = new ConfirmParams("Delete Geo Region",
                                                  "Are you sure you wish you delete this geo region?",
                                                  ExecuteDeleteGeoRegion);
            }
            else
            {
                confirmParams = new ConfirmParams("Delete Geo Region",
                                                  "Deleting this geo region will delete all regions below it in the tree. Are you sure you wish you delete this region?",
                                                  ExecuteDeleteGeoRegion);
            }

            _eventAggregator.GetEvent<UserConfirmationEvent>().Publish(confirmParams);
        }
Ejemplo n.º 4
0
 private void DisplayUserConfirmation(ConfirmParams data)
 {
     _confirmService.ShowDialog(data);
 }