コード例 #1
0
        /// <summary>
        /// Helps to create a control for a tile.
        /// </summary>
        /// <param name="controlType"></param>
        /// <param name="tile"></param>
        /// <returns></returns>
        private FrameworkElement CreateControl(Tile tile)
        {
            var    controlType = tile.ControlType;
            string path        = System.IO.Path.GetFullPath(@"Assets\Config\OLAPSample.config");

            switch (controlType)
            {
            case "Chart":
                OlapChart olapChart = new OlapChart()
                {
                    OlapDataManager = OlapDataSourceHelper.GetManager(tile.Report.ReportFileName, BIDashboardModel.Initialize(path))
                };
                olapChart.Loaded += new RoutedEventHandler(olapChart_Loaded);
                return(olapChart);

            case "Grid":
                return(new OlapGrid()
                {
                    Style = (Style)FindResource("olapGridStyle"),
                    OlapDataManager = OlapDataSourceHelper.GetManager(tile.Report.ReportFileName, BIDashboardModel.Initialize(path))
                });

            case "Gauge":
                OlapGauge olapGauge = new OlapGauge()
                {
                    OlapDataManager = OlapDataSourceHelper.GetManager(tile.Report.ReportFileName, BIDashboardModel.Initialize(path))
                };
                SkinStorage.SetVisualStyle(olapGauge, "Office2007Blue");
                return(olapGauge);
            }

            return(null);
        }
コード例 #2
0
        /// <summary>
        /// Helps to create a control for a tile.
        /// </summary>
        /// <param name="controlType"></param>
        /// <param name="tile"></param>
        /// <returns></returns>
        private FrameworkElement CreateControl(Tile tile)
        {
            var controlType = tile.ControlType;

            switch (controlType)
            {
            case "Chart":
                OlapChart olapChart = new OlapChart()
                {
                    OlapDataManager = OlapDataSourceHelper.GetManager(tile.Report.ReportFileName, GetConnectionString())
                };
                olapChart.Loaded += new RoutedEventHandler(olapChart_Loaded);
                return(olapChart);

            case "Grid":
                return(new OlapGrid()
                {
                    Style = (Style)FindResource("olapGridStyle"),
                    OlapDataManager = OlapDataSourceHelper.GetManager(tile.Report.ReportFileName, GetConnectionString())
                });

            case "Gauge":
                OlapGauge olapGauge = new OlapGauge()
                {
                    OlapDataManager = OlapDataSourceHelper.GetManager(tile.Report.ReportFileName, GetConnectionString())
                };
                SkinStorage.SetVisualStyle(olapGauge, "Office2007Blue");
                return(olapGauge);
            }

            return(null);
        }
コード例 #3
0
        private void DefaultReport()
        {
            Tile tile = new Tile();

            tile.Header = "OlapChart";
            this.DashboardReport.Tiles.Add(tile);
            tile.Report      = this.DashboardReport.Reports.ElementAt(1);
            tile.ControlType = "Chart";
            string path = "";

            if (AppDomain.CurrentDomain.BaseDirectory.Contains("Binaries_"))
            {
                path = System.IO.Path.GetFullPath(@"..\..\common\Assets\Config\OLAPSample.config");
            }
            else
            {
                path = System.IO.Path.GetFullPath(@"..\..\..\common\Assets\Config\OLAPSample.config");
            }
            OlapChart olapChart = new OlapChart()
            {
                OlapDataManager = OlapDataSourceHelper.GetManager(tile.Report.ReportFileName, BIDashboardModel.Initialize(path))
            };

            olapChart.Loaded += new RoutedEventHandler(olapChart_Loaded);
            this.tileViewControl.Items.Add(new TileViewItem
            {
                Header            = tile.Header,
                Tag               = olapChart,
                TileViewItemState = tile.TileState,
                Content           = olapChart
            });
        }
コード例 #4
0
        public MvcChartJsonSettings(OlapChart chart)
            : base(chart)
        {
            var mvcChart = chart as OlapAnalysis;

            callbackController = mvcChart.CallbackController;
            callbackAction     = mvcChart.CallbackAction;
            exportController   = mvcChart.ExportController;
            exportAction       = mvcChart.ExportAction;
            filterClientId     = mvcChart.Filter.ClientID;
        }
コード例 #5
0
        private void DefaultReport()
        {
            Tile tile = new Tile();

            tile.Header = "OlapChart";
            this.DashboardReport.Tiles.Add(tile);
            tile.Report      = this.DashboardReport.Reports.ElementAt(1);
            tile.ControlType = "Chart";
            OlapChart olapChart = new OlapChart()
            {
                OlapDataManager = OlapDataSourceHelper.GetManager(tile.Report.ReportFileName, GetConnectionString())
            };

            olapChart.Loaded += new RoutedEventHandler(olapChart_Loaded);
            this.tileViewControl.Items.Add(new TileViewItem
            {
                Header            = tile.Header,
                Tag               = olapChart,
                TileViewItemState = tile.TileState,
                Content           = olapChart
            });
        }
コード例 #6
0
        internal JsonChartSettings(OlapChart chart)
            : base(chart)
        {
            url_pointsMenu      = chart.ImageUrl("pointsMenu.png");
            url_pointsBtn       = chart.ImageUrl("points.png");
            url_holesBtn        = chart.ImageUrl("holes.png");
            url_linesMenu       = chart.ImageUrl("linesMenu.png");
            url_linesBtn        = chart.ImageUrl("lines.png");
            url_polylinesBtn    = chart.ImageUrl("polylines.png");
            url_stepLinesBtn    = chart.ImageUrl("stepLines.png");
            url_deltaLinesBtn   = chart.ImageUrl("deltaLines.png");
            url_percentLinesBtn = chart.ImageUrl("percentLines.png");
            url_barsMenu        = chart.ImageUrl("barsMenu.png");
            url_barsBtn         = chart.ImageUrl("bars.png");
            url_deltaBarsBtn    = chart.ImageUrl("deltaBars.png");
            url_percentBarsBtn  = chart.ImageUrl("percentBars.png");
            url_areasMenu       = chart.ImageUrl("areasMenu.png");
            url_areasBtn        = chart.ImageUrl("areas.png");
            url_deltaAreasBtn   = chart.ImageUrl("deltaAreas.png");
            url_percentAreasBtn = chart.ImageUrl("percentAreas.png");
            url_piesMenu        = chart.ImageUrl("piesMenu.png");
            url_piesBtn         = chart.ImageUrl("pies.png");
            url_trendsMenu      = chart.ImageUrl("trendsMenu.png");
            url_noTrendsBtn     = chart.ImageUrl("noTrends.png");
            url_linTrendsBtn    = chart.ImageUrl("linTrends.png");
            url_quadTrendsBtn   = chart.ImageUrl("quadTrends.png");
            url_cubicTrendsBtn  = chart.ImageUrl("cubicTrends.png");
            rsClose             = RadarUtils.GetResStr("rsClose");
            rsShowUnderlying    = RadarUtils.GetResStr("mnShowUnderlying");

            //url_nextlevel = chart.ImageUrl("Expand.gif");
            //url_collapsedl = chart.ImageUrl("Collapse.gif");
            //url_nextlevel = chart.ImageUrl("Expand_Level.gif");

            url_nextlevel  = chart.ImageUrl("plus.png");
            url_collapsedl = chart.ImageUrl("minus.png");
        }