示例#1
0
        /// <summary>
        /// Exports the process.
        /// </summary>
        /// <param name="filename">The filename.</param>
        private void ExportProcess(string filename)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("#", typeof(int));
            dt.Columns.Add("Domain", typeof(string));
            dt.Columns.Add("Browser Detection", typeof(bool));
            dt.Columns.Add("CSS Prefix", typeof(bool));
            dt.Columns.Add("Edge", typeof(bool));
            dt.Columns.Add("JS Library", typeof(bool));
            dt.Columns.Add("Plugin Free", typeof(bool));
            dt.Columns.Add("Process Time", typeof(double));
            dt.Columns.Add("Has Error", typeof(bool));

            foreach (var item in _items)
            {
                DataRow dr = dt.NewRow();

                dr[0] = item.Id;
                dr[1] = item.SiteHost;
                dr[2] = item.BrowserDetection;
                dr[3] = item.CSSPrefix;
                dr[4] = item.Edge;
                dr[5] = item.JSLib;
                dr[6] = item.PluginFree;
                dr[7] = item.ProcessTime;
                dr[8] = item.HasError;

                dt.Rows.Add(dr);
            }

            dt.AcceptChanges();

            ExportToExcel.ExportScanResult(filename, dt);
        }