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 wfa0026f
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
//get current time
int hh = DateTime.Now.Hour;
int mm = DateTime.Now.Minute;
int ss = DateTime.Now.Second;
//time
string time = "";
//padding leading zero
if (hh < 10)
{
time += "0" + hh;
}
else
{
time += hh;
}
time += ":";
if (mm < 10)
{
time += "0" + mm;
}
else
{
time += mm;
}
time += ":";
if (ss < 10)
{
time += "0" + ss;
}
else
{
time += ss;
}
progressBar1.Value = ss;
trackBar1.Value = mm;
progressBar2.Value = mm;
progressBar3.Value = hh;
pictureBox1.Left = 1100 / 60 * ss;
//update label
label1.Text = time;
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void progressBar1_Click(object sender, EventArgs e)
{
}
private void process1_Exited(object sender, EventArgs e)
{
}
}
}