コード例 #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is Seed seed)
            {
                return(ItemUtils.ToInfoMessage(seed));
            }
            else if (value is Box box)
            {
                return(ItemUtils.ToInfoMessage(box));
            }

            return(null);
        }
コード例 #2
0
        public static void SetSeeds(IEnumerable <Seed> seeds)
        {
            lock (_thisLock)
            {
                var sb = new StringBuilder();

                foreach (var seed in seeds)
                {
                    sb.AppendLine(AmoebaConverter.ToSeedString(seed));
                    sb.AppendLine(ItemUtils.ToInfoMessage(seed));
                    sb.AppendLine();
                }

                Clipboard.SetText(sb.ToString().TrimEnd('\r', '\n'));
            }
        }