| IGLib 1.5 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Classes | Public Member Functions | Static Public Member Functions | Properties | Static Private Member Functions | Static Private Attributes | List of all members
IG.Forms.UtilForms Class Reference

Various forms utilities. More...

Collaboration diagram for IG.Forms.UtilForms:
[legend]

## Classes
class | WindowsAPI

## Public Member Functions
void | GenerateKeyPressTest1 (Control targetControl, string keyCode)
Icon | FileIcon (string filePath)
Icon | DllIcon (string DLLPath, int iconIndex)

## Static Public Member Functions
static void | Write (string str)
static void | Write (bool block, string str)
static void | WriteLine (string str)
static void | WriteLine (bool block, string str)
static void | Write (Char arg)
static void | Write (Boolean arg)
static void | Write (Char[] arg)
static void | Write (Decimal arg)
static void | Write (Double arg)
static void | Write (Int32 arg)
static void | Write (Int64 arg)
static void | Write (Object arg)
static void | Write (Single arg)
static void | Write (UInt32 arg)
static void | Write (UInt64 arg)
static void | Write (String arg, Object arg1)
static void | Write (String arg, Object[] arg1)
static void | Write (Char[] arg, Int32 arg1, Int32 arg2)
static void | Write (String arg, Object arg1, Object arg2)
static void | Write (String arg, Object arg1, Object arg2, Object arg3)
static void | WriteLine (Char arg)
static void | WriteLine (Boolean arg)
static void | WriteLine (Char[] arg)
static void | WriteLine (Decimal arg)
static void | WriteLine (Double arg)
static void | WriteLine (Int32 arg)
static void | WriteLine (Int64 arg)
static void | WriteLine (Object arg)
static void | WriteLine (Single arg)
static void | WriteLine (UInt32 arg)
static void | WriteLine (UInt64 arg)
static void | WriteLine (String arg, Object arg1)
static void | WriteLine (String arg, Object[] arg1)
static void | WriteLine (Char[] arg, Int32 arg1, Int32 arg2)
static void | WriteLine (String arg, Object arg1, Object arg2)
static void | WriteLine (String arg, Object arg1, Object arg2, Object arg3)
static void | ReportError (string errstr)
| Reports an error (including logging, etc., dependent on the current settings). More...
static string | GetErorString (Exception e)
static void | ReportError (Exception e)
| Reports an error (including logging, etc., dependent on the current settings). More...
static void | ReportError (Exception e, string additional)
static void | ReporWarning (Exception e)
static void | ReportWarning (string errstr)
static void | ReportWarning (Exception e, string additional)
static void | GenerateKeyPress (Control targetControl, string keyCode)
| Sends the specified keystorkes to the specified control. More...
static void | PrintControl (Control frm)
| Prints a control by a printer. More...
static void | SaveControlJpeg (Control frm, string filePath)
| Saves the specified control to the specified file in the JPG format (common extension .jpg). More...
static void | SaveControlJpeg (Control frm, string filePath, bool canOverwriteExistent)
| Saves the specified control to the specified file in the JPG format (common extension .jpg). More...
static void | SaveControlGif (Control frm, string filePath)
| Saves the specified control to the specified file in the GIF format (common extension .gif). More...
static void | SaveControlGif (Control frm, string filePath, bool canOverwriteExistent)
| Saves the specified control to the specified file in the GIF format (common extension .gif). More...
static void | SaveControlBmp (Control frm, string filePath)
| Saves the specified control to the specified file in the BMP format (common extension .bmp). More...
static void | SaveControlBmp (Control frm, string filePath, bool canOverwriteExistent)
| Saves the specified control to the specified file in the BMP format (common extension .bmp). More...
static void | SaveControl (Control frm, string filePath, ImageFormat format)
| Saves the specified control to the specified file in a specified bitmap format. More...
static void | SaveControl (Control frm, string filePath, ImageFormat format, bool canOverwriteExistent)
| Saves the specified control to the specified file in a specified bitmap format. More...
static string | SaveControlFileDialogJpeg (Control frm, string initialDirectoryPath)
| Saves the specified control to a file in the JPG format (common extension .jpg). The file is chosen by the user via a file dialog that is launched. More...
static string | SaveControlFileDialogJpeg (Control frm, string initialDirectoryPath, bool canOverwriteExistent)
| Saves the specified control to the specified file in the JPEG format (common extension .jpg). The file is chosen by the user via a file dialog that is launched. More...
static string | SaveControlFileDialogGif (Control frm, string initialDirectoryPath)
| Saves the specified control to a file in the GIF format (common extension .gif). The file is chosen by the user via a file dialog that is launched. More...
static string | SaveControlFileDialogGif (Control frm, string initialDirectoryPath, bool canOverwriteExistent)
| Saves the specified control to the specified file in the GIF format (common extension .gif). The file is chosen by the user via a file dialog that is launched. More...
static string | SaveControlFileDialogBmp (Control frm, string initialDirectoryPath)
| Saves the specified control to a file in the BMP format (common extension .bmp). The file is chosen by the user via a file dialog that is launched. More...
static string | SaveControlFileDialogBmp (Control frm, string initialDirectoryPath, bool canOverwriteExistent)
| Saves the specified control to the specified file in the BMP format (common extension .bmp). The file is chosen by the user via a file dialog that is launched. More...
static string | SaveControlFileDialog (Control frm, string initialDirectoryPath, string extension, ImageFormat format)
| Saves the specified control to a file. The is chosen by the user via a file dialog that is launched. More...
static string | SaveControlFileDialog (Control frm, string initialDirectoryPath, string extension, ImageFormat format, bool canOverwriteExistent)
| Saves the specified control's image to the specified file in a specified bitmap format. More...
static void | BlinkForm (Control frm)
static void | BlinkForm (Control frm, int numBlinks, int blinkTimeMs)
static void | RecursiveControlDelegate (Control frm, ControlDelegate fd)
| Recursively executes a dlegate of type (vod(Control)) on frm and all its children. More...
static void | SetBackColorRec (Control win, Color col)
| Recursively sets background color for a window consform and all its children. More...
static void | SetForeColorRec (Control win, Color col)
| Recursively sets foreground color for a window consform and all its children. More...
static void | ConsoleExample ()
static void | ConsoleExample2 ()

## Properties
static ConsoleForm | Console`[get, set]`

## Static Private Member Functions
static bool | ConsoleReady ()
static void | ReserveWrite (string str)
static void | ReserveWriteLine (string str)
static void | ReserveReportError (string errorstr)
static void | ReserveReportError (Exception e)
static void | ReserveReportError (Exception e, string additional)
static void | ReserveReportWarning (string Warningstr)
static void | ReserveReportWarning (Exception e)
static void | ReserveReportWarning (Exception e, string additional)

## Static Private Attributes
static ConsoleForm | ApplicationConsole = null
| Common tools for Windows forms. More...
static ConsoleForm | auxcons
static object | InnerAppConsLock = new object()
static object | OuterAppConsLock = new object()
static int | NumResWrErr = 0
static int | MaxResWrErr = 4

## Detailed Description

Various forms utilities.

## Member Function Documentation

static bool IG.Forms.UtilForms.ConsoleReady | ( |  | ) |
| inline static private

References IG.Forms.UtilForms.ReserveReportError().

Referenced by IG.Forms.UtilForms.ReportError(), IG.Forms.UtilForms.Write(), and IG.Forms.UtilForms.WriteLine().

static void IG.Forms.UtilForms.Write | ( | string | str | ) |
| inline static

References IG.Forms.UtilForms.Console, IG.Forms.UtilForms.ConsoleReady(), IG.Forms.UtilForms.ReserveReportError(), IG.Forms.UtilForms.ReserveWrite(), and IG.Forms.ConsoleForm.Write().

static void IG.Forms.UtilForms.Write | ( | bool | block,
|  | string | str
| ) |  |
| inline static

References IG.Forms.UtilForms.Console, IG.Forms.UtilForms.ConsoleReady(), IG.Forms.UtilForms.ReserveReportError(), IG.Forms.UtilForms.ReserveWrite(), and IG.Forms.ConsoleForm.Write().

static void IG.Forms.UtilForms.WriteLine | ( | string | str | ) |
| inline static

References IG.Forms.UtilForms.Console, IG.Forms.UtilForms.ConsoleReady(), IG.Forms.UtilForms.ReserveReportError(), IG.Forms.UtilForms.ReserveWrite(), and IG.Forms.ConsoleForm.WriteLine().

Referenced by IG.Forms.UtilForms.ConsoleExample2().

static void IG.Forms.UtilForms.WriteLine | ( | bool | block,
|  | string | str
| ) |  |
| inline static

References IG.Forms.UtilForms.Console, IG.Forms.UtilForms.ConsoleReady(), IG.Forms.UtilForms.ReserveReportError(), IG.Forms.UtilForms.ReserveWrite(), and IG.Forms.ConsoleForm.WriteLine().

static void IG.Forms.UtilForms.Write | ( | Char | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | Boolean | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | Char[] | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | Decimal | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | Double | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | Int32 | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | Int64 | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | Object | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | Single | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | UInt32 | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | UInt64 | arg | ) |
| inline static

static void IG.Forms.UtilForms.Write | ( | String | arg,
|  | Object | arg1
| ) |  |
| inline static

static void IG.Forms.UtilForms.Write | ( | String | arg,
|  | Object[] | arg1
| ) |  |
| inline static

static void IG.Forms.UtilForms.Write | ( | Char[] | arg,
|  | Int32 | arg1,
|  | Int32 | arg2
| ) |  |
| inline static

static void IG.Forms.UtilForms.Write | ( | String | arg,
|  | Object | arg1,
|  | Object | arg2
| ) |  |
| inline static

static void IG.Forms.UtilForms.Write | ( | String | arg,
|  | Object | arg1,
|  | Object | arg2,
|  | Object | arg3
| ) |  |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Char | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Boolean | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Char[] | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Decimal | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Double | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Int32 | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Int64 | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Object | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Single | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | UInt32 | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | UInt64 | arg | ) |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | String | arg,
|  | Object | arg1
| ) |  |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | String | arg,
|  | Object[] | arg1
| ) |  |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | Char[] | arg,
|  | Int32 | arg1,
|  | Int32 | arg2
| ) |  |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | String | arg,
|  | Object | arg1,
|  | Object | arg2
| ) |  |
| inline static

static void IG.Forms.UtilForms.WriteLine | ( | String | arg,
|  | Object | arg1,
|  | Object | arg2,
|  | Object | arg3
| ) |  |
| inline static

static void IG.Forms.UtilForms.ReserveWrite | ( | string | str | ) |
| inline static private

References IG.Forms.FadingMessage.BackGroundColor, IG.Forms.FadingMessage.MsgText, IG.Forms.FadingMessage.MsgTitle, IG.Forms.UtilForms.ReserveReportError(), and IG.Forms.FadingMessage.ShowThread().

Referenced by IG.Forms.UtilForms.Write(), and IG.Forms.UtilForms.WriteLine().

static void IG.Forms.UtilForms.ReserveWriteLine | ( | string | str | ) |
| inline static private

static void IG.Forms.UtilForms.ReportError | ( | string | errstr | ) |
| inline static

Reports an error (including logging, etc., dependent on the current settings).

References IG.Forms.UtilForms.Console, IG.Forms.UtilForms.ConsoleReady(), IG.Forms.ConsoleForm.ReportError0(), and IG.Forms.UtilForms.ReserveReportError().

Referenced by IG.Forms.UtilForms.BlinkForm(), IG.Forms.ConsoleForm.CloseBtn_Click(), IG.Forms.ConsoleForm.CloseForm(), IG.Forms.ConsoleForm.ConfirmInputBtn_Click(), IG.Forms.UtilForms.ConsoleExample2(), IG.Forms.ConsoleForm.ConsoleForm_Dispose(), IG.Forms.ConsoleForm.ConsoleForm_FormClosing(), IG.Forms.ConsoleForm.ConsoleForm_Load(), IG.Forms.UtilForms.DllIcon(), IG.Forms.ConsoleForm.Example(), IG.Forms.UtilForms.FileIcon(), IG.Forms.ConsoleForm.FinalizeReading(), IG.Forms.ConsoleForm.FormThreadFunc(), IG.Forms.ConsoleForm.HideBtn_Click(), IG.Forms.ConsoleForm.HideForm(), IG.Forms.ConsoleForm.HideInput(), IG.Forms.ConsoleForm.InBox_KeyPress(), IG.Forms.ConsoleForm.InBox_KeyUp(), IG.Forms.ConsoleForm.InBox_PreviewKeyDown(), IG.Forms.ConsoleForm.InputChk_CheckedChanged(), IG.Forms.ConsoleForm.InputConfirm_Read(), IG.Forms.ConsoleForm.InputConfirm_ReadDouble(), IG.Forms.ConsoleForm.InputConfirm_ReadLong(), IG.Forms.ConsoleForm.PrepareForReading(), IG.Forms.ConsoleForm.Read(), IG.Forms.ConsoleForm.ReadDouble(), IG.Forms.ConsoleForm.ReadLine(), IG.Forms.ConsoleForm.ReadLong(), IG.Forms.ConsoleForm.ReadString(), IG.Forms.UtilForms.RecursiveControlDelegate(), IG.Forms.BrowserFormOld.ReportError(), IG.Forms.ConsoleForm.RunInputConfirmationDelegate(), IG.Forms.ConsoleForm.SetErrorStyle(), IG.Forms.ConsoleForm.SetMarkStyle(), IG.Forms.ConsoleForm.SetNormalStyle(), IG.Forms.ConsoleForm.ShowInput(), and IG.Forms.ConsoleForm.WriteOutput().

static string IG.Forms.UtilForms.GetErorString | ( | Exception | e | ) |
| inline static

Referenced by IG.Forms.ConsoleForm.ReportError0(), IG.Forms.UtilForms.ReserveReportError(), IG.Forms.ConsoleForm.ReserveReportError0(), and IG.Forms.UtilForms.ReserveReportWarning().

static void IG.Forms.UtilForms.ReportError | ( | Exception | e | ) |
| inline static

Reports an error (including logging, etc., dependent on the current settings).

References IG.Forms.UtilForms.ReserveReportError().

static void IG.Forms.UtilForms.ReportError | ( | Exception | e,
|  | string | additional
| ) |  |
| inline static

Reports an error (including logging, etc., dependent on the current settings). An additonal string is appended to error report.

static void IG.Forms.UtilForms.ReporWarning | ( | Exception | e | ) |
| inline static

static void IG.Forms.UtilForms.ReportWarning | ( | string | errstr | ) |
| inline static

static void IG.Forms.UtilForms.ReportWarning | ( | Exception | e,
|  | string | additional
| ) |  |
| inline static

static void IG.Forms.UtilForms.ReserveReportError | ( | string | errorstr | ) |
| inline static private

References IG.Forms.FadingMessage.BackGroundColor, IG.Forms.FadingMessage.MsgText, IG.Forms.FadingMessage.MsgTitle, and IG.Forms.FadingMessage.ShowThread().

Referenced by IG.Forms.UtilForms.ConsoleReady(), IG.Forms.UtilForms.ReportError(), IG.Forms.UtilForms.ReserveReportError(), IG.Forms.UtilForms.ReserveWrite(), IG.Forms.UtilForms.Write(), and IG.Forms.UtilForms.WriteLine().

static void IG.Forms.UtilForms.ReserveReportError | ( | Exception | e | ) |
| inline static private

References IG.Forms.UtilForms.GetErorString(), and IG.Forms.UtilForms.ReserveReportError().

static void IG.Forms.UtilForms.ReserveReportError | ( | Exception | e,
|  | string | additional
| ) |  |
| inline static private

References IG.Forms.UtilForms.GetErorString(), and IG.Forms.UtilForms.ReserveReportError().

static void IG.Forms.UtilForms.ReserveReportWarning | ( | string | Warningstr | ) |
| inline static private

References IG.Forms.FadingMessage.MsgText, IG.Forms.FadingMessage.MsgTitle, and IG.Forms.FadingMessage.ShowThread().

Referenced by IG.Forms.UtilForms.ReserveReportWarning().

static void IG.Forms.UtilForms.ReserveReportWarning | ( | Exception | e | ) |
| inline static private

References IG.Forms.UtilForms.GetErorString(), and IG.Forms.UtilForms.ReserveReportWarning().

static void IG.Forms.UtilForms.ReserveReportWarning | ( | Exception | e,
|  | string | additional
| ) |  |
| inline static private

References IG.Forms.UtilForms.GetErorString(), and IG.Forms.UtilForms.ReserveReportWarning().

static void IG.Forms.UtilForms.GenerateKeyPress | ( | Control | targetControl,
|  | string | keyCode
| ) |  |
| inline static

Sends the specified keystorkes to the specified control.

Examples: "A", "B", "F1", "{ENTER}", "{DELETE}", "{END}",

"^AB" - hold Ctrl while A is pressed, then press B

"+(AB)" (hold Shift while A and B are pressed),

"%{ENTER}" (hold Alt while Enter is pressed).

Parameters

  targetControl | Target control to which the keystrokes are sent.
  keyCode | A string specifying keys or sequence thereof to be sent to the control.

List of codes accepted:

http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx

Referenced by IG.Gr3d.VtkControlBase.SendKeys().

void IG.Forms.UtilForms.GenerateKeyPressTest1 | ( | Control | targetControl,
|  | string | keyCode
| ) |  |
| inline

static void IG.Forms.UtilForms.PrintControl | ( | Control | frm | ) |
| inline static

Prints a control by a printer.

Parameters

  frm | Control to be printed.

static void IG.Forms.UtilForms.SaveControlJpeg | ( | Control | frm,
|  | string | filePath
| ) |  |
| inline static

Saves the specified control to the specified file in the JPG format (common extension .jpg).

The file is overwritten if it already exists.

Parameters

  frm | Control to be printed.
  filePath | Path of the file where image is saved.

static void IG.Forms.UtilForms.SaveControlJpeg | ( | Control | frm,
|  | string | filePath,
|  | bool | canOverwriteExistent
| ) |  |
| inline static

Saves the specified control to the specified file in the JPG format (common extension .jpg).

canOverwriteExistent specifies whether existent files can be overritten.

Parameters

  frm | Control to be printed.
  filePath | Path of the file where image is saved.
  canOverwriteExistent | Whether the method can override existent files.

If false and filePath specifies an existent file then exception is thrown.

static void IG.Forms.UtilForms.SaveControlGif | ( | Control | frm,
|  | string | filePath
| ) |  |
| inline static

Saves the specified control to the specified file in the GIF format (common extension .gif).

The file is overwritten if it already exists.

Parameters

  frm | Control to be printed.
  filePath | Path of the file where image is saved.

static void IG.Forms.UtilForms.SaveControlGif | ( | Control | frm,
|  | string | filePath,
|  | bool | canOverwriteExistent
| ) |  |
| inline static

Saves the specified control to the specified file in the GIF format (common extension .gif).

canOverwriteExistent specifies whether existent files can be overritten.

Parameters

  frm | Control to be printed.
  filePath | Path of the file where image is saved.
  canOverwriteExistent | Whether the method can override existent files.

If false and filePath specifies an existent file then exception is thrown.

static void IG.Forms.UtilForms.SaveControlBmp | ( | Control | frm,
|  | string | filePath
| ) |  |
| inline static

Saves the specified control to the specified file in the BMP format (common extension .bmp).

The file is overwritten if it already exists.

Parameters

  frm | Control to be printed.
  filePath | Path of the file where image is saved.

static void IG.Forms.UtilForms.SaveControlBmp | ( | Control | frm,
|  | string | filePath,
|  | bool | canOverwriteExistent
| ) |  |
| inline static

Saves the specified control to the specified file in the BMP format (common extension .bmp).

canOverwriteExistent specifies whether existent files can be overritten.

Parameters

  frm | Control to be printed.
  filePath | Path of the file where image is saved.
  canOverwriteExistent | Whether the method can override existent files.

If false and filePath specifies an existent file then exception is thrown.

static void IG.Forms.UtilForms.SaveControl | ( | Control | frm,
|  | string | filePath,
|  | ImageFormat | format
| ) |  |
| inline static

Saves the specified control to the specified file in a specified bitmap format.

The file is overwritten if it already exists.

Parameters

  frm | Control to be printed.
  filePath | Path of the file where image is saved.
  format | Image format.

static void IG.Forms.UtilForms.SaveControl | ( | Control | frm,
|  | string | filePath,
|  | ImageFormat | format,
|  | bool | canOverwriteExistent
| ) |  |
| inline static

Saves the specified control to the specified file in a specified bitmap format.

canOverwriteExistent specifies whether existent files can be overritten.

Parameters

  frm | Control to be printed.
  filePath | Path of the file where image is saved.
  format | Image format.
  canOverwriteExistent | Whether the method can override existent files.

If false and filePath specifies an existent file then exception is thrown.

static string IG.Forms.UtilForms.SaveControlFileDialogJpeg | ( | Control | frm,
|  | string | initialDirectoryPath
| ) |  |
| inline static

Saves the specified control to a file in the JPG format (common extension .jpg). The file is chosen by the user via a file dialog that is launched.

The file is overwritten if it already exists.

Parameters

  frm | Control to be printed.
  initialDirectoryPath | Initial directory opened in file dialog. Set to current directory if not specified.

Returns
  Path to the file to which the control image was saved, or null if it was not saved.

static string IG.Forms.UtilForms.SaveControlFileDialogJpeg | ( | Control | frm,
|  | string | initialDirectoryPath,
|  | bool | canOverwriteExistent
| ) |  |
| inline static

Saves the specified control to the specified file in the JPEG format (common extension .jpg). The file is chosen by the user via a file dialog that is launched.

canOverwriteExistent specifies whether existent files can be overritten.

Parameters

  frm | Control to be printed.
  initialDirectoryPath | Initial directory opened in file dialog. Set to current directory if not specified.
  canOverwriteExistent | Whether the method can override existent files.

If false and an existent file is selected then exception is thrown.

Returns
  Path to the file to which the control image was saved, or null if it was not saved.

static string IG.Forms.UtilForms.SaveControlFileDialogGif | ( | Control | frm,
|  | string | initialDirectoryPath
| ) |  |
| inline static

Saves the specified control to a file in the GIF format (common extension .gif). The file is chosen by the user via a file dialog that is launched.

The file is overwritten if it already exists.

Parameters

  frm | Control to be printed.
  initialDirectoryPath | Initial directory opened in file dialog. Set to current directory if not specified.

Returns
  Path to the file to which the control image was saved, or null if it was not saved.

static string IG.Forms.UtilForms.SaveControlFileDialogGif | ( | Control | frm,
|  | string | initialDirectoryPath,
|  | bool | canOverwriteExistent
| ) |  |
| inline static

Saves the specified control to the specified file in the GIF format (common extension .gif). The file is chosen by the user via a file dialog that is launched.

canOverwriteExistent specifies whether existent files can be overritten.

Parameters

  frm | Control to be printed.
  initialDirectoryPath | Initial directory opened in file dialog. Set to current directory if not specified.
  canOverwriteExistent | Whether the method can override existent files.

If false and an existent file is selected then exception is thrown.

Returns
  Path to the file to which the control image was saved, or null if it was not saved.

static string IG.Forms.UtilForms.SaveControlFileDialogBmp | ( | Control | frm,
|  | string | initialDirectoryPath
| ) |  |
| inline static

Saves the specified control to a file in the BMP format (common extension .bmp). The file is chosen by the user via a file dialog that is launched.

The file is overwritten if it already exists.

Parameters

  frm | Control to be printed.
  initialDirectoryPath | Initial directory opened in file dialog. Set to current directory if not specified.

Returns
  Path to the file to which the control image was saved, or null if it was not saved.

static string IG.Forms.UtilForms.SaveControlFileDialogBmp | ( | Control | frm,
|  | string | initialDirectoryPath,
|  | bool | canOverwriteExistent
| ) |  |
| inline static

Saves the specified control to the specified file in the BMP format (common extension .bmp). The file is chosen by the user via a file dialog that is launched.

canOverwriteExistent specifies whether existent files can be overritten.

Parameters

  frm | Control to be printed.
  initialDirectoryPath | Initial directory opened in file dialog. Set to current directory if not specified.
  canOverwriteExistent | Whether the method can override existent files.

If false and filePath specifies an existent file then exception is thrown.

Returns
  Path to the file to which the control image was saved, or null if it was not saved.

static string IG.Forms.UtilForms.SaveControlFileDialog | ( | Control | frm,
|  | string | initialDirectoryPath,
|  | string | extension,
|  | ImageFormat | format
| ) |  |
| inline static

Saves the specified control to a file. The is chosen by the user via a file dialog that is launched.

The file is overwritten if it already exists.

Parameters

  frm | Control to be printed.
  initialDirectoryPath | Initial directory opened in file dialog. Set to current directory if not specified.
  extension | File extension (e.g. ".bmp").
  format | Image format.

Returns
  Path to the file to which the control image was saved, or null if it was not saved.

static string IG.Forms.UtilForms.SaveControlFileDialog | ( | Control | frm,
|  | string | initialDirectoryPath,
|  | string | extension,
|  | ImageFormat | format,
|  | bool | canOverwriteExistent
| ) |  |
| inline static

Saves the specified control's image to the specified file in a specified bitmap format.

canOverwriteExistent specifies whether existent files can be overritten.

Parameters

  frm | Control to be printed.
  initialDirectoryPath | Initial directory opened in file dialog. Set to current directory if not specified.
  extension | File extension (e.g. ".bmp").
  filePath | Path of the file where image is saved.
  format | Image format.
  canOverwriteExistent | Whether the method can override existent files.

If false and filePath specifies an existent file then exception is thrown.

Returns
  Path to the file to which the control image was saved, or null if it was not saved.

static void IG.Forms.UtilForms.BlinkForm | ( | Control | frm | ) |
| inline static

Referenced by IG.Gr3d.Graph3dManipulator.btnClose_Click(), IG.Gr3d.Graph3dManipulatorBasic.btnCloseWin_Click(), IG.Forms.WindowPositionerControl.MakeWindowsVisible(), IG.Forms.XMLTreeView.MenuTools_TestXPath_Click(), IG.Gr3d.Graph3dManipulator.txtFi_Validated(), IG.Forms.WindowPositionerControl.txtPause_Validated(), IG.Gr3d.Graph3dManipulator.txtR_Validated(), IG.Gr3d.Graph3dManipulator.txtRoll_Validated(), IG.Gr3d.Graph3dManipulator.txtRotationStep_Validated(), IG.Gr3d.Graph3dManipulator.txtTheta_Validated(), IG.Gr3d.Graph3dManipulator.txtViewAngle_Validated(), and IG.Gr3d.Graph3dManipulator.txtZoomFactor_Validated().

static void IG.Forms.UtilForms.BlinkForm | ( | Control | frm,
|  | int | numBlinks,
|  | int | blinkTimeMs
| ) |  |
| inline static

References IG.Forms.UtilForms.ReportError().

static void IG.Forms.UtilForms.RecursiveControlDelegate | ( | Control | frm,
|  | ControlDelegate | fd
| ) |  |
| inline static

Recursively executes a dlegate of type (vod(Control)) on frm and all its children.

References IG.Forms.UtilForms.ReportError().

Referenced by IG.Forms.ReporterConf.ConsoleForm_Load(), and IG.Forms.FadingMessage.FadeMessage_Load().

static void IG.Forms.UtilForms.SetBackColorRec | ( | Control | win,
|  | Color | col
| ) |  |
| inline static

Recursively sets background color for a window consform and all its children.

Referenced by IG.Forms.FadingMessage.FadeMessage_Load(), and IG.Forms.FadingMessage.SetFadeLevel().

static void IG.Forms.UtilForms.SetForeColorRec | ( | Control | win,
|  | Color | col
| ) |  |
| inline static

Recursively sets foreground color for a window consform and all its children.

Icon IG.Forms.UtilForms.FileIcon | ( | string | filePath | ) |
| inline

References IG.Forms.UtilForms.ReportError().

Icon IG.Forms.UtilForms.DllIcon | ( | string | DLLPath,
|  | int | iconIndex
| ) |  |
| inline

References IG.Forms.UtilForms.ReportError().

static void IG.Forms.UtilForms.ConsoleExample | ( |  | ) |
| inline static

References IG.Forms.UtilForms.Console, and IG.Forms.ConsoleForm.WriteLine().

static void IG.Forms.UtilForms.ConsoleExample2 | ( |  | ) |
| inline static

References IG.Forms.UtilForms.Console, IG.Forms.ConsoleForm.ReadLine(), IG.Forms.UtilForms.ReportError(), and IG.Forms.UtilForms.WriteLine().

## Member Data Documentation

ConsoleForm IG.Forms.UtilForms.ApplicationConsole = null
| static private

Common tools for Windows forms.

ConsoleForm IG.Forms.UtilForms.auxcons
| static private

object IG.Forms.UtilForms.InnerAppConsLock = new object()
| static private

object IG.Forms.UtilForms.OuterAppConsLock = new object()
| static private

int IG.Forms.UtilForms.NumResWrErr = 0
| static private

int IG.Forms.UtilForms.MaxResWrErr = 4
| static private

## Property Documentation

ConsoleForm IG.Forms.UtilForms.Console
| static get set

Referenced by IG.Forms.UtilForms.ConsoleExample(), IG.Forms.UtilForms.ConsoleExample2(), IG.Forms.ReporterForms.DefaultReport_ConsoleForm(), IG.Forms.ReporterForms.DefaultReserveReportErrorForms(), IG.Forms.UtilForms.ReportError(), IG.Forms.UtilForms.Write(), and IG.Forms.UtilForms.WriteLine().

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

- igforms/form_tools.cs