When you press the Start button, the timer is changed to stop, and when you press the set button, it is set to the changed time, and when you press the reset button, it is initialized to the changed time instead of the default 10 minutes.
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 201714003
{
public partial class Form1 : Form
{
TimeSpan ts;
TimeSpan ts0 = new TimeSpan(0, 0, 0);
TimeSpan ts1 = new TimeSpan(0, 0, 1);
TimeSpan tsPreset = new TimeSpan(0, 10, 0);
bool startStopFlag = false;
public Form1()
{
InitializeComponent();
timer1.Interval = 1000;
}
private void timer1_Tick(object sender, EventArgs e)
{
}
private void btnStart_Click(object sender, EventArgs e)
{
}
private void btnReset_Click(object sender, EventArgs e)
{
}
private void btnSet_Click(object sender, EventArgs e)
{
SetTime();
}
private void SetTime()
{
TimeSpan ts;
TimeSpan ts0 = new TimeSpan(0, 0, 0);
TimeSpan ts1 = new TimeSpan(0, 0, 1);
TimeSpan tsPreset = new TimeSpan(0, 10, 0);
}
private void textBox3_TextChanged(object sender, EventArgs e)
{
if ((startStopFlag == true) && (ts == ts0))
{
}
}
}
}
What I have tried:
I went through the basic settings, but I can't feel it