管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2023-08-21 017d6412a675a989caa8b7adeb65fc57e1bcc5bc
修改系统登录功能
已添加1个文件
已修改6个文件
已删除1个文件
119 ■■■■ 文件已修改
DataLoader/CS/Importor.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/CS/NtstWeb.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/DataLoader.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/MainWindow.xaml.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/Model/Common.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/Model/SysMeta.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/Model/Tool.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/htmls/login.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/CS/Importor.cs
@@ -87,12 +87,12 @@
            vd.Meta = new SysMeta();
            vd.Meta.name = fi.Name;
            vd.Meta.dirid = Tool.DirId;
            vd.Meta.dirid = Common.DirId;
            vd.Meta.depid = 1;
            vd.Meta.verid = 0;
            vd.Meta.type = fi.Extension.ToLower().Replace(".", "");
            vd.Meta.sizes = Tools.SizeToMb(fi.Length);
            vd.Meta.create_user = Tool.UserId;
            vd.Meta.create_user = Common.UserId;
        }
        public static void ImportFiles(ObservableCollection<ViewData> viewDatas, string target, int start)
DataLoader/CS/NtstWeb.cs
@@ -21,13 +21,13 @@
        {
            if (uid > 0 && !string.IsNullOrEmpty(token))
            {
                Tool.UserId = uid;
                Tool.Uname = uname;
                Tool.Token = token;
                Common.UserId = uid;
                Common.Uname = uname;
                Common.Token = token;
                owner.Dispatcher.Invoke(new Action(delegate
                {
                    Tool.Owner.SetLoginInfo();
                    Common.Owner.SetLoginInfo();
                }));
            }
        }
DataLoader/DataLoader.csproj
@@ -138,7 +138,7 @@
    <Compile Include="CS\MetaHelper.cs" />
    <Compile Include="CS\StaticData.cs" />
    <Compile Include="CS\Tools.cs" />
    <Compile Include="Model\Tool.cs" />
    <Compile Include="Model\Common.cs" />
    <Compile Include="CS\ModelHandler.cs" />
    <Compile Include="CS\NtstWeb.cs" />
    <Compile Include="CS\PostgreHelper.cs" />
DataLoader/MainWindow.xaml.cs
@@ -68,7 +68,7 @@
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            Tool.Owner = this;
            Common.Owner = this;
            this.btnLoad.IsEnabled = false;
            this.btnImport.IsEnabled = false;
@@ -84,18 +84,18 @@
        // è®¾ç½®
        private void Login_MouseLeftButtonDown(object sender, RoutedEventArgs e)
        {
            //win = new LoginWin();
            //this.Hide();
            //win.Show();
            win = new LoginWin();
            this.Hide();
            win.Show();
            SetLoginInfo();
            //SetLoginInfo();
            //GdalHelper.Instance.ReadTiff();
        }
        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;
@@ -103,8 +103,8 @@
            string uidStr = this.tbUid.Text.Trim();
            string didStr = this.tbDir.Text.Trim();
            int.TryParse(uidStr, out Tool.UserId);
            int.TryParse(didStr, out Tool.DirId);
            int.TryParse(uidStr, out Common.UserId);
            int.TryParse(didStr, out Common.DirId);
            this.btnLoad.IsEnabled = true;
            this.btnImport.IsEnabled = true;
DataLoader/Model/Common.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
using Npgsql;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.Common;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace DataLoader.Model
{
    /// <summary>
    /// é€šç”¨ç±»
    /// </summary>
    public class Common
    {
        /// <summary>
        /// æ‰€æœ‰è€…
        /// </summary>
        public static MainWindow Owner = null;
        /// <summary>
        /// ç”¨æˆ·ID
        /// </summary>
        public static int UserId = 1;
        /// <summary>
        /// ç”¨æˆ·å
        /// </summary>
        public static string Uname = "admin";
        /// <summary>
        ///
        /// </summary>
        public static int DirId = 1;
        /// <summary>
        /// ä»¤ç‰Œ
        /// </summary>
        public static string Token = null;
    }
}
DataLoader/Model/SysMeta.cs
@@ -1,12 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Security.Cryptography;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
namespace DataLoader.Model
{
DataLoader/Model/Tool.cs
ÎļþÒÑɾ³ý
DataLoader/htmls/login.html
@@ -41,7 +41,7 @@
    </section>
  </div>
  <script>
    var url = "http://127.0.0.1:12316/server/";
      var url = "http://127.0.0.1:9000/MoonServer/";
    var isBusy = false;