Example #1
0
        /// <summary>
        /// method : lstCalculationLines_SelectedValueChanged
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void lstCalculationLines_SelectedValueChanged(object sender, EventArgs e)
        {
            var calcLine = calculation.Find(lstCalculationLines.SelectedIndex);

            if (calcLine.Op != Operator.subtotal && calcLine.Op != Operator.total)
            {
                txtReplacementValue.Text = lstCalculationLines.SelectedItem.ToString().Replace(" ", "");
            }
            else if (calcLine.Op == Operator.subtotal)
            {
                txtReplacementValue.Text = "#";
            }
            else if (calcLine.Op == Operator.total)
            {
                txtReplacementValue.Text = "=";
            }
        }