diff --git a/ShareX.HelpersLib/ShareX.HelpersLib.csproj b/ShareX.HelpersLib/ShareX.HelpersLib.csproj index f07b6d7ac..ee0b5b868 100644 --- a/ShareX.HelpersLib/ShareX.HelpersLib.csproj +++ b/ShareX.HelpersLib/ShareX.HelpersLib.csproj @@ -284,6 +284,7 @@ + diff --git a/ShareX.HelpersLib/UITypeEditors/StringCollectionToStringTypeConverter.cs b/ShareX.HelpersLib/UITypeEditors/StringCollectionToStringTypeConverter.cs new file mode 100644 index 000000000..4b81f0153 --- /dev/null +++ b/ShareX.HelpersLib/UITypeEditors/StringCollectionToStringTypeConverter.cs @@ -0,0 +1,49 @@ +#region License Information (GPL v3) + +/* + ShareX - A program that allows you to take screenshots and share any file type + Copyright (c) 2007-2015 ShareX Team + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Optionally you can also view the license at . +*/ + +#endregion License Information (GPL v3) + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Globalization; +using System.Linq; +using System.Text; + +namespace ShareX.HelpersLib +{ + public class StringCollectionToStringTypeConverter : TypeConverter + { + public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + { + if (destinationType == typeof(string)) + { + List list = (List)value; + return string.Join(", ", list); + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } +} \ No newline at end of file diff --git a/ShareX.IRCLib/IRCInfo.cs b/ShareX.IRCLib/IRCInfo.cs index e18c58c59..ca3c7047d 100644 --- a/ShareX.IRCLib/IRCInfo.cs +++ b/ShareX.IRCLib/IRCInfo.cs @@ -38,16 +38,16 @@ public class IRCInfo : SettingsBase [Description("IRC server port."), DefaultValue(6667)] public int Port { get; set; } = 6667; - [Description("IRC server password."), PasswordPropertyText(true)] + [Description("IRC server password. In some servers can be used to identify."), PasswordPropertyText(true)] public string Password { get; set; } [Description("Nickname.")] public string Nickname { get; set; } - [Description("Username."), DefaultValue("username")] + [Description("Username. This show up in WHOIS result."), DefaultValue("username")] public string Username { get; set; } = "username"; - [Description("Realname."), DefaultValue("realname")] + [Description("Realname. This show up in WHOUS result."), DefaultValue("realname")] public string Realname { get; set; } = "realname"; [Description("IRC invisible mode."), DefaultValue(true)] @@ -59,10 +59,10 @@ public class IRCInfo : SettingsBase [Description("Wait specific milliseconds before reconnecting."), DefaultValue(5000)] public int AutoReconnectDelay { get; set; } = 5000; - [Description("When got kicked auto rejoin channel."), DefaultValue(false)] + [Description("When got kicked from channel auto rejoin."), DefaultValue(false)] public bool AutoRejoinOnKick { get; set; } - [Description("Don't show 'Message of the day' text."), DefaultValue(true)] + [Description("Don't show 'Message of the day' texts in output."), DefaultValue(true)] public bool SuppressMOTD { get; set; } = true; [Description("When you disconnect what message gonna show to other people."), DefaultValue("Leaving")] @@ -72,7 +72,8 @@ public class IRCInfo : SettingsBase Editor("System.Windows.Forms.Design.StringCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] public List ConnectCommands { get; set; } = new List(); - [Description("When connected automatically will join these channels."), + [Description("When connected automatically join these channels."), + TypeConverter(typeof(StringCollectionToStringTypeConverter)), Editor("System.Windows.Forms.Design.StringCollectionEditor,System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))] public List AutoJoinChannels { get; set; } = new List() { "#ShareX" }; @@ -82,10 +83,10 @@ public class IRCInfo : SettingsBase [Description("Enable/Disable auto response system which using AutoResponseList."), DefaultValue(false)] public bool AutoResponse { get; set; } - [Description("After successful auto response match how much milliseconds wait for next auto response. Delay independant per message."), DefaultValue(10000)] + [Description("After successful auto response match how much milliseconds wait for next auto response. Delay independant per response."), DefaultValue(10000)] public int AutoResponseDelay { get; set; } = 10000; - [Description("When specific message written in channel automatically will response with your message.")] + [Description("When specific message written in channel automatically response with your message.")] public List AutoResponseList { get; set; } = new List(); public string GetAutoResponses()