Leadtools.Web Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
InputProfileChanged Event
See Also  Example
Leadtools.Web.Controls Namespace > TiledImageViewer Class : InputProfileChanged Event




Occurs when the value of the InputProfile property changes.

Syntax

Visual Basic (Declaration) 
Public Event InputProfileChanged() As EventHandler
Visual Basic (Usage)Copy Code
Dim instance As TiledImageViewer
Dim handler As EventHandler
 
AddHandler instance.InputProfileChanged, handler
C# 
public event EventHandler InputProfileChanged()
Managed Extensions for C++ 
public: __event EventHandler* InputProfileChanged();
C++/CLI 
public:
event EventHandler^ InputProfileChanged();

Example

Visual BasicCopy Code
Public Class MyTiledImageViewer
   Inherits TiledImageViewer
   '.
   '.
   '.
   Protected Overrides Sub OnInputProfileChanged(ByVal e As EventArgs)

      MyBase.OnInputProfileChanged(e)

      Console.WriteLine("OnInputProfileChanged is called")
   End Sub

   Protected Overrides Sub OnOutputProfileChanged(ByVal e As EventArgs)

      MyBase.OnOutputProfileChanged(e)

      Console.WriteLine("OnOutputProfileChanged is called")
   End Sub

   Protected Overrides Sub OnImageUrlChanged(ByVal e As EventArgs)

      MyBase.OnImageUrlChanged(e)

      Console.WriteLine("OnImageUrlChanged is called")
   End Sub

   Protected Overrides Sub OnScaleFactorChanged(ByVal e As EventArgs)
      MyBase.OnScaleFactorChanged(e)

      Console.WriteLine("OnScaleFactorChanged is called")
   End Sub

   Protected Overrides Sub OnSizeModeChanged(ByVal e As EventArgs)
      MyBase.OnSizeModeChanged(e)

      Console.WriteLine("OnSizeModeChanged is called")
   End Sub

   Protected Overrides Sub OnHorizontalAlignModeChanged(ByVal e As EventArgs)
      MyBase.OnHorizontalAlignModeChanged(e)

      Console.WriteLine("OnHorizontalAlignModeChanged is called")
   End Sub

   Protected Overrides Sub OnVerticalAlignModeChanged(ByVal e As EventArgs)
      MyBase.OnVerticalAlignModeChanged(e)

      Console.WriteLine("OnVerticalAlignModeChanged is called")
   End Sub

   Protected Overrides Sub OnResourcesPathChanged(ByVal e As EventArgs)
      MyBase.OnResourcesPathChanged(e)

      Console.WriteLine("OnResourcesPathChanged is called")
   End Sub

   Protected Overrides Sub OnScrollBarVisibleChanged(ByVal e As EventArgs)

      MyBase.OnScrollBarVisibleChanged(e)

      Console.WriteLine("OnScrollBarVisibleChanged is called")
   End Sub

   Protected Overrides Sub OnScrollBarStyleChanged(ByVal e As EventArgs)
      MyBase.OnScrollBarStyleChanged(e)

      Console.WriteLine("OnScrollBarStyleChanged is called")
   End Sub

   Protected Overrides Sub OnTileWidthChanged(ByVal e As EventArgs)
      MyBase.OnTileWidthChanged(e)

      Console.WriteLine("OnTileWidthChanged is called")
   End Sub

   Protected Overrides Sub OnTileHeightChanged(ByVal e As EventArgs)
      MyBase.OnTileHeightChanged(e)

      Console.WriteLine("OnTileHeightChanged is called")
   End Sub
End Class

Public Sub TestMyImageViewer()
   Dim myViewer As MyTiledImageViewer = New MyTiledImageViewer()

   AddHandler myViewer.InputProfileChanged, AddressOf myViewer_InputProfileChanged
   AddHandler myViewer.OutputProfileChanged, AddressOf myViewer_OutputProfileChanged
   AddHandler myViewer.ImageUrlChanged, AddressOf myViewer_ImageUrlChanged
   AddHandler myViewer.ScaleFactorChanged, AddressOf myViewer_ScaleFactorChanged
   AddHandler myViewer.SizeModeChanged, AddressOf myViewer_SizeModeChanged
   AddHandler myViewer.HorizontalAlignModeChanged, AddressOf myViewer_HorizontalAlignModeChanged
   AddHandler myViewer.VerticalAlignModeChanged, AddressOf myViewer_VerticalAlignModeChanged
   AddHandler myViewer.ScrollBarVisibleChanged, AddressOf myViewer_ScrollBarVisibleChanged
   AddHandler myViewer.ScrollBarStyleChanged, AddressOf myViewer_ScrollBarStyleChanged
   AddHandler myViewer.TileWidthChanged, AddressOf myViewer_TileWidthChanged
   AddHandler myViewer.TileHeightChanged, AddressOf myViewer_TileHeightChanged
   AddHandler myViewer.ResourcesPathChanged, AddressOf myViewer_ResourcesPathChanged

   myViewer.InputProfile = String.Empty
   myViewer.OutputProfile = String.Empty
   myViewer.ScaleFactor = 150
   myViewer.SizeMode = ImageViewerSizeMode.Normal
   myViewer.ScrollBarStyle = TiledImageViewerScrollBarStyle.Xp
   myViewer.ScrollBarVisible = True
   myViewer.HorizontalAlignMode = ImageViewerAlignMode.Center
   myViewer.VerticalAlignMode = ImageViewerAlignMode.Center
   myViewer.TileWidth = 250
   myViewer.TileHeight = 250
   myViewer.ResourcesPath = "/Resources/"
   myViewer.ImageUrl = "Image1.cmp"
End Sub

Sub myViewer_InputProfileChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("InputProfile Changed to " + viewer.InputProfile)
   End If
End Sub

Sub myViewer_OutputProfileChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("OutputProfile Changed to " + viewer.OutputProfile)
   End If
End Sub

Sub myViewer_ImageUrlChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("ImageUrl Changed to " + viewer.ImageUrl)
   End If
End Sub

Sub myViewer_ScaleFactorChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("ScaleFactor Changed to " + viewer.ScaleFactor.ToString())
   End If
End Sub

Sub myViewer_SizeModeChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("SizeMode Changed to " + viewer.SizeMode.ToString())
   End If
End Sub

Sub myViewer_HorizontalAlignModeChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("HorizontalAlignMode Changed to " + viewer.HorizontalAlignMode.ToString())
   End If
End Sub

Sub myViewer_VerticalAlignModeChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("VerticalAlignMode Changed to " + viewer.VerticalAlignMode.ToString())
   End If
End Sub

Sub myViewer_ScrollBarVisibleChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("ScrollBarVisible Changed to " + viewer.ScrollBarVisible.ToString())
   End If
End Sub

Sub myViewer_ScrollBarStyleChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("ScrollBarStyle Changed to " + viewer.ScrollBarStyle.ToString())
   End If
End Sub

Sub myViewer_TileWidthChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("TileWidth Changed to " + viewer.TileWidth.ToString())
   End If
End Sub

Sub myViewer_TileHeightChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("TileHeight Changed to " + viewer.TileHeight.ToString())
   End If
End Sub

Sub myViewer_ResourcesPathChanged(ByVal sender As Object, ByVal e As EventArgs)
   Dim viewer As MyTiledImageViewer = CType(sender, MyTiledImageViewer)
   If Not viewer Is Nothing Then
      Console.WriteLine("ResourcesPath Changed to " + viewer.ResourcesPath.ToString())
   End If
End Sub
C#Copy Code
public class MyTiledImageViewer : TiledImageViewer 

   //. 
   //. 
   //. 
   protected override void OnInputProfileChanged(EventArgs e) 
   { 
      base.OnInputProfileChanged(e); 
 
      Console.WriteLine("OnInputProfileChanged is called"); 
   } 
 
   protected override void OnOutputProfileChanged(EventArgs e) 
   { 
      base.OnOutputProfileChanged(e); 
 
      Console.WriteLine("OnOutputProfileChanged is called"); 
   } 
 
   protected override void OnImageUrlChanged(EventArgs e) 
   { 
      base.OnImageUrlChanged(e); 
 
      Console.WriteLine("OnImageUrlChanged is called"); 
   } 
 
   protected override void OnScaleFactorChanged(EventArgs e) 
   { 
      base.OnScaleFactorChanged(e); 
 
      Console.WriteLine("OnScaleFactorChanged is called"); 
   } 
 
   protected override void OnSizeModeChanged(EventArgs e) 
   { 
      base.OnSizeModeChanged(e); 
 
      Console.WriteLine("OnSizeModeChanged is called"); 
   } 
 
   protected override void OnHorizontalAlignModeChanged(EventArgs e) 
   { 
      base.OnHorizontalAlignModeChanged(e); 
 
      Console.WriteLine("OnHorizontalAlignModeChanged is called"); 
   } 
 
   protected override void OnVerticalAlignModeChanged(EventArgs e) 
   { 
      base.OnVerticalAlignModeChanged(e); 
 
      Console.WriteLine("OnVerticalAlignModeChanged is called"); 
   } 
 
   protected override void OnScrollBarVisibleChanged(EventArgs e) 
   { 
      base.OnScrollBarVisibleChanged(e); 
 
      Console.WriteLine("OnScrollBarVisibleChanged is called"); 
   } 
 
   protected override void OnScrollBarStyleChanged(EventArgs e) 
   { 
      base.OnScrollBarStyleChanged(e); 
 
      Console.WriteLine("OnScrollBarStyleChanged is called"); 
   } 
 
   protected override void OnTileWidthChanged(EventArgs e) 
   { 
      base.OnTileWidthChanged(e); 
 
      Console.WriteLine("OnTileWidthChanged is called"); 
   } 
 
   protected override void OnTileHeightChanged(EventArgs e) 
   { 
      base.OnTileHeightChanged(e); 
 
      Console.WriteLine("OnTileHeightChanged is called"); 
   } 
 
   protected override void OnResourcesPathChanged(EventArgs e) 
   { 
      base.OnResourcesPathChanged(e); 
 
      Console.WriteLine("OnResourcesPathChanged is called"); 
   } 

 
void myViewer_InputProfileChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("InputProfile Changed to " + viewer.InputProfile); 

 
void myViewer_OutputProfileChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("OutputProfile Changed to " + viewer.OutputProfile); 

 
void myViewer_ImageUrlChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("ImageUrl Changed to " + viewer.ImageUrl); 

 
void myViewer_ScaleFactorChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("ScaleFactor Changed to " + viewer.ScaleFactor.ToString()); 

 
void myViewer_SizeModeChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("SizeMode Changed to " + viewer.SizeMode.ToString()); 

 
void myViewer_HorizontalAlignModeChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("HorizontalAlignMode Changed to " + viewer.HorizontalAlignMode.ToString()); 

 
void myViewer_VerticalAlignModeChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("VerticalAlignMode Changed to " + viewer.VerticalAlignMode.ToString()); 

 
void myViewer_ScrollBarVisibleChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("ScrollBarVisible Changed to " + viewer.ScrollBarVisible.ToString()); 

 
void myViewer_ScrollBarStyleChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("ScrollBarStyle Changed to " + viewer.ScrollBarStyle.ToString()); 

 
void myViewer_TileWidthChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("TileWidth Changed to " + viewer.TileWidth.ToString()); 

 
void myViewer_TileHeightChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("TileHeight Changed to " + viewer.TileHeight.ToString()); 

 
void myViewer_ResourcesPathChanged(object sender, EventArgs e) 

   MyTiledImageViewer viewer = (MyTiledImageViewer)sender; 
   if(viewer != null) 
      Console.WriteLine("ResourcesPath Changed to " + viewer.ResourcesPath.ToString()); 
}

Remarks

This event is raised if the InputProfile property is changed programmatically.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also