Example #1
0
        public string this[string property]
        {
            get
            {
                string message = null;
                switch (property)
                {
                case "info":
                    if (info == null || info.Length == 0 || V4Item.Contains(info))
                    {
                        message = "Main Collection contains element with the same information";
                    }
                    break;

                case "num":
                    if (num < 1 || num > 5)
                    {
                        message = "Number of elements should be >=1 and <=5";
                    }
                    break;

                case "minValue":
                case "maxValue":
                    if (maxValue <= minValue)
                    {
                        message = "maxValue should be greater than minValue";
                    }
                    break;

                default:
                    break;
                }
                return(message);
            }
        }
Example #2
0
        public void AddCustom()
        {
            float            freq = 2;
            V4DataCollection item = new V4DataCollection(info, freq);

            item.InitRandom(num, 5, 5, minValue, maxValue);
            V4Item.Add(item);
            OnPropertyChanged("info");
        }