-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRemind_Date.cs
36 lines (33 loc) · 1.18 KB
/
Remind_Date.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Windows.Forms;
namespace Cours_Remind_Weekened
{
public partial class Remind_Date : Form
{
public Remind_Date()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
LeftDays.Text = "";
if (Convert.ToInt32((DateThen.Value - DateToday.Value).Days) > 0)
{
LeftDays.Text = Convert.ToString((DateThen.Value - DateToday.Value).Days) + " дней";
}
else if (Convert.ToInt32((DateThen.Value - DateToday.Value).Days) == 0)
{
LeftDays.Text = "Это произойдет в течение следующих суток!";
}
else
{
MessageBox.Show("Уже произошло\n Введите даты на актуальное событие",
"Внимание",
MessageBoxButtons.OK,
MessageBoxIcon.Information,
MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly);
}
}
}
}