//****************************************************************// public IAPXPSPrintLogin() { InitializeComponent(); SubNumTextbox.Focus(); // Automatically load their login information if available GetSetting(); }
//****************************************************************// public SubmitForm(string fileToSend) { InitializeComponent(); SubNumTextbox.Focus(); // Automatically load their login information if available GetSetting(); currentFilePath = fileToSend; }
//****************************************************************// protected internal void LoginButton_Click(object sender, EventArgs e) { if (SubNumTextbox.TextLength >= 3 && UserNameTextBox.TextLength >= 2 && PasswordTextBox.TextLength >= 2) // Checks the user input to match what is expected or ask for more information { // store Textbox Data from users inside of a variable (destroyed inside of void) string subNumber = SubNumTextbox.Text; //to be stored in registry string userName = UserNameTextBox.Text; //to be stored in registry string password = PasswordTextBox.Text; //to be stored in registry //****** try { if (Properties.Settings.Default.Password != password) { string apiKey = APICalls.GetKey(subNumber); File.WriteAllText(Program.tempDirectory + "\\IAPubkey.pem", apiKey); password = Crypto.Encrypt(password); } SaveNewVariableSetting(Convert.ToInt32(subNumber), userName, password); this.DialogResult = DialogResult.OK; this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else { MessageBox.Show("All Fields Have Not Been Field Out. Please Enter Your Infomation Again"); } SubNumTextbox.Focus(); }