[go: up one dir, main page]

Menu

[r1]: / PasswordForm.cs  Maximize  Restore  History

Download this file

87 lines (77 with data), 2.3 kB

 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using System.Windows.Forms;
namespace RDPManager
{
public partial class PasswordForm : Form
{
private string userName;
private string password;
private string domain;
private string machine;
bool disMachineCtrl = false;
public bool DisMachineCtrl
{
get { return disMachineCtrl; }
set { disMachineCtrl = value; }
}
public string UserName
{
get { return userName; }
set { userName = value; }
}
public string Password
{
get { return password; }
set { password = value; }
}
public string Domain
{
get { return domain; }
set { domain = value; }
}
public string Machine
{
get { return machine; }
set { machine = value; }
}
public PasswordForm()
{
InitializeComponent();
}
private void btnOK_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
userName = txtUsername.Text;
password = txtPass.Text;
domain = txtDomain.Text;
machine = txtMachine.Text;
Close();
}
private void btnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
userName = "";
password = "";
domain = "";
machine = "";
Close();
}
private void PasswordForm_Shown(object sender, EventArgs e)
{
txtUsername.Text = userName;
txtPass.Text = password;
txtDomain.Text = domain;
txtMachine.Text = machine;
if (disMachineCtrl) txtMachine.Enabled = false;
if (machine == "Default")
txtMachine.Enabled = false;
}
}
}