C# Class Helpers.GeneralHelper

Show file Open project: ArupAus/RvtUnit

Public Methods

Method Description
BitmapToBitmapImage ( Bitmap srcBitmap ) : BitmapImage

Converts the GDI bitmap image to DirectX bitmap image.

SetRevitAsWindowOwner ( Window dialog ) : void

Sets the given window's owner to Revit window.

Private Methods

Method Description
FindRevitWindowHandle ( ) : IntPtr

Finds the Revit window handle.

GetCurrentThreadId ( ) : uint

Method Details

BitmapToBitmapImage() public static method

Converts the GDI bitmap image to DirectX bitmap image.
public static BitmapToBitmapImage ( Bitmap srcBitmap ) : BitmapImage
srcBitmap System.Drawing.Bitmap The source GDI bitmap.
return System.Windows.Media.Imaging.BitmapImage

SetRevitAsWindowOwner() public static method

Sets the given window's owner to Revit window.
public static SetRevitAsWindowOwner ( Window dialog ) : void
dialog System.Windows.Window Target window.
return void