예제 #1
0
 private void dashboard_DashboardLoading(object sender, DashboardLoadingWebEventArgs e)
 {
     if (DashboardLoading != null)
     {
         Application.Update(this, () =>
         {
             DashboardLoading(sender, e);
         });
     }
 }
		private void Dashboard_DashboardLoading(object sender, DashboardLoadingWebEventArgs e)
		{
			var customizeDashboardController = Frame.GetController<CustomizeDashboardController>();
			if (customizeDashboardController != null && customizeDashboardController.ShouldCustomizeDashboard)
			{
				Dashboard dashboard = new Dashboard();
				dashboard.LoadFromXDocument(e.DashboardXml);
				customizeDashboardController.RaiseCustomizeDashboard(
					new CustomizeDashboardEventArgs(dashboard, View.ViewEditMode == DevExpress.ExpressApp.Editors.ViewEditMode.Edit));
				e.DashboardXml = dashboard.SaveToXDocument();
			}
		}
예제 #3
0
        protected void DashboardLoading(object sender, DashboardLoadingWebEventArgs e)
        {
            var dashboardData = (IDashboardDefinition)View.CurrentObject;

            if (dashboardData != null)
            {
                using (var xmlStream = new MemoryStream(Encoding.UTF8.GetBytes(_dashboard.GetDashboardXml())))
                    using (var xmlReader = new XmlTextReader(xmlStream)){
                        e.DashboardXml = XDocument.Load(xmlReader);
                    }
            }
        }