-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrmAbout.cs
69 lines (60 loc) · 1.67 KB
/
FrmAbout.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Ground_Floor
{
public partial class FrmAbout : Form
{
private const string EXIT_PASSWORD = "2844";
public FrmAbout()
{
InitializeComponent();
}
private void btnExit_Click(object sender, EventArgs e)
{
inputPanel1.Enabled = false;
string sPassword = txtPassword.Text;
if (sPassword == EXIT_PASSWORD)
{
Application.Exit();
}
else
{
MessageBox.Show("Wrong password, please try again!");
}
}
private void txtPassword_GotFocus(object sender, EventArgs e)
{
inputPanel1.Enabled = true;
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnExtend_Click(object sender, EventArgs e)
{
if (btnExtend.Tag.ToString() == "shrink")
{
pnlPrivate.Visible = true;
this.Height = 333;
btnExtend.Text = "<<";
btnExtend.Tag = "extend";
}
else
{
pnlPrivate.Visible = false;
this.Height = 286;
btnExtend.Text = ">>";
btnExtend.Tag = "shrink";
}
}
private void inputPanel1_EnabledChanged(object sender, EventArgs e)
{
inputPanel1.Enabled = false;
}
}
}