-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntranceWindow.cs
61 lines (51 loc) · 1.86 KB
/
EntranceWindow.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
using System;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
namespace Приложение_для_деканата_v1
{
internal partial class EntranceWindow : Form, ConnectionInterface
{
public EntranceWindow()
{
InitializeComponent();
}
public PGSQL pGSQL { get; private set; }
public string Server => "localhost";
public int Port => 5432;
public string DataBase => "NewDecan";
public string UserName => username;
private string username;
public string Password => password;
private string password;
//private PGSQL
private void EnterButton_Click(object sender, EventArgs e)
{
if (LoginBox.Text == "" || PasswordBox.Text == "")
{
MessageBox.Show("Незаполнено поле логина или пароля!");
return;
}
username=LoginBox.Text;
password=PasswordBox.Text;
pGSQL = new PGSQL(this);
if (!pGSQL.WorkCheck) return;
//var data = pGSQL.SelectDB("SELECT * FROM information_schema.table_privileges WHERE grantee = CURRENT_USER;");
//this.Hide();
//new GeneralForm(pGSQL).ShowDialog();
this.DialogResult = DialogResult.OK;
this.Close();
this.Dispose();
//GC.Collect();//Работает, всё передается
//GC.WaitForPendingFinalizers();
}
private void EntranceWindow_Resize(object sender, EventArgs e)
{
}
private void checkBoxPasswordVision_CheckedChanged(object sender, EventArgs e)
{
if (checkBoxPasswordVision.Checked) PasswordBox.PasswordChar = '\0';
else PasswordBox.PasswordChar = '*';
}
}
}