IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Forms.ResourceViewerControl Class Reference
+ Inheritance diagram for IG.Forms.ResourceViewerControl:
+ Collaboration diagram for IG.Forms.ResourceViewerControl:

Public Member Functions

 ResourceViewerControl ()
 
void UpdatePreviewArea ()
 
void RefreshViewer ()
 Refreshed information about the selected assembly (of potential assemblied if multiple assemblies descriptions are allowed) on the output text control. More...
 
void RefreshOutput ()
 Refreshed information about the selected assembly (of potential assemblied if multiple assemblies descriptions are allowed) on the output text control. More...
 
void AddViewer (IFileViewer viewer, bool atBeginning=true)
 Adds a new viewer to the list of viewers. More...
 
void ShowViewedItem ()
 Shows / plays the viewed contents. More...
 

Protected Member Functions

void HideViewers ()
 Makes all viewers invisible. More...
 
override void Dispose (bool disposing)
 Clean up any resources being used. More...
 

Protected Attributes

bool _isImagePreviewActive = false
 
bool _isSoundPreviewActive = false
 
IFileViewer _activeViewer = null
 
List< IFileViewer_viewers = null
 
bool _isShownImmediately = true
 

Properties

bool IsImagePreviewActive [get, protected set]
 
bool IsSoundPreviewActive [get, protected set]
 
bool IsAnyPreviewActive [get]
 
int NumViewers [get]
 Returns the number of viewers installed. More...
 
IFileViewer ActiveViewer [get, set]
 
List< IFileViewerViewers [get]
 
IFileViewer ImageViewer [get, set]
 Gets or set internal image viewer component (which is used if other viewers can not be used for viewing the current resource). More...
 
IFileViewer FileViewer [get, set]
 Gets or set internal general file viewer component (which is used if other viewers can not be used for viewing the current resource). More...
 
bool IsShownImmediately [get, set]
 Flag that specifies whether content is shown immediately after the viewed object is set. More...
 

Private Member Functions

void resourceSelector1_ResourceSelected (object sender, EventArgs e)
 
void resourceSelector1_SelectionParametersChanged (object sender, EventArgs e)
 
void InitializeComponent ()
 Required method for Designer support - do not modify the contents of this method with the code editor. More...
 

Private Attributes

List< string > _auxList = new List<string>()
 
IFileViewer _imageViewer = null
 
IFileViewer _fileViewer = null
 
System.ComponentModel.IContainer components = null
 Required designer variable. More...
 
ResourceSelector resourceSelector1
 
System.Windows.Forms.GroupBox grpPreview
 
ImageViewerControl imageViewerControl1
 
SoundPlayerControlSimple soundPlayerControlSimple1
 
System.Windows.Forms.TextBox txtOutput
 
System.Windows.Forms.SplitContainer splitContainer1
 
System.Windows.Forms.Button btnShowInExternalViewer
 
FileViewerControl fileViewerControl1
 

Static Private Attributes

static string _initialTextOutpput
 

Constructor & Destructor Documentation

IG.Forms.ResourceViewerControl.ResourceViewerControl ( )
inline

Member Function Documentation

void IG.Forms.ResourceViewerControl.UpdatePreviewArea ( )
inline
void IG.Forms.ResourceViewerControl.RefreshViewer ( )
inline

Refreshed information about the selected assembly (of potential assemblied if multiple assemblies descriptions are allowed) on the output text control.

void IG.Forms.ResourceViewerControl.RefreshOutput ( )
inline

Refreshed information about the selected assembly (of potential assemblied if multiple assemblies descriptions are allowed) on the output text control.

void IG.Forms.ResourceViewerControl.AddViewer ( IFileViewer  viewer,
bool  atBeginning = true 
)
inline

Adds a new viewer to the list of viewers.

Parameters
viewerViewer to be added.
atBeginningIf true then viewer is added at the beginning, meanig it will have higher prority and will be used even if there are other viewers installed for the same kind of resources.
void IG.Forms.ResourceViewerControl.HideViewers ( )
inlineprotected

Makes all viewers invisible.

void IG.Forms.ResourceViewerControl.ShowViewedItem ( )
inline

Shows / plays the viewed contents.

Can have the role of refresh when IsShownImmediately is true, or is used to actually show the contents after assigning it.

References IG.Lib.UtilSystem.AssemblySeparator, IG.Lib.UtilSystem.GetAssemblyByName(), IG.Forms.IFileViewer.IsEligibleForViewing(), IG.Forms.IFileViewer.ShowViewedItem(), and IG.Forms.IFileViewer.ViewedStream.

void IG.Forms.ResourceViewerControl.resourceSelector1_ResourceSelected ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.ResourceViewerControl.resourceSelector1_SelectionParametersChanged ( object  sender,
EventArgs  e 
)
inlineprivate
override void IG.Forms.ResourceViewerControl.Dispose ( bool  disposing)
inlineprotected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.
void IG.Forms.ResourceViewerControl.InitializeComponent ( )
inlineprivate

Required method for Designer support - do not modify the contents of this method with the code editor.

Member Data Documentation

string IG.Forms.ResourceViewerControl._initialTextOutpput
staticprivate
Initial value:
=
@"<< Select resources. >>"
List<string> IG.Forms.ResourceViewerControl._auxList = new List<string>()
private
bool IG.Forms.ResourceViewerControl._isImagePreviewActive = false
protected
bool IG.Forms.ResourceViewerControl._isSoundPreviewActive = false
protected
IFileViewer IG.Forms.ResourceViewerControl._activeViewer = null
protected
List<IFileViewer> IG.Forms.ResourceViewerControl._viewers = null
protected
IFileViewer IG.Forms.ResourceViewerControl._imageViewer = null
private
IFileViewer IG.Forms.ResourceViewerControl._fileViewer = null
private
bool IG.Forms.ResourceViewerControl._isShownImmediately = true
protected
System.ComponentModel.IContainer IG.Forms.ResourceViewerControl.components = null
private

Required designer variable.

ResourceSelector IG.Forms.ResourceViewerControl.resourceSelector1
private
System.Windows.Forms.GroupBox IG.Forms.ResourceViewerControl.grpPreview
private
ImageViewerControl IG.Forms.ResourceViewerControl.imageViewerControl1
private
SoundPlayerControlSimple IG.Forms.ResourceViewerControl.soundPlayerControlSimple1
private
System.Windows.Forms.TextBox IG.Forms.ResourceViewerControl.txtOutput
private
System.Windows.Forms.SplitContainer IG.Forms.ResourceViewerControl.splitContainer1
private
System.Windows.Forms.Button IG.Forms.ResourceViewerControl.btnShowInExternalViewer
private
FileViewerControl IG.Forms.ResourceViewerControl.fileViewerControl1
private

Property Documentation

bool IG.Forms.ResourceViewerControl.IsImagePreviewActive
getprotected set
bool IG.Forms.ResourceViewerControl.IsSoundPreviewActive
getprotected set
bool IG.Forms.ResourceViewerControl.IsAnyPreviewActive
get
int IG.Forms.ResourceViewerControl.NumViewers
get

Returns the number of viewers installed.

IFileViewer IG.Forms.ResourceViewerControl.ActiveViewer
getsetprotected
List<IFileViewer> IG.Forms.ResourceViewerControl.Viewers
getprotected
IFileViewer IG.Forms.ResourceViewerControl.ImageViewer
getsetprotected

Gets or set internal image viewer component (which is used if other viewers can not be used for viewing the current resource).

IFileViewer IG.Forms.ResourceViewerControl.FileViewer
getsetprotected

Gets or set internal general file viewer component (which is used if other viewers can not be used for viewing the current resource).

bool IG.Forms.ResourceViewerControl.IsShownImmediately
getset

Flag that specifies whether content is shown immediately after the viewed object is set.

If set to true and the viewer does not at all have such capability, this should NOT throw an exception (thus, user should check success by verifying if flag changed).


The documentation for this class was generated from the following files: