Ejemplo n.º 1
0
 private void frmMessageNotify_Closed(object sender, System.EventArgs e)
 {
     if (this.Visible)
     {
         System.Threading.Interlocked.Decrement(ref s_intInstance);
         int intIndex = s_arlForms.IndexOf(this);
         s_arlForms.Remove(this);
         for (int i = intIndex; i < s_arlForms.Count; i++)
         {
             frmMessageNotify frmTemp = ((frmMessageNotify)s_arlForms[i]);
             frmTemp.Location = new Point(frmTemp.Location.X, frmTemp.Location.Y + this.Height);
         }
         ;
     }
 }
Ejemplo n.º 2
0
 private void frmMessageNotify_VisibleChanged(object sender, System.EventArgs e)
 {
     if (this.Visible)
     {
         System.Threading.Interlocked.Increment(ref s_intInstance);
         s_arlForms.Add(this);
         this.Location = new Point(System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width - this.Width,
                                   System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height - this.Height * s_intInstance);
         m_timClose.Enabled = true;
     }
     else
     {
         System.Threading.Interlocked.Decrement(ref s_intInstance);
         int intIndex = s_arlForms.IndexOf(this);
         s_arlForms.Remove(this);
         for (int i = intIndex; i < s_arlForms.Count; i++)
         {
             frmMessageNotify frmTemp = ((frmMessageNotify)s_arlForms[i]);
             frmTemp.Location = new Point(frmTemp.Location.X, frmTemp.Location.Y + this.Height);
         }
     }
 }