示例#1
0
 private void button1_Click1(object sender, RoutedEventArgs e)
 {
     if (FileApi.Clear(FileType.BookMark) != true)
     {
         ShowFileError();
     }
     else
     {
         History his = new History( );
         his.Show( );
         this.Close( );
     }
 }
示例#2
0
 private void HistoryClear(object sender, RoutedEventArgs e)
 {
     if (FileApi.Clear(FileType.History) != true)
     {
         ShowFileError();
     }
     else
     {
         History his = new History( );
         his.Show( );
         this.Close( );
     }
 }
示例#3
0
        private void HistoryDelete(object sender, RoutedEventArgs e)
        {
            List <CheckBox> lc = new List <CheckBox>( );

            FileApi.Clear(FileType.History);
            foreach (CheckBox cb in listBox.Items)
            {
                if (cb.IsChecked != true)
                {
                    FileApi.Write((string)cb.Content, FileType.History);
                    lc.Add(cb);
                }
            }
            listBox.ItemsSource = lc;
        }