IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Forms.FadingMessage Class Reference

Manages a fading message window. Windows containing a message are launched in separate threads, closing after a specified time. More...

+ Inheritance diagram for IG.Forms.FadingMessage:
+ Collaboration diagram for IG.Forms.FadingMessage:

Public Member Functions

 FadingMessage (string Message, int ShowTime, double FadingTimePortion)
 
 FadingMessage (string Message, int ShowTime)
 
 FadingMessage (string Message)
 
 FadingMessage ()
 Argument-less constructor, does not launch the window in a parallel thread. More...
 
 FadingMessage (string msgtext)
 Shows a fading message in a new thread, with message text equal to mshtext and without a title;. More...
 
 FadingMessage (string msgtext, int showtime)
 Shows a fading message in a new thread, with message text equal to msgtext and with specified showing time in ms. More...
 
 FadingMessage (string msgtext, int showtime, double fadeportion)
 Shows a fading message in a new thread, with message text equal to msgtext and with specified showing time in ms and fading time portion. More...
 
 FadingMessage (string title, string msgtext)
 Shows the consform in a new thread, with a title and with message text equal to msgtext. More...
 
 FadingMessage (string title, string msgtext, int showtime)
 Shows a fading message in a new thread, with a title and with message text equal to msgtext, with specified showing time in ms. More...
 
 FadingMessage (string title, string msgtext, int showtime, double fadeportion)
 Shows a fading message in a new thread, with a title and with message text equal to msgtext, with specified showing time in ms and fading time portion. More...
 
void CloseForm ()
 Closes the FadeMessage by properly (i.e. thread-safe) calling the Close() and Dispose(). More...
 
void ShowThread ()
 
void ShowThread (string text)
 Shows a fading message in a new thread, with message text equal to mshtext and without a title;. More...
 
void ShowThread (string msgtext, int showtime)
 Shows a fading message in a new thread, with message text equal to msgtext and with specified showing time in ms. More...
 
void ShowThread (string msgtext, int showtime, double fadeportion)
 Shows a fading message in a new thread, with message text equal to msgtext and with specified showing time in ms and fading time portion. More...
 
void ShowThread (string title, string text)
 Shows the consform in a new thread, with a title and with message text equal to msgtext. More...
 
void ShowThread (string title, string msgtext, int showtime)
 Shows a fading message in a new thread, with a title and with message text equal to msgtext, with specified showing time in ms. More...
 
void ShowThread (string title, string msgtext, int showtime, double fadeportion)
 Shows a fading message in a new thread, with a title and with message text equal to msgtext, with specified showing time in ms and fading time portion. More...
 

Static Public Member Functions

static void Example ()
 
static void Example2 ()
 

Public Attributes

Color ForeGroundColorTitle = Color.Blue
 Color of the title (if shown in fading message). More...
 
Color ForeGroundColorMsg = Color.Black
 Color of the message text shown in the fading message. More...
 
Color BackGroundColor = Color.LightYellow
 Active background color of the fading message. More...
 
Color FadeColor = Color.DarkGray
 Final (faded) color of the fading message. More...
 
string MsgTitle = null
 
bool IsReady =false
 
bool BlockMaxShownCurrent = false
 Indicates to block launching new messges when too many are processed. More...
 

Static Public Attributes

static int MaxShown = 50
 If false then the consform can not be closed or dispoded. More...
 
static bool BlockMaxShown = false
 

Protected Attributes

bool IsClosable = true
 Returns true if control has been created and is ready to work with. More...
 

Properties

static int DefaultShowTime [get, set]
 
static double DefaultFadingTimePortion [get, set]
 
int ShowTime [get, set]
 
double FadingTimePortion [get, set]
 

Private Member Functions

void basFadingMessage (string Message, int ShowTime, double FadingPortion)
 
void ManipulationThreadFunc ()
 
void MessageThreadFunc ()
 
void baseFadeMessage ()
 Required designer variable. More...
 
void InitializeComponent ()
 Required method for Designer support - do not modify the contents of this method with the code editor. More...
 
void FadeMessage_MouseMove (object sender, MouseEventArgs e)
 
void FadeMessage_MouseDown (object sender, MouseEventArgs e)
 
void ManipulationThreadFunc ()
 
void FormThreadFunc ()
 Launches the message. More...
 
void timer1_Tick (object sender, EventArgs e)
 
void SetFadeLevel (double fadefactor)
 
void SetCommonEvents (Control f)
 
void FadeMessage_Load (object sender, System.EventArgs e)
 
void FadeMessage_Disposed (object sender, System.EventArgs e)
 
void FadeMessage_FormClosing (object sender, FormClosingEventArgs e)
 
void CancelBtn_Click (object sender, EventArgs e)
 
void FadeMessage_MouseClick (object sender, MouseEventArgs e)
 
void PnlStatus_Paint (object sender, PaintEventArgs e)
 

Private Attributes

string text
 
int showtime
 
double fadingportion
 
Thread msgthread = null
 
Thread manipulationthread = null
 
string MsgText = null
 
bool Counted = false
 Instructs just for the current index to block launching the messge when too many are processed. More...
 
System.Windows.Forms.Timer timer1
 
Button btnCancel
 
Label lblStatus
 
Panel BodyPnl
 
Label lblMEssage
 
Label lblTitle
 
Panel PnlStatus
 
Label labelBottom
 
IContainer components
 
int m_PrevX
 
int m_PrevY
 
int vShowTime = defaultShowtime
 
double vFadingTimePortion = defaultFadingTimePortion
 
Thread formthread = null
 
int mintickinterval = 40
 
int maxticks = 50
 
int numticks = 0
 
int totalticks = 20
 
int firsttick = 1000
 
int tickinterval = 100
 
double fadingfactor = 0
 

Static Private Attributes

static int defaultShowtime = 3000
 
static double defaultFadingTimePortion = 0.3
 
static int NumShown = 0
 Indicates how many messages can be shown simultaneously. More...
 

Detailed Description

Manages a fading message window. Windows containing a message are launched in separate threads, closing after a specified time.

$A Igor jul08;

Constructor & Destructor Documentation

IG.Forms.FadingMessage.FadingMessage ( string  Message,
int  ShowTime,
double  FadingTimePortion 
)
inline
IG.Forms.FadingMessage.FadingMessage ( string  Message,
int  ShowTime 
)
inline
IG.Forms.FadingMessage.FadingMessage ( string  Message)
inline
IG.Forms.FadingMessage.FadingMessage ( )
inline

Argument-less constructor, does not launch the window in a parallel thread.

IG.Forms.FadingMessage.FadingMessage ( string  msgtext)
inline

Shows a fading message in a new thread, with message text equal to mshtext and without a title;.

IG.Forms.FadingMessage.FadingMessage ( string  msgtext,
int  showtime 
)
inline

Shows a fading message in a new thread, with message text equal to msgtext and with specified showing time in ms.

IG.Forms.FadingMessage.FadingMessage ( string  msgtext,
int  showtime,
double  fadeportion 
)
inline

Shows a fading message in a new thread, with message text equal to msgtext and with specified showing time in ms and fading time portion.

IG.Forms.FadingMessage.FadingMessage ( string  title,
string  msgtext 
)
inline

Shows the consform in a new thread, with a title and with message text equal to msgtext.

IG.Forms.FadingMessage.FadingMessage ( string  title,
string  msgtext,
int  showtime 
)
inline

Shows a fading message in a new thread, with a title and with message text equal to msgtext, with specified showing time in ms.

IG.Forms.FadingMessage.FadingMessage ( string  title,
string  msgtext,
int  showtime,
double  fadeportion 
)
inline

Shows a fading message in a new thread, with a title and with message text equal to msgtext, with specified showing time in ms and fading time portion.

Member Function Documentation

void IG.Forms.FadingMessage.basFadingMessage ( string  Message,
int  ShowTime,
double  FadingPortion 
)
inlineprivate
void IG.Forms.FadingMessage.ManipulationThreadFunc ( )
inlineprivate
void IG.Forms.FadingMessage.MessageThreadFunc ( )
inlineprivate
void IG.Forms.FadingMessage.baseFadeMessage ( )
inlineprivate

Required designer variable.

void IG.Forms.FadingMessage.InitializeComponent ( )
inlineprivate

Required method for Designer support - do not modify the contents of this method with the code editor.

void IG.Forms.FadingMessage.FadeMessage_MouseMove ( object  sender,
MouseEventArgs  e 
)
inlineprivate
void IG.Forms.FadingMessage.FadeMessage_MouseDown ( object  sender,
MouseEventArgs  e 
)
inlineprivate
void IG.Forms.FadingMessage.ManipulationThreadFunc ( )
inlineprivate
void IG.Forms.FadingMessage.FormThreadFunc ( )
inlineprivate

Launches the message.

void IG.Forms.FadingMessage.timer1_Tick ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.FadingMessage.SetFadeLevel ( double  fadefactor)
inlineprivate
void IG.Forms.FadingMessage.SetCommonEvents ( Control  f)
inlineprivate
void IG.Forms.FadingMessage.FadeMessage_Load ( object  sender,
System.EventArgs  e 
)
inlineprivate
void IG.Forms.FadingMessage.FadeMessage_Disposed ( object  sender,
System.EventArgs  e 
)
inlineprivate
void IG.Forms.FadingMessage.FadeMessage_FormClosing ( object  sender,
FormClosingEventArgs  e 
)
inlineprivate
void IG.Forms.FadingMessage.CancelBtn_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.FadingMessage.CloseForm ( )
inline

Closes the FadeMessage by properly (i.e. thread-safe) calling the Close() and Dispose().

References IG.Forms.VoidDelegate().

void IG.Forms.FadingMessage.ShowThread ( )
inline
void IG.Forms.FadingMessage.ShowThread ( string  text)
inline

Shows a fading message in a new thread, with message text equal to mshtext and without a title;.

void IG.Forms.FadingMessage.ShowThread ( string  msgtext,
int  showtime 
)
inline

Shows a fading message in a new thread, with message text equal to msgtext and with specified showing time in ms.

void IG.Forms.FadingMessage.ShowThread ( string  msgtext,
int  showtime,
double  fadeportion 
)
inline

Shows a fading message in a new thread, with message text equal to msgtext and with specified showing time in ms and fading time portion.

void IG.Forms.FadingMessage.ShowThread ( string  title,
string  text 
)
inline

Shows the consform in a new thread, with a title and with message text equal to msgtext.

void IG.Forms.FadingMessage.ShowThread ( string  title,
string  msgtext,
int  showtime 
)
inline

Shows a fading message in a new thread, with a title and with message text equal to msgtext, with specified showing time in ms.

void IG.Forms.FadingMessage.ShowThread ( string  title,
string  msgtext,
int  showtime,
double  fadeportion 
)
inline

Shows a fading message in a new thread, with a title and with message text equal to msgtext, with specified showing time in ms and fading time portion.

void IG.Forms.FadingMessage.FadeMessage_MouseClick ( object  sender,
MouseEventArgs  e 
)
inlineprivate
void IG.Forms.FadingMessage.PnlStatus_Paint ( object  sender,
PaintEventArgs  e 
)
inlineprivate
static void IG.Forms.FadingMessage.Example ( )
inlinestatic
static void IG.Forms.FadingMessage.Example2 ( )
inlinestatic

Member Data Documentation

string IG.Forms.FadingMessage.text
private
int IG.Forms.FadingMessage.showtime
private
double IG.Forms.FadingMessage.fadingportion
private
Thread IG.Forms.FadingMessage.msgthread = null
private
Thread IG.Forms.FadingMessage.manipulationthread = null
private
static int IG.Forms.FadingMessage.defaultShowtime = 3000
staticprivate
static double IG.Forms.FadingMessage.defaultFadingTimePortion = 0.3
staticprivate
Color IG.Forms.FadingMessage.ForeGroundColorTitle = Color.Blue

Color of the title (if shown in fading message).

Referenced by IG.Forms.ReporterForms.DefaultReport_FadeMessage(), and IG.Forms.ReporterForms.DefaultReserveReportErrorForms().

Color IG.Forms.FadingMessage.ForeGroundColorMsg = Color.Black

Color of the message text shown in the fading message.

Referenced by IG.Forms.ReporterForms.DefaultReport_FadeMessage(), and IG.Forms.ReporterForms.DefaultReserveReportErrorForms().

Color IG.Forms.FadingMessage.FadeColor = Color.DarkGray
bool IG.Forms.FadingMessage.IsReady =false
bool IG.Forms.FadingMessage.IsClosable = true
protected

Returns true if control has been created and is ready to work with.

int IG.Forms.FadingMessage.MaxShown = 50
static

If false then the consform can not be closed or dispoded.

int IG.Forms.FadingMessage.NumShown = 0
staticprivate

Indicates how many messages can be shown simultaneously.

bool IG.Forms.FadingMessage.BlockMaxShown = false
static
bool IG.Forms.FadingMessage.BlockMaxShownCurrent = false

Indicates to block launching new messges when too many are processed.

bool IG.Forms.FadingMessage.Counted = false
private

Instructs just for the current index to block launching the messge when too many are processed.

System.Windows.Forms.Timer IG.Forms.FadingMessage.timer1
private
Button IG.Forms.FadingMessage.btnCancel
private
Label IG.Forms.FadingMessage.lblStatus
private
Panel IG.Forms.FadingMessage.BodyPnl
private
Label IG.Forms.FadingMessage.lblMEssage
private
Label IG.Forms.FadingMessage.lblTitle
private
Panel IG.Forms.FadingMessage.PnlStatus
private
Label IG.Forms.FadingMessage.labelBottom
private
IContainer IG.Forms.FadingMessage.components
private
int IG.Forms.FadingMessage.m_PrevX
private
int IG.Forms.FadingMessage.m_PrevY
private
int IG.Forms.FadingMessage.vShowTime = defaultShowtime
private
double IG.Forms.FadingMessage.vFadingTimePortion = defaultFadingTimePortion
private
Thread IG.Forms.FadingMessage.formthread = null
private
int IG.Forms.FadingMessage.mintickinterval = 40
private
int IG.Forms.FadingMessage.maxticks = 50
private
int IG.Forms.FadingMessage.numticks = 0
private
int IG.Forms.FadingMessage.totalticks = 20
private
int IG.Forms.FadingMessage.firsttick = 1000
private
int IG.Forms.FadingMessage.tickinterval = 100
private
double IG.Forms.FadingMessage.fadingfactor = 0
private

Property Documentation

int IG.Forms.FadingMessage.DefaultShowTime
staticgetset
double IG.Forms.FadingMessage.DefaultFadingTimePortion
staticgetset
double IG.Forms.FadingMessage.FadingTimePortion
getset

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