public StatisticProductReportWindow(List <RecordProducts> records, StatisticModel Model)
        {
            this.Model = Model;

            InitializeComponent();

            this.Text = Model.Title;


            Assembly asm = Assembly.LoadFrom(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Res.dll"));

            this.Icon = new Icon(asm.GetManifestResourceStream(@"Oybab.Res.Resources.Images.PC.Statistic.ico"));


            Model.DataSource = records;


            ProductReport report = new ProductReport(Model.Parameters["PriceSymbol"].ToString());



            webBrowser1.Refresh();
            string htmlContent = report.ProcessHTMLContent(Model);

            webBrowser1.DocumentText = htmlContent;



            //File.WriteAllText("y:\\test1111.html", htmlContent);
        }
Ejemplo n.º 2
0
        internal void Initial(List <RecordProducts> records, StatisticModel statisticModel)
        {
            statisticModel.DataSource = records;


            ProductReport report = new ProductReport(statisticModel.Parameters["PriceSymbol"].ToString());


            string htmlContent = report.ProcessHTMLContent(statisticModel);

            var htmlSource = new HtmlWebViewSource();

            htmlSource.Html = htmlContent;

            _browser.Source = htmlSource;
        }