Exemplo n.º 1
0
        /// <summary>
        /// Indexatot
        /// </summary>
        /// <param name="indexRow"> Index of row </param>
        /// <param name="indexColumn"> Index of column </param>
        /// <returns> Element by [indexRow, indexColumn] </returns>
        public virtual T this[int indexRow, int indexColumn]
        {
            get
            {
                ValidateIndexes(indexRow, indexColumn);

                return(GetValue(indexRow, indexColumn));
            }

            set
            {
                ValidateIndexes(indexRow, indexColumn);

                var elementArg = new ElementValueArg <T>(this[indexRow, indexColumn], value, indexRow, indexColumn);
                OnElementValueChange(this, elementArg);

                SetValue(value, indexRow, indexColumn);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Inform listeners about changing of element
 /// </summary>
 /// <param name="sender"> Creator of event </param>
 /// <param name="eventArgs"> Detail information about event </param>
 protected virtual void OnElementValueChange(object sender, ElementValueArg <T> eventArgs)
 {
     ElementValueChanged?.Invoke(this, eventArgs);
 }