Beispiel #1
0
        private void SelectedProfileDeleted(object sender, EventArgs e)
        {
            ProfilesService.DeleteSelected();
            ProfilesService.Save();

            if (!Profiles.Any())
            {
                Presenter.CreateDummyProfile();
            }

            _view.LoadProfilesDropdown(Profiles, SelectedProfile?.ProfileName);
        }
Beispiel #2
0
        private void ProfileAdded(object sender, EventArgs <IProfileUserControl> e)
        {
            if (Presenter.Profiles.Count() == 1 && Presenter.Profiles.First() == Settings.ProfileNotCreated)
            {
                ProfilesService.DeleteSelected();
            }

            ProfilesService.Add(e.Value);
            ProfilesService.SelectProfile(e.Value.ProfileName);
            ProfilesService.Save();

            _view.LoadProfilesDropdown(Presenter.Profiles, Presenter.SelectedProfile.ProfileName);
        }