예제 #1
0
        /// <summary>
        /// Create an exporter for the data contained in this object
        /// </summary>
        /// <returns></returns>
        protected OLVExporter CreateExporter()
        {
            OLVExporter exporter = new OLVExporter(this.ListView);

            exporter.IncludeColumnHeaders = this.IncludeColumnHeaders;
            exporter.IncludeHiddenColumns = this.IncludeHiddenColumns;
            exporter.ModelObjects         = this.ModelObjects;
            return(exporter);
        }
예제 #2
0
        /// <summary>
        /// Put a text and HTML representation of our model objects
        /// into the data object.
        /// </summary>
        public void CreateTextFormats()
        {
            OLVExporter exporter = this.CreateExporter();

            // Put both the text and html versions onto the clipboard.
            // For some reason, SetText() with UnicodeText doesn't set the basic CF_TEXT format,
            // but using SetData() does.
            //this.SetText(sbText.ToString(), TextDataFormat.UnicodeText);
            this.SetData(exporter.ExportTo(OLVExporter.ExportFormat.TabSeparated));
            this.SetText(exporter.ExportTo(OLVExporter.ExportFormat.CSV), TextDataFormat.CommaSeparatedValue);
            this.SetText(ConvertToHtmlFragment(exporter.ExportTo(OLVExporter.ExportFormat.HTML)), TextDataFormat.Html);
        }
예제 #3
0
 /// <summary>
 /// Create an exporter for the data contained in this object
 /// </summary>
 /// <returns></returns>
 protected OLVExporter CreateExporter() {
     OLVExporter exporter = new OLVExporter(this.ListView);
     exporter.IncludeColumnHeaders = this.IncludeColumnHeaders;
     exporter.IncludeHiddenColumns = this.IncludeHiddenColumns;
     exporter.ModelObjects = this.ModelObjects;
     return exporter;
 }
예제 #4
0
        /// <summary>
        /// Return a html representation of the given objects
        /// </summary>
        public virtual string ObjectsToHtml(IList objectsToConvert) {
            if (objectsToConvert.Count == 0)
                return String.Empty;

            OLVExporter exporter = new OLVExporter(this, objectsToConvert);
            return exporter.ExportTo(OLVExporter.ExportFormat.HTML);
        }
예제 #5
0
        public string CreateHtml()
        {
            OLVExporter exporter = this.CreateExporter();

            return(exporter.ExportTo(OLVExporter.ExportFormat.HTML));
        }