Advertisement
Guest User

Untitled

a guest
Feb 6th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace Project3_CP
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
  21. {
  22. MessageBox.Show("Cory Pace\ntime calculator\nversion1");
  23. }
  24.  
  25. private void exitToolStripMenuItem1_Click(object sender, EventArgs e)
  26. {
  27. this.Close();
  28. }
  29.  
  30. private void button1_Click(object sender, EventArgs e)
  31. {
  32. int StartTime, EndTime, Hundred, Minutes;
  33. double Delay = (1.25);
  34. Minutes = 60;
  35. Hundred = 100;
  36. StartTime = int.Parse(textBox1.Text);
  37. EndTime = int.Parse(textBox2.Text);
  38. int StartMins = ((StartTime / Hundred) * Minutes) + (StartTime % Hundred);
  39. int EndMins = ((EndTime / Hundred) * Minutes) + (EndTime % Hundred);
  40. double TotalMins = EndMins - StartMins;
  41. TotalMins = TotalMins * Delay;
  42. double arrivaltime = StartTime + ((TotalMins / Minutes) * Hundred) + (TotalMins % Minutes);
  43. string out1 = $"{arrivaltime}";
  44. textBox3.Text = out1;
  45.  
  46.  
  47. }
  48. }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement