| | |
| | | // 登录 |
| | | private void Login_MouseLeftButtonDown(object sender, RoutedEventArgs e) |
| | | { |
| | | win = new LoginWin(); |
| | | this.Hide(); |
| | | win.Show(); |
| | | //win = new LoginWin(); |
| | | //this.Hide(); |
| | | //win.Show(); |
| | | |
| | | SetLoginInfo(); |
| | | } |
| | | |
| | | public void SetLoginInfo() |
| | | { |
| | | if (win != null) win.Close(); |
| | | this.Show(); |
| | | //if (win != null) win.Close(); |
| | | //this.Show(); |
| | | |
| | | this.tbUid.Text = Tool.UserId.ToString(); |
| | | this.tbToken.Text = Tool.Token; |
| | | //this.tbUid.Text = Tool.UserId.ToString(); |
| | | //this.tbToken.Text = Tool.Token; |
| | | |
| | | string uidStr = this.tbUid.Text.Trim(); |
| | | string didStr = this.tbDir.Text.Trim(); |
| | | |
| | | int.TryParse(uidStr, out Tool.UserId); |
| | | int.TryParse(didStr, out Tool.DirId); |
| | | |
| | | this.btnLoad.IsEnabled = true; |
| | | this.btnImport.IsEnabled = true; |
| | |
| | | MessageBox.Show("请选择入库目录!", "提示"); |
| | | return; |
| | | } |
| | | |
| | | string[] files = Directory.GetFiles(SourcePath); |
| | | if (null == files || files.Length == 0) |
| | | { |
| | |
| | | { |
| | | if (viewDatas.Count == 0) return; |
| | | |
| | | string str = this.tbStart.Text.Trim(); |
| | | int start = 1; |
| | | int.TryParse(str, out start); |
| | | |
| | | Thread thread = new Thread(new ThreadStart(() => |
| | | { |
| | | Importor.ImportFiles(viewDatas, TargetPath); |
| | | Importor.ImportFiles(viewDatas, TargetPath, start); |
| | | |
| | | lvView.Dispatcher.BeginInvoke((ThreadStart)delegate { |
| | | ICollectionView view = CollectionViewSource.GetDefaultView(viewDatas); |