Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 Vezba_07_2017
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- DateTime dt;
- dt = DateTime.Now;
- DateTime ny = new DateTime(dt.Year + 1, 1, 1);
- int brDana = (ny - dt).Days;
- textBox1.Text = String.Format("{0:F}", dt);
- textBox2.Text = String.Format("{0:D}", dt);
- textBox3.Text = String.Format("{0:d}", dt);
- textBox4.Text = String.Format("{0:g}", dt);
- textBox5.Text = String.Format("{0:T}", dt);
- textBox6.Text = String.Format("{0:t}", dt);
- textBox7.Text = brDana.ToString();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- DateTime dt;
- dt = DateTime.Now;
- DateTime ny = new DateTime(dt.Year + 1, 1, 1);
- int brDana = (ny - dt).Days;
- textBox1.Text = String.Format("{0:F}", dt);
- textBox2.Text = String.Format("{0:D}", dt);
- textBox3.Text = String.Format("{0:d}", dt);
- textBox4.Text = String.Format("{0:g}", dt);
- textBox5.Text = String.Format("{0:T}", dt);
- textBox6.Text = String.Format("{0:t}", dt);
- textBox7.Text = brDana.ToString();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- Close();
- }
- }
- }
Add Comment
Please, Sign In to add comment