Exemplo n.º 1
0
 private void AddElemFile_btn_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog dialog = new Microsoft.Win32.OpenFileDialog();
     if ((bool)dialog.ShowDialog())
     {
         mainCollection.AddElementFromFile(dialog.FileName);
     }
     MessageError();
 }
Exemplo n.º 2
0
 private void AddElemFile_btn_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
     dlg.Multiselect = false;
     dlg.Filter      = "TXTFiles|*.txt";
     if ((bool)dlg.ShowDialog())
     {
         mainCollection.AddElementFromFile(dlg.FileName);
     }
     MessageError();
 }