public LoginManyForm() { InitializeComponent(); ReadWriteFiles.ReadAccountFile(Model.emailAccountFile); UpdateUserName("svp" + --Model.Count); RandomizeGroupBox(); }
/** * Default constructor * It will intialize the listBox and add the list to this box. * Used for Part 2 */ public LoginForm() { InitializeComponent(); this.listUserBox.SelectionMode = SelectionMode.One; ReadWriteFiles.ReadAccountFile(pathFileToRead); AddToListBox(); }
//Default constructor for part 2 public GenerateForm() { InitializeComponent(); InitializeToolTip(); //Read from the account file and save all available accounts to Data/Model ReadWriteFiles.ReadAccountFile(pathFileToSave); UpdateUserName("svp" + Model.Count); UpdatePassword(String.Empty); }
public GenerateManyForm() { InitializeComponent(); ReadWriteFiles.ReadAccountFile(Model.emailAccountFile); UpdateUserName("svp" + Model.Count); //Only enable the first button to force user to create all 3 password in ordered this.createEmailPassBtn.Enabled = true; this.createShopPassBtn.Enabled = false; this.createBankPassBtn.Enabled = false; }
/** * Constructor * Remove the list box in GUI, add user and status lables * Used for Part 3 */ public LoginForm(LoginManyForm _form, string userName, string WhatPurpose, string ReadThisFile, int _attempt = 0) { InitializeComponent(); //Read the path file and save the data to Data/Model this.pathFileToRead = ReadThisFile; ReadWriteFiles.ReadAccountFile(pathFileToRead); this.titleLb.Text = "LOGIN FORM for " + WhatPurpose; this.userNameTitleLb.Text = "Username: "******"Microsoft Sans Serif", 8.25f), Text = userName, AutoSize = true, Location = new Point(70, 39), ForeColor = Color.NavajoWhite, BackColor = Color.Transparent, }; this.user = userName; this.userLb.Show(); this.Controls.Add(this.userLb); //Initialize status label that displays username and add it to Controls this.statusLb = new Label { Font = new Font("Microsoft Sans Serif", 10f), Text = "(" + attempt + " attempts)", AutoSize = true, Location = new Point(12, 72), ForeColor = Color.NavajoWhite, BackColor = Color.Transparent, }; this.statusLb.Show(); this.Controls.Add(this.statusLb); //Logging Logger.Log(whatPurpose, 2); }