Powertek.PtWindowSettings Class Reference

Easy config handling of windows settings. More...

List of all members.

Public Member Functions

 PtWindowSettings (String regName)
void SetDefaults (int left, int top, int width, int height, bool show, bool maximized)
void SetDefaults (int left, int top, bool show)
void ReadSettings (String keyName)
void SaveSettings (String keyName)
void VerifyAndSetToForm (Form form, bool setWidthAndHeight, bool setShow)
void SetVisible (bool visible)
void SetWindowVisible (Form form, bool visible)
void GetSettingsFromForm (Form form)

Properties

bool Visible [get]
int Left [get, set]
int Top [get, set]
int Width [get, set]
int Height [get, set]
bool Show [get, set]
bool Maximized [get, set]


Detailed Description


Constructor & Destructor Documentation

Powertek.PtWindowSettings.PtWindowSettings ( String  regName  ) 

Initialize the WindowSettings.

Parameters:
regName The Name of the Settings for reading/saving into the registry e.g. form1Settings, form2Settings etc.


Member Function Documentation

void Powertek.PtWindowSettings.GetSettingsFromForm ( Form  form  ) 

Get all needed params from the given form.

Parameters:
form 

void Powertek.PtWindowSettings.ReadSettings ( String  keyName  ) 

Read window Settings from the registry key.

Parameters:
keyName Registry key name

void Powertek.PtWindowSettings.SaveSettings ( String  keyName  ) 

Save window Settings to the registry key.

Parameters:
keyName 

void Powertek.PtWindowSettings.SetDefaults ( int  left,
int  top,
bool  show 
)

Set the Default Parameters for the Window.

Parameters:
left 
top 
show 

void Powertek.PtWindowSettings.SetDefaults ( int  left,
int  top,
int  width,
int  height,
bool  show,
bool  maximized 
)

Set the Default Parameters for the Window.

Parameters:
left 
top 
width 
height 
show 
maximized 

void Powertek.PtWindowSettings.SetVisible ( bool  visible  ) 

Set visibility of the form, not equal with Hide/show.

Parameters:
visible 

void Powertek.PtWindowSettings.SetWindowVisible ( Form  form,
bool  visible 
)

Set visibility of the form, Show (including BringToFront) and hide the form.

Parameters:
form 
visible 

void Powertek.PtWindowSettings.VerifyAndSetToForm ( Form  form,
bool  setWidthAndHeight,
bool  setShow 
)

Verify the Settings readed from the reg key, adjust window size, position to current main screen and set it to the form.

Parameters:
form The form to set the params to
setWidthAndHeight Set also the window form width and height
setShow Show the form


Property Documentation

int Powertek.PtWindowSettings.Height [get, set]

Get the internal form height.

int Powertek.PtWindowSettings.Left [get, set]

Get the internal form left.

bool Powertek.PtWindowSettings.Maximized [get, set]

Get the internal form maximized state.

bool Powertek.PtWindowSettings.Show [get, set]

Get the internal form show state.

int Powertek.PtWindowSettings.Top [get, set]

Get the internal form top.

bool Powertek.PtWindowSettings.Visible [get]

Get the internal visiblity state.

int Powertek.PtWindowSettings.Width [get, set]

Get the internal form width.


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

Generated on Thu Nov 20 04:47:26 2008 for Powertek, 2.0.5.52 by  doxygen 1.5.7.1