• Giriş

Gorsel Programlama

  • AnaSayfa
  • Hakkımızda
  • TOP-10 Proje
  • Download
  • Özel Ders
  • Reklam Verin
  • Destek
  • İletişim
RSS feed
  • Youdao
  • Xian Guo
  • Zhua Xia
  • Google
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha
© 2009-2023 Gorsel Programlama

Sesli Alarm Programı — Csharp

Sesli Alarm Programı — Csharp

Soru :

Textbox’a girilen saate göre zamanı gelince müzik çalan ve girilen saate göre bilgisayarı kapatan programın csharp windows forms application kodlarını yazınız.

 

sesli_alarm

 


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 ÖdevAlarm
{
 public partial class Form1 : Form
 {
 public Form1()
 {
 InitializeComponent();
 }

 int a = 10;
 int count = 0;

 private void Form1_Load(object sender, EventArgs e)
 {
 label3.Text = DateTime.Now.ToLongTimeString();
 timer1.Enabled = true;//www.gorselprogramlama.com
 }

private void button1_Click(object sender, EventArgs e)
 {
 try
 {
 DateTime AlarmZamani = Convert.ToDateTime(textBox1.Text);

}
 catch (Exception)
 {
 MessageBox.Show("Lütfen Geçerli bir zaman giriniz!!!");
 textBox1.Focus();
 textBox1.SelectAll();
 return;
 }
 }

private void timer1_Tick(object sender, EventArgs e)
 {
 label3.Text = DateTime.Now.ToLongTimeString();
 if (label3.Text == textBox1.Text)
 {
 axWindowsMediaPlayer1.URL = Application.StartupPath + @"\Amon Amarth - Death In Fire.mp3";
 timer1.Enabled = true;//www.gorselprogramlama.com
 }
 }

private void button3_Click(object sender, EventArgs e)
 {
 timer3.Enabled = false;
 axWindowsMediaPlayer1.Ctlcontrols.stop();
 timer2.Enabled = true;

 }

private void timer2_Tick(object sender, EventArgs e)
 {
 if (label3.Text == textBox2.Text.ToString())
 {
 timer2.Enabled = false;//www.gorselprogramlama.com
 System.Diagnostics.Process.Start("shutdown", "-f -s");
 }
 }

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

private void button2_Click(object sender, EventArgs e)
 {
 a =10;
 timer3.Enabled = true;
 axWindowsMediaPlayer1.Ctlcontrols.stop();//www.gorselprogramlama.com
 label2.Text = a.ToString() + " Saniye kaldı";
 }

 private void timer3_Tick(object sender, EventArgs e)
 {
 while (a==0)
 {
 axWindowsMediaPlayer1.Ctlcontrols.play();
 timer1.Enabled = true;
 timer3.Enabled = false;
 label2.Text = "Kalkma Zamanı Geldi!\n" + count.ToString() +
 ". erteleme zamanı";
 return;
 }
 a--;
 label2.Text = a.ToString() + " Saniye kaldı";//www.gorselprogramlama.com
 }

private void textBox1_TextChanged(object sender, EventArgs e)
 {
 if (textBox1.Text.Length == 2)
 {
 textBox1.Text += ":";
 textBox1.SelectionStart = 3;

}
 if (textBox1.Text.Length == 5)
 {
 textBox1.Text += ":";
 textBox1.SelectionStart = 6;
 }
 if (textBox1.Text.Length == 8)
 {
 button1.Focus();
 }
 }

private void textBox2_TextChanged(object sender, EventArgs e)
 {
 if (textBox2.Text.Length == 2)
 {
 textBox2.Text += ":";
 textBox2.SelectionStart = 3;

}
 if (textBox2.Text.Length == 5)
 {
 textBox2.Text += ":";
 textBox2.SelectionStart = 6;
 }
 if (textBox2.Text.Length == 8)
 {
 button3.Focus();//www.gorselprogramlama.com
 }
 }

private void label2_Click(object sender, EventArgs e)
 {

}

 }
}


sesli_alarm2

Projeyi İNDİR

Paylaş :
Tweet
Yorum Yazın | Geri
30 Ekim Cuma,2015 Tarihinde Yayınlanmıştır. Bulunduğu Kategori : C#
Etiket: bilgisayar açma ve kapatma programı csharp, c örnekleri, csharp örnekleri, Forms örnekleri, Sesli Alarm Programı csharp, windows forms application
« Basit Taş-Kağıt-Makas Oyunu — Csharp Cd-Rom Aç ve Kapat Programı –Csharp »
Henüz Yorum Yok.

Yorum Yazın ...

Cevabı İptal
XHTML: Bu Etiketleri Kullanabilirsiniz : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
RSS Bu Yazıya Yapılan Yorumlar


Site içi Arama

Takip et: @GorselProgram







Böyle bir web sayfam olsun diyorsanız iletişim bölümünden veya gorselprogram@gmail.com mail adresinden bize ulaşabilirsiniz.

Son Yazılar

  • 2022-2023 öğretim yılı bilgisayar tasarım uygulamaları dersi 1.dönem 2.sınav (uygulama) sınav soruları ve cevap anahtarı
  • İdeal Kilo Hesaplama C# Csharp
  • Kullanıcı adı ve şifre bilgileri ile gizli bilgiyi gösteren program Csharp C#
  • ComboBox nesnesi içinden seçilen bir harfin sesli harf mi, sessiz harf mi olduğunu bulan program Csharp C#
  • ComboBox nesnesi içinden seçilen bir harfin, alfabenin kaçıncı harfi olduğunu bulan programı switch-case kullanarak Csharp C#

Etiket Bulutu

.NET Application basit C# C#.NET application C#.NET codes C#.NET examples C#.NET lessons C#.NET practice C#.net örnekleri c# console dersleri c# console örnekleri C# ders c# dersleri c# örnek c# örnekleri C.net dersleri c dersleri code console console örnekleri Csharp csharp dersleri csharp net csharp örnekleri c örnekleri download Flash örnekleri forms Forms örnekleri full indir kod kodlar nesne tabanlı programlama OleDbConnection OleDbDataAdapter tam sürüm uygulama vb net win windows windows forms application örnek ücretsiz

Kategoriler

  • Access (59)
  • Akış Diyagramı Flowchart (69)
  • Android Eğitimleri (2)
  • Asp Net (47)
  • C# (834)
  • C# Console (222)
  • Css (19)
  • Dersler (191)
  • Dökümanlar (21)
  • Dreamweaver (12)
  • Excel (8)
  • Fireworks (28)
  • Flash (77)
  • Görsel Programlama (421)
  • GorselProgramlama.Com (8)
  • Html (35)
  • Pascal (2)
  • Photoshop (5)
  • PHP (2)
  • Planlar (114)
  • Programlama Tanım (4)
  • Sınavlar (142)
  • Sql (10)
  • VB 6.0 (45)
  • VB.NET (219)
  • Videolar (65)
  • Word (7)

Arşiv

Bağlantılar

  • Html Dersleri
  • Muslu.NET
  • Programlama Dersleri

Kimler Sitede ?


    Computers Blogs Top programming blogs

   sayaç Powered by WordPress | Theme by NeoEase | Valid XHTML 1.1 and CSS 3 Yukarı