namespace Password_Manager { public delegate void ProfileChange(string profileName); //Fires when we want to change the CurrentProfile field of ProfileHandler based on the combobox selection public delegate string[] ProfileList(); //Fires when we need a list of Profile names, like for the combobox items public delegate void Save(); //Fire whenever we want to save the current state of profiles public delegate void NewProfile(string profileName, string profilePath); //Fires whenever a NewProfileForm has requested the creation of a new profile. This just forwards that request to ProfileHandler public abstract class PasswordManagerForm : Form { protected abstract ComboBox ProfileSelection { get; set; } protected abstract PasswordListBox ResultList { get; set; } protected abstract TextBox SearchBox { get; set; } protected abstract Button AddProfile { get; set; } protected abstract Button DeleteProfile { get; set; } protected abstract Button GeneratePassword { get; set; } public abstract event ProfileDataRequest CurrentProfilePathRequest; public abstract event ProfileDataRequest CurrentProfileNameRequest; public abstract event ProfileList CurrentProfileListRequest; public abstract event ProfileChange CurrentProfileChanged; public abstract event Save SaveRequest; public abstract event NewProfile NewProfileRequest; protected abstract void ChangeProfile(object sender, EventArgs e); public abstract void RefreshCurrentProfile(); } }