-4
Hello I have this code and I’d like to do a boot to add a minute to the time that’s running.
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 WindowsFormsApp2
{
public partial class Form1 : Form
{
private int quick = 1800;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
timer1 = new System.Windows.Forms.Timer();
timer1.Interval = 1800;
timer1.Tick += new EventHandler(timer1_Tick);
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
quick--;
label1.Text = quick / 60 + " : " + ((quick % 60) >= 10 ? (quick % 60).ToString() : "0" + (quick % 60));
}
private void button2_Click(object sender, EventArgs e)
{
timer1.Stop();
}
}
}
And what’s the problem?
– Leandro Angelo
Try to be more direct in your question, it is difficult to know how to help with very broad questions. If you have tried to do and have not succeeded there must be some more specific doubt or error that you do not know how to solve.
– evandrobm
@Cesargoulart managed to solve his problem?
– Leandro Angelo
I wanted to put a boot to add a minute to the time, what code do I put in the boot to work? obg
– Cesar Goulart