LifeForm.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. namespace DayOf1440.UI
  11. {
  12. public partial class LifeForm : BaseForm
  13. {
  14. public LifeForm()
  15. {
  16. InitializeComponent();
  17. }
  18. private void panel1_DoubleClick(object sender, EventArgs e)
  19. {
  20. Application.Exit();
  21. }
  22. private void panel3_DoubleClick(object sender, EventArgs e)
  23. {
  24. Application.Exit();
  25. }
  26. private void panel2_DoubleClick(object sender, EventArgs e)
  27. {
  28. Application.Exit();
  29. }
  30. private void tsm_home_Click(object sender, EventArgs e)
  31. {
  32. Go(typeof(MainForm));
  33. }
  34. private void panel1_Paint(object sender, PaintEventArgs e)
  35. {
  36. }
  37. private void LifeForm_Load(object sender, EventArgs e)
  38. {
  39. }
  40. private void timer1_Tick(object sender, EventArgs e)
  41. {
  42. int tian = (int)((DateTime.Now.Subtract(DateTime.Today).TotalMinutes / 14.4));
  43. progressBar1.Value = tian;//天
  44. label7.Text = tian.ToString() +"%";
  45. //int zhou = (int)(DateTime.Today.);
  46. progressBar2.Value = 50;//周
  47. label8.Text = tian.ToString() + "%";
  48. progressBar3.Value = 50;//月
  49. label9.Text = tian.ToString() + "%";
  50. progressBar4.Value = 50;//年
  51. label10.Text = tian.ToString() + "%";
  52. progressBar4.Value = 50;//生
  53. label11.Text = tian.ToString() + "%";
  54. }
  55. }
  56. }