Exemplo n.º 1
0
        void OnShowConnectionClick(object sender, RoutedEventArgs e)
        {
            if (pivotGrid == null || pivotGrid.IsAsyncInProgress)
            {
                return;
            }
            errorBorder.Visibility = System.Windows.Visibility.Collapsed;
            dialog       = new DataSourceDialog();
            dialog.Style = (Style)ResourceHelper.FindResource(this, "DataSourceDialogStyle");
            FloatingContainerParameters pars = new FloatingContainerParameters();

            pars.AllowSizing    = false;
            pars.CloseOnEscape  = true;
            pars.Title          = "OLAP Connection";
            pars.ClosedDelegate = DialogClosed;
            FloatingContainer.ShowDialogContent(dialog, this, new Size(600, DataSourceDialohHeight), pars);
        }
Exemplo n.º 2
0
        void DialogClosed(bool?close)
        {
            Application.Current.MainWindow.Activate();
            if (dialog == null)
            {
                return;
            }
            String connectionString = dialog.GetConnectionString();

            dialog = null;
            if (close != true)
            {
                return;
            }
            if (string.IsNullOrWhiteSpace(connectionString))
            {
                return;
            }
            InitPivotGrid(connectionString);
        }