예제 #1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="binding"></param>
        /// <param name="r"></param>
        /// <param name="value"></param>
        private static void BindToDouble(ShapeBinding binding, Record r, ref double value)
        {
            var columns = r.Columns;
            for (int i = 0; i < columns.Length; i++)
            {
                if (columns[i].Name != binding.Path)
                    continue;

                double result;
                bool success = double.TryParse(
                    r.Values[i].Content,
                    NumberStyles.Any, CultureInfo.InvariantCulture,
                    out result);
                if (success)
                {
                    value = result;
                    break;
                }
            }
        }
예제 #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="binding"></param>
        public void Add(ShapeBinding binding)
        {
            if (binding == null)
                return;

            binding.PropertyChanged += BindingObserver;
            Verbose("Add Bnding: " + binding.Property + ", path: " + binding.Path);
        }