Beispiel #1
0
        void Close(bool okPressed)
        {
            if (okPressed)
            {
                if (ProfileTypes.Count(p => p.IsSelected) != 1)
                {
                    _uiService.ShowErrorDialog(Strings.Get($"Please select exactly one option."), ComponentContainer.MessageBoxTitle);
                    return;
                }

                if (StringComparer.InvariantCultureIgnoreCase.Equals(ProfileTypes.Single(p => p.IsSelected).ProfileType.Name, "Open-Xchange"))
                {
                    _uiService.ShowOXInfoDialog();
                    return;
                }

                SelectedProfile = ProfileTypes.Single(p => p.IsSelected).ProfileType;
            }

            CloseRequested?.Invoke(this, new CloseEventArgs(okPressed));
        }