C# Form Projeleri 81 – Akrep Ve Yelkovan Arasındaki Açı Uygulaması v1.0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
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 Kod_H_Akrep_ile_Yelkovan_Arasındaki_Açı { public partial class Form1 : Form { #region Değişkenler int Saat, Dakika; double KAci, BAci; #endregion public Form1() { InitializeComponent(); } private void PicKapat_Click(object sender, EventArgs e) { this.Close(); } private void PicSimge_Click(object sender, EventArgs e) { this.WindowState = FormWindowState.Minimized; } private void Onay_Click(object sender, EventArgs e) { string[] Zaman = maskedTextBox1.Text.Split(':'); Saat = Convert.ToInt16(Zaman[0]) % 12; Dakika = Convert.ToInt16(Zaman[1]); KAci = Math.Abs((Saat * 30) - (Dakika * 6)); BAci = 360 - KAci; if (BAci > KAci) { TxtKaci.Text = KAci.ToString(); TxtBaci.Text = BAci.ToString(); } else { TxtKaci.Text = BAci.ToString(); TxtBaci.Text = KAci.ToString(); } GAcı.Visible = true; } } } |