}//end button_click event private void BtnClearAll(object sender, RoutedEventArgs e) { LstRanked.Items.Clear(); TxtToRank.Clear(); LstUnique.Items.Clear(); TxtToRank.Focus(); }//end Button_ClearAll event
} //end main event private void BtnCompute_Click(object sender, RoutedEventArgs e) { ranking.NumRanked = 0; ranking.PercentRank = 0; LstUnique.Items.Clear(); ranking.ConvertArray(TxtToRank.Text); CheckRank(); TxtToRank.Focus(); }//end button_click event
public MainWindow() { InitializeComponent(); if (File.Exists(path)) { ranking.ImportFile(path); BtnCompute.IsEnabled = true; LblErrorBar.Background = Brushes.Transparent; LblErrorBar.Content = ""; } else { LblErrorBar.Background = Brushes.Red; LblErrorBar.Foreground = Brushes.White; LblErrorBar.Content = "Error: Check file not found. Open file location and attach file."; BtnCompute.IsEnabled = false; } //end if TxtToRank.Focus(); } //end main event