Exemplo n.º 1
0
 public void OnTaskAborted(IShutdownTask task)
 {
     btnAutoShutdown.Enabled = true;
     btnShutdown.Enabled     = true;
     MessageBox.Show("Shutdown Task has been aborted", "Information", MessageBoxButtons.OK);
     this.Visible = true;
 }
Exemplo n.º 2
0
 public void OnTaskCompleted(IShutdownTask task)
 {
     btnAutoShutdown.Enabled = true;
     btnShutdown.Enabled     = true;
     this.Visible            = true;
     //MessageBox.Show("Shutdown task has completed");
     if (cbNinjaMode.Checked)
     {
         Close();
     }
 }
Exemplo n.º 3
0
        public CountDownWindow(IShutdownTask listener)
            : this()
        {
            task = listener;

            if (task == null)
            {
                throw new ArgumentNullException("No IShutdownTask Parent is Null, IShutdownTask is required for the component to function properly");
            }

            string receivedMsg = task.GetShutdownMessage();

            if (!string.IsNullOrEmpty(receivedMsg))
            {
                SetMessage(receivedMsg);
            }
            else
            {
                SetMessage(defaultMessage);
            }
        }
Exemplo n.º 4
0
 public void OnTaskStarted(IShutdownTask task)
 {
     btnShutdown.Enabled     = false;
     btnAutoShutdown.Enabled = false;
     //MessageBox.Show("Shutdown Task has been started");
 }