Je to přesně v téhle části kodu:
Kód: Vybrat vše
int minuta;
minuta = label4.Text;
Prosím kohokoliv o radu.
Kód: Vybrat vše
int minuta;
minuta = label4.Text;
Kód: Vybrat vše
int minuta = Convert.ToInt32(label4.text);
Kód: Vybrat vše
label4.text = minuta.ToString();
Kód: Vybrat vše
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace hodiny
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void maskedTextBox1_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void label3_Click(object sender, EventArgs e)
{
int minuta;
minuta = Convert.ToInt32(label4.Text);
label4.Text = ToString();
if (label4.Text == "60")
{
for (minuta = 00; minuta <= 60; minuta++)
{
label3.Text = "00";
System.Threading.Thread.Sleep(60000);
label3.Text = "0" + minuta.ToString();
if (minuta >= 10)
{
label3.Text = minuta.ToString();
}
label3.Refresh();
}
}
}
private void label4_Click(object sender, EventArgs e)
{
dalsikarta:
for (int sekunda = 00; sekunda <= 60; sekunda++)
{
label4.Text = "00";
System.Threading.Thread.Sleep(1000);
label4.Text = "0" + sekunda.ToString();
if (sekunda >= 10)
{
label4.Text = sekunda.ToString();
}
label4.Refresh();
}
goto dalsikarta;
}
}
}
Zpět na “Programování a tvorba webu”
Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 10 hostů