예제 #1
0
        public bool Equals(object x)
        {
            skillssave temp = (skillssave)x;

            if (name == temp.name)
            {
                return(true);
            }
            return(false);
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BtnSkills_Click(object sender, RoutedEventArgs e)
 {
     if (!TbSkills.Text.Equals(""))
     {
         skillssave temp = new skillssave(CbSkills.Text, Convert.ToInt32(TbSkills.Text));
         bool       test = LbSkills.Items.Contains(temp);
         if (!LbSkills.Items.Contains(temp))
         {
             LbSkills.Items.Add(temp);
         }
         SortList(LbSkills, false);
     }
 }
 private void BtnSaving_Click(object sender, RoutedEventArgs e)
 {
     if (!TbSaving.Text.Equals(""))
     {
         //List<skillssave> tete = new List<skillssave>();
         skillssave temp = new skillssave(CbSaving.Text, Convert.ToInt32(TbSaving.Text));
         bool       test = LbSaving.Items.Contains(temp);
         if (!LbSaving.Items.Contains(temp))
         {
             LbSaving.Items.Add(temp);
             //LbSaving.ItemsSource = tete;
         }
         SortList(LbSaving, true);
     }
 }