Пример #1
0
        /// <summary>
        /// Creates container
        /// </summary>
        /// <param name="measurements">Measurements</param>
        /// <param name="consumer">Data consumer</param>
        /// <returns>The container</returns>
        public static UserControlMeasureContainer Create(IMeasurements measurements, IDataConsumer consumer)
        {
            if (measurements.Count == 0)
            {
                return(null);
            }
            UserControlMeasureContainer uc = new UserControlMeasureContainer();

            uc.Set(consumer, measurements);
            for (int i = 0; i < measurements.Count; i++)
            {
                uc.Add();
            }
            return(uc);
        }
Пример #2
0
        internal void SetAll(IDataConsumer consumer, IMeasurements measurements)
        {
            if (measurements.Count == 0)
            {
                panelTop.Controls.Clear();
                return;
            }
            UserControlMeasureContainer uc = this;

            uc.Set(consumer, measurements);
            for (int i = 0; i < measurements.Count; i++)
            {
                uc.Add();
                //uc.Measure = measurements[i];
            }
        }