protected virtual DashboardViewer CreateDashboardViewer(Action <MemoryStream> exported) { var dashboardViewer = new DashboardViewer { Width = ((Form)Application.MainWindow.Template).Width, Height = ((Form)Application.MainWindow.Template).Height }; ((Control)Frame.Template).BeginInvoke(new Action(() => dashboardViewer.Show(Application, (IDashboardDefinition)View.CurrentObject))); return(dashboardViewer); }
public void ShowDashBoard(DashboardViewer dbv, bool canRead) { if (canRead) { if (dbv.Dashboard == null) { dbv.LoadDashboard(@"UmitechDashBoard.xml"); dbv.Show(); } else { dbv.Show(); } } else { dbv.Hide(); XtraMessageBox.Show("You need to have administrative rights to have a look the dashboard of the comapany", "You Cant View Dashbord", MessageBoxButtons.OK, MessageBoxIcon.Information); } }