/* i-net software provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This programming example assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. i-net software support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. © i-net software 1998-2013 */ using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Inet.Viewer.WinForms.Export { /// /// A panel with format-specific export options. /// public class FormatSettingsControl : UserControl { /// /// The icon to show in the selection panel. /// public virtual Bitmap Icon { get { return null; } } /// /// The label to show in the selection panel. /// public virtual string Label { get { return null; } } /// /// The file suffix of this format. /// public virtual string FileSuffix { get { return null; } } /// /// Sets a flag indicating whether the report is a multi-page report (when rendering with the viewer). /// public virtual bool MultiPageReport { set { } } /// /// Sets a flag indicating whether the report has any groups. /// public virtual bool HasGroups { set { } } /// /// Called when the format changes. This happens in multi format settings /// controls only, e.g. ImageSettingsControl /// public event EventHandler FormatChanged; /// /// Adds the parameters set in this control to the specified dictionary. /// /// public virtual void CollectExportParameters(Dictionary expParams) { } /// /// Fires a format changed event. /// protected void OnFormatChanged() { if (FormatChanged != null) { FormatChanged.Invoke(this, new EventArgs()); } } /// /// Sets the set of allowed formats. Updates the Allowed flag of this control in respect /// to the specified set. /// virtual public HashSet AllowedFormats { set { Allowed = value.Count == 0 || value.Contains(FileSuffix); } } /// /// Gets a flag indicating whether this format is allowed. /// public bool Allowed { get; set; } } }