Exemplo n.º 1
0
 private void ItemRelevantDataClick(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.OpenFileDialog aDlg = new System.Windows.Forms.OpenFileDialog();
     aDlg.CheckFileExists  = true;
     aDlg.FileName         = "NCC_Item.dat";
     aDlg.Filter           = "Dat files (*.dat)|*.dat|CSV files (*.csv)|*.csv|All files (*.*)|*.*";
     aDlg.DefaultExt       = ".dat";
     aDlg.InitialDirectory = NC.App.AppContext.FileInput;
     aDlg.Title            = "Select an Item Relevant Data file";
     aDlg.Multiselect      = false;
     aDlg.RestoreDirectory = true;
     System.Windows.Forms.DialogResult qw = aDlg.ShowDialog();
     if (qw == System.Windows.Forms.DialogResult.OK)
     {
         NCCFile.ItemFile onefile = new NCCFile.ItemFile();
         string           path    = Path.GetFullPath(aDlg.FileName);
         onefile.Process(path);
         // todo: now do something with the results
     }
 }
Exemplo n.º 2
0
 private void ItemRelevantDataClick(object sender, RoutedEventArgs e)
 {
     System.Windows.Forms.OpenFileDialog aDlg =  new System.Windows.Forms.OpenFileDialog();
     aDlg.CheckFileExists = true;
     aDlg.FileName = "NCC_Item.dat";
     aDlg.Filter = "Dat files (*.dat)|*.dat|CSV files (*.csv)|*.csv|All files (*.*)|*.*";
     aDlg.DefaultExt = ".dat";
     aDlg.InitialDirectory = NC.App.AppContext.FileInput;
     aDlg.Title = "Select an Item Relevant Data file";
     aDlg.Multiselect = false;
     aDlg.RestoreDirectory = true;
     System.Windows.Forms.DialogResult qw = aDlg.ShowDialog();
     if (qw == System.Windows.Forms.DialogResult.OK)
     {
         NCCFile.ItemFile onefile = new NCCFile.ItemFile();
         string path = Path.GetFullPath(aDlg.FileName);
         onefile.Process(path);
         // todo: now do something with the results
     }
 }