OnurBoyla 1
OnurBoyla
mavzermete 1
mavzermete
xranzei 1
xranzei
Manwe Work 1
Manwe Work
noisiv 1
noisiv
Hikaye Ekle

Bilgisayar Kapatma Programı

  • Konuyu başlatan Konuyu başlatan beyic_baris
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 432

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Bu derste kodlarını verdiğim programla bilgisayarınızı otomatik olarak kapatabileceksiniz.

rq2j.jpg


Kod:
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;

namespace WindowsFormsApplication32
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            if (comboBox1.Text == "10 dak")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 600");
            }
            else if (comboBox1.Text == "15 dak")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 900");
            }
            else if (comboBox1.Text == "30 dak")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 1800");
            }
            else if (comboBox1.Text == "1 saat")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 3600");
            }
            else if (comboBox1.Text == "2 saat")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 7200");
            }
            else if (comboBox1.Text == "5 saat")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 18000");
            }
            else if (comboBox1.Text == "10 saat")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 36000");
            }
            else if (comboBox1.Text == "15 saat")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 54000");
            }
            else if (comboBox1.Text == "24 saat")
            {
                System.Diagnostics.Process.Start("shutdown", "-f -s -t 86400");
            }
            
            else
            {
                MessageBox.Show("Kapanma zamanını belirleyiniz");
            }
        }

        

        private void button2_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("shutdown", "-a");
        }
    }
}

Alıntıdır.
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst