Exemple #1
0
        /// <summary>
        /// Change element in matrix
        /// </summary>
        /// <param name="row"></param>
        /// <param name="column"></param>
        /// <param name="element"></param>
        public void ChangeElement(int row, int column, T element)
        {
            MatrixEventArgs changeElement = new MatrixEventArgs(row, column);

            this[row, column] = element;
            OnChangeMatrix(changeElement);
        }
 /// <summary>
 /// Method starts after event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected override void Info(object sender, MatrixEventArgs e) => Console.WriteLine($"Square matrix[{e.Rows},{e.Columns}] is changed !");
Exemple #3
0
 /// <summary>
 /// Method starts event
 /// </summary>
 /// <param name="e"></param>
 private void OnChangeMatrix(MatrixEventArgs e) => changeMatrix?.Invoke(this, e);
Exemple #4
0
 /// <summary>
 /// Method starting after event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected abstract void Info(object sender, MatrixEventArgs e);