20 Mart 2015 Cuma

C # Alarm Yapımı




KOD KISMI


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

        private void button1_Click(object sender, EventArgs e)
        {
            timer1.Start();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            label1.Text = DateTime.Now.Hour.ToString();
            label2.Text = DateTime.Now.Minute.ToString();
            label5.Text = DateTime.Now.Second.ToString();

            if (comboBox2.Text == label2.Text&&comboBox1.Text==label1.Text)
            {
                timer1.Stop();
                MessageBox.Show("uyarı zamanı");
               


            }
          
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < 24; i++)
            {
                comboBox1.Items.Add(i);
           
           
           
            }
            for (int j = 0; j < 60; j++)
            {
                comboBox2.Items.Add(j);



            }
          
        }
    }

}


ONUR TAŞKIN

Hiç yorum yok: