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;
}
}
}