管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-02-21 e608048cf0ca1456e8c21ee54a97c7550eb7c3db
DataLoader/MainWindow.xaml.cs
@@ -22,9 +22,9 @@
        public event PropertyChangedEventHandler PropertyChanged;
        private string _sourcePath = "D:\\opting\\得文数据"; // "D:\\LF\\data\\mdb";
        private string _sourcePath = @"D:\LF\data\mdb";
        private string _targetPath = "D:\\LF\\upload";
        private string _targetPath = @"\\LAPTOP-DRTGLTU2\share";
        private LoginWin win;
@@ -78,23 +78,32 @@
            //String file = "E:\\data\\mpt\\A4mpt20131125.mpt";
            //string md5 = MD5Helper.GetMD5Hash(file);
            LogOut.Info("************  应用程序启动成功! ************");
        }
        // 登录
        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() + "-" + Tool.Uname;
            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;
@@ -143,6 +152,7 @@
                MessageBox.Show("请选择入库目录!", "提示");
                return;
            }
            string[] files = Directory.GetFiles(SourcePath);
            if (null == files || files.Length == 0)
            {
@@ -159,9 +169,13 @@
        {
            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);