private void searchValuesComboBox_TextChanged(object sender, TextChangedEventArgs e)
 {
     valueCountTextBox.Text = "";
     try
     {
         valueCountTextBox.Text = (Ex3dCalculations.ValueCount(values, Convert.ToInt32(searchValuesComboBox.Text))).ToString();
     }
     catch
     {
     }
 }
        private void searchRangesComboBox_TextChanged(object sender, TextChangedEventArgs e)
        {
            try
            {
                int    dashIndex    = this.searchRangesComboBox.Text.IndexOf('-');
                string strSearchMin = this.searchRangesComboBox.Text.Substring(0, dashIndex).Trim();
                string strSearchMax = this.searchRangesComboBox.Text.Substring(dashIndex + 1).Trim();
                rangeCountTextBox.Text = "";


                int Min = Int32.Parse(strSearchMin);
                int Max = Int32.Parse(strSearchMax);

                rangeCountTextBox.Text = ((Ex3dCalculations.RangeCount(values, Min, Max))).ToString();
            }
            catch
            {
                rangeCountTextBox.Text = "-1";
            }
        }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     this.valuesTextBox.Text = Ex3dCalculations.ArrayToString(this.values);
 }