// PC Kapama | www.aliakyildirim.com | Ali AKYILDIRIM
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
// PC Kapama | www.aliakyildirim.com | Ali AKYILDIRIM
namespace ShutDownThePC
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        // PC Kapama | www.aliakyildirim.com | Ali AKYILDIRIM
        bool islemSecildiMi = false;
        private void button1_Click(object sender, EventArgs e)
        {
            if (dupSaniyeler.Text == "")
            {
                MessageBox.Show("Lütfen Önce Bir Deger Girin..!");
            }
            int sure;
            sure = Convert.ToInt32(dupSaniyeler.SelectedIndex);
            System.Diagnostics.Process.Start("shutdown", "-f -s -t " + sure.ToString());
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            for (int i = 0; i 
            {
                if (islemSecildiMi)
                {
                    button1.Enabled = true;
                    dupSaniyeler.Items.Add(i + " Saniye Sonra Kapan..!");
                }
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("shutdown", "-a");
        }
        private void button3_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("shutdown", "-f -s -t 300");
        }
        private void button4_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("shutdown", "-a");
        }
    }
}
// PC Kapama | www.aliakyildirim.com | Ali AKYILDIRIM