home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 April / PCWorld_2007-04_cd.bin / multimedia / ria / Setup.exe / SetupViewer.msi / _A4C3967D5AF14CD29D2BFA6DC5376F4C < prev    next >
Text File  |  2006-12-27  |  1KB  |  46 lines

  1. Imports System.IO
  2.  
  3. Public Class UserControl1
  4.     Implements Plugins.IPlugin
  5.  
  6.     Public Function View(ByVal FilePath As String) As String Implements Plugins.IPlugin.View
  7.         ' Necessary attribute
  8.         Me.Dock = DockStyle.Fill
  9.  
  10.         Using fs As New FileStream(FilePath, FileMode.Open, FileAccess.Read, FileShare.Read)
  11.             Using sr As New StreamReader(fs)
  12.                 Dim s As String = sr.ReadToEnd
  13.                 TextBox1.MaxLength = s.Length
  14.                 TextBox1.Text = s
  15.             End Using
  16.         End Using
  17.  
  18.         ' Return file properties to string
  19.         Return ""
  20.     End Function
  21.  
  22.     Public ReadOnly Property PluginName() As String Implements Plugins.IPlugin.PluginName
  23.         Get
  24.             Return "Text viewer plugin"
  25.         End Get
  26.     End Property
  27.  
  28.     Public Function Thumb(ByVal FilePath As String, ByVal Width As Integer, ByVal Height As Integer) As System.Drawing.Image Implements Plugins.IPlugin.Thumb
  29.         ' Return Thumbnails Image or Nothing
  30.         Return Nothing
  31.     End Function
  32.  
  33.     Public ReadOnly Property Vendor() As String Implements Plugins.IPlugin.Vendor
  34.         Get
  35.             Return "RIA-Media"
  36.         End Get
  37.     End Property
  38.  
  39.     Public ReadOnly Property Version() As String Implements Plugins.IPlugin.Version
  40.         Get
  41.             Return "1.0"
  42.         End Get
  43.     End Property
  44.  
  45. End Class
  46.