C# Class SIPSorcery.SoftPhone.UIHelper

Show file Open project: sipsorcery/sipsorcery

Public Methods

Method Description
Bitmap2BitmapImage ( System bitmap ) : BitmapImage
BitmapImage2Bitmap ( BitmapImage bitmapImage ) : System.Drawing.Bitmap
DoOnUIThread ( UIElement element, System.Action action ) : void
GetBitmapImageFromBase64String ( string base64Bitmap ) : BitmapImage
GetJPEGBase64StringFromBitmapImage ( BitmapImage bmpImage, long jpegEncoderQuality, System rotateFlip ) : string
GetLastInput ( ) : System.TimeSpan

Retrieve the time of the last user interaction

LoadBitmap ( Uri imageURI ) : System.Drawing.Bitmap
LoadBitmap ( string imageURI ) : System.Drawing.Bitmap
LoadImageBytes ( Uri imageURI ) : byte[]
ResetIdleTimer ( ) : void

Reset the last input timer. We move the mouse one pixel to reset the system timer.

ScreenCoordinatesToWPF ( Visual visual, Point screenPoint ) : Point

Converts supplied screen coordinates into the correct WPF device-independant coordinates using an existing control or window

Private Methods

Method Description
DeleteObject ( IntPtr hObject ) : bool
GetEncoder ( System format ) : System.Drawing.Imaging.ImageCodecInfo
GetLastInputInfo ( LASTINPUTINFO &plii ) : bool
SendInput ( uint nInputs, INPUT &pInputs, int cbSize ) : uint

Method Details

Bitmap2BitmapImage() public static method

public static Bitmap2BitmapImage ( System bitmap ) : BitmapImage
bitmap System
return System.Windows.Media.Imaging.BitmapImage

BitmapImage2Bitmap() public static method

public static BitmapImage2Bitmap ( BitmapImage bitmapImage ) : System.Drawing.Bitmap
bitmapImage System.Windows.Media.Imaging.BitmapImage
return System.Drawing.Bitmap

DoOnUIThread() public static method

public static DoOnUIThread ( UIElement element, System.Action action ) : void
element System.Windows.UIElement
action System.Action
return void

GetBitmapImageFromBase64String() public static method

public static GetBitmapImageFromBase64String ( string base64Bitmap ) : BitmapImage
base64Bitmap string
return System.Windows.Media.Imaging.BitmapImage

GetJPEGBase64StringFromBitmapImage() public static method

public static GetJPEGBase64StringFromBitmapImage ( BitmapImage bmpImage, long jpegEncoderQuality, System rotateFlip ) : string
bmpImage System.Windows.Media.Imaging.BitmapImage
jpegEncoderQuality long
rotateFlip System
return string

GetLastInput() public static method

Retrieve the time of the last user interaction
public static GetLastInput ( ) : System.TimeSpan
return System.TimeSpan

LoadBitmap() public static method

public static LoadBitmap ( Uri imageURI ) : System.Drawing.Bitmap
imageURI System.Uri
return System.Drawing.Bitmap

LoadBitmap() public static method

public static LoadBitmap ( string imageURI ) : System.Drawing.Bitmap
imageURI string
return System.Drawing.Bitmap

LoadImageBytes() public static method

public static LoadImageBytes ( Uri imageURI ) : byte[]
imageURI System.Uri
return byte[]

ResetIdleTimer() public static method

Reset the last input timer. We move the mouse one pixel to reset the system timer.
public static ResetIdleTimer ( ) : void
return void

ScreenCoordinatesToWPF() public static method

Converts supplied screen coordinates into the correct WPF device-independant coordinates using an existing control or window
public static ScreenCoordinatesToWPF ( Visual visual, Point screenPoint ) : Point
visual Visual The control or window the screen point is in
screenPoint Point the point in screen coordinates to be transformed
return Point