Esempio n. 1
0
        public static string GetItemsText(this ListBox listBox)
        {
            if (listBox.HasItems())
            {
                return(string.Join(", ", listBox.AsEnumerable()));
            }

            return(string.Empty);
        }
        private void ShowError()
        {
            ErrorLabel.enabled = true;
            var plugins = PluginsListBox.AsEnumerable()
                          .OfType <PluginListBoxItem>()
                          .Where(lbi => lbi.State)
                          .Where(lbi => !lbi.Plugin.Settings.Validate())
                          .Select(lbi => lbi.Plugin.DisplayName);

            ErrorLabel.SetLocalizedText("Wrong settings for plugins", string.Join(", ", plugins));
        }