Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace Project3_CP
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
- {
- MessageBox.Show("Cory Pace\ntime calculator\nversion1");
- }
- private void exitToolStripMenuItem1_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- int StartTime, EndTime, Hundred, Minutes;
- double Delay = (1.25);
- Minutes = 60;
- Hundred = 100;
- StartTime = int.Parse(textBox1.Text);
- EndTime = int.Parse(textBox2.Text);
- int StartMins = ((StartTime / Hundred) * Minutes) + (StartTime % Hundred);
- int EndMins = ((EndTime / Hundred) * Minutes) + (EndTime % Hundred);
- double TotalMins = EndMins - StartMins;
- TotalMins = TotalMins * Delay;
- double arrivaltime = StartTime + ((TotalMins / Minutes) * Hundred) + (TotalMins % Minutes);
- string out1 = $"{arrivaltime}";
- textBox3.Text = out1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement