void TmCheckForACKTick(object sender, System.EventArgs e)
        {
            OpsMMEventLog opsEventLog = new OpsMMEventLog();

            if (opsEventLog.gotAckEvent())
            {
                setStatusMessage("Server is in maintenance mode!\nYou may close this window.", STATUS_OK);
                updateProgressBar(MM_TIMEOUT, MM_TIMEOUT, Color.Green);
                btnCancel.Text = "&Close";
                btnCancel.Focus();
                tmCheckForACK.Stop();
                btStartMaintenance.Enabled = true;
                btStopMaintenance.Enabled  = true;
            }
            else
            {
                setMMTimeout = setMMTimeout - tmCheckForACK.Interval;
                if (setMMTimeout > 60000)
                {
                    updateProgressBar(MM_TIMEOUT - setMMTimeout, MM_TIMEOUT, ATEA_GREEN);
                }
                else if (setMMTimeout > 0)
                {
                    updateProgressBar(MM_TIMEOUT - setMMTimeout, MM_TIMEOUT, Color.Gold);
                }
                else
                {
                    setStatusMessage("Timed out waiting for maintenance mode.\nPlease contact monitoring support for assistance.", STATUS_ERROR);
                    updateProgressBar(MM_TIMEOUT - setMMTimeout, MM_TIMEOUT, Color.Red);
                    tmCheckForACK.Stop();
                    setMMTimeout = MM_TIMEOUT;
                }
            }
        }
Ejemplo n.º 2
0
 private void btnMore_Click(object sender, System.EventArgs e)
 {
     if ((btnMore.Text == ">>"))
     {
         this.Height = (this.Height + 300);
         // With...
         txtMore.Location = new System.Drawing.Point(lblMoreHeading.Left, lblMoreHeading.Top + lblMoreHeading.Height + _intSpacing);
         txtMore.Height   = this.ClientSize.Height - txtMore.Top - 45;
         txtMore.Width    = this.ClientSize.Width - 2 * _intSpacing;
         txtMore.Anchor   = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom |
                            System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
         txtMore.Visible = true;
         btn3.Focus();
         btnMore.Text = "<<";
     }
     else
     {
         this.SuspendLayout();
         btnMore.Text = ">>";
         this.Height  = (btnMore.Top
                         + (btnMore.Height
                            + (_intSpacing + 45)));
         txtMore.Visible = false;
         txtMore.Anchor  = System.Windows.Forms.AnchorStyles.None;
         this.ResumeLayout();
     }
 }