| | |
| | | this.btnImport.IsEnabled = false; |
| | | lvView.DataContext = viewDatas; |
| | | lvView.SetBinding(ListView.ItemsSourceProperty, new Binding()); |
| | | } |
| | | |
| | | String file = "E:\\data\\mpt\\A4mpt20131125.mpt"; |
| | | string md5 = MD5Helper.getMD5Hash(file); |
| | | } |
| | | |
| | | // 登录 |
| | | private void Login_MouseLeftButtonDown(object sender, RoutedEventArgs e) |
| | |
| | | // 导入 |
| | | private void Import_MouseLeftButtonDown(object sender, RoutedEventArgs e) |
| | | { |
| | | if (string.IsNullOrEmpty(SourcePath) || !Directory.Exists(SourcePath)) |
| | | { |
| | | MessageBox.Show("请选择数据目录!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(TargetPath) || !Directory.Exists(TargetPath)) |
| | | { |
| | | MessageBox.Show("请选择入库目录!"); |
| | | return; |
| | | } |
| | | string[] files = Directory.GetFiles(SourcePath); |
| | | if (null == files || files.Length == 0) |
| | | { |
| | | MessageBox.Show("数据目录下没有文件!"); |
| | | return; |
| | | } |
| | | |
| | | viewDatas.Clear(); |
| | | |
| | | Dispatcher.Invoke(new Action(delegate |