using System;
using System.Windows.Forms;

using CommonLib.Windows.Forms;

namespace All_Purpose_Auto_Setup
{
   public partial class frmUserInput : ChildForm
   {
      private frmMain frmParent = null;

      public frmUserInput(frmMain d_parentForm)
      {
         InitializeComponent();

         frmParent = d_parentForm;
      }

      public string getUserPassword()
      {
         return txtBoxPassword.Text;
      }

      public void clearUserPassword()
      {
         txtBoxPassword.Clear();
      }

      public void richTxtBoxAppendText(string description)
      {
         rTxtBoxDescription.AppendText(description);
      }

      public void richTxtBoxOverwriteText(string description)
      {
         rTxtBoxDescription.Clear();
         rTxtBoxDescription.AppendText("ddd");
         rTxtBoxDescription.Clear();
         rTxtBoxDescription.AppendText(description);
      }

      private void btnOK_Click(object sender, EventArgs e)
      {
         txtBoxPassword.Focus();
         this.Hide();
      }

      private void txtBoxPassword_KeyDown(object sender, KeyEventArgs e)
      {
         if (e.KeyCode == Keys.Enter)
         {
            btnOK_Click(this, new EventArgs());
         }
      }

   }
}
