public FormMain() { InitializeComponent(); using (FormUserSelection formUserSelection = new FormUserSelection()) { formUserSelection.ShowDialog(this); if (formUserSelection.DialogResult == DialogResult.OK) { this.userProfiles = formUserSelection.userProfiles; this.currentUser = formUserSelection.selectedUser; this.selectedUser = true; this.dataManager = new DataManager(currentUser); this.entityManager = new EntityManager(currentUser); this.currentUser.applicationSettingsField = dataManager.ReadUserSettingsFile(this.currentUser); if (this.currentUser.applicationSettingsField.DefaultsRestored) { dataManager.SaveUserSettings(); this.currentUser.applicationSettingsField.DefaultsRestored = false; } } } }
public FormDownload(HMEntities.UserProfiles.User currentUser) { InitializeComponent(); this.currentUser = currentUser; this.downloadManager = new DownloadManager(currentUser); this.entityManager = new EntityManager(currentUser); this.dataManager = new DataManager(currentUser); downloadManager.ChppDownloadProgressChanged += new ChppDownloadProgressChangedEventHandler(OnChppDownloadProgressChanged); }
public PlayerList(User user) { InitializeComponent(); this.user = user; if (user != null) { this.entityManager = new EntityManager(user); this.dataManager = new DataManager(user); this.entityInterface = new Entities.EntityInterface(user); this.players = entityManager.GetPlayersDetails(); } }