private void btnDecrease_Click(object sender, System.EventArgs e) { TimeLib.Time time1 = ReadTime1(); if (time1 == null) { return; } time1--; ShowTime1(time1.GetTime()); }
private void btnSubtract_Click(object sender, System.EventArgs e) { TimeLib.Time time1 = ReadTime1(); if (time1 == null) { return; } TimeLib.Time time2 = ReadTime2(); if (time2 == null) { return; } TimeLib.Time time3 = time2 - time1; ShowTime3(time3.GetTime()); }
private void btnMinusNumber_Click(object sender, System.EventArgs e) { TimeLib.Time time1 = ReadTime1(); if (time1 == null) { return; } int n = 0; if (!int.TryParse(txtNumber.Text, out n)) { MessageBox.Show("عدد وارد شده صحیح نیست", "خطا", MessageBoxButtons.OK, MessageBoxIcon.Error); txtNumber.Focus(); return; } time1 = time1 - n; ShowTime1(time1.GetTime()); }