管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-08-22 1e45582d78413ae5696e0b0bc971fad7e9d64c49
DataLoader/MainWindow.xaml.cs
@@ -15,9 +15,11 @@
{
    public partial class MainWindow : Window
    {
        private ObservableCollection<ViewData> viewDatas = new ObservableCollection<ViewData>();
        public ResWin resWin;
        private LoginWin win;
        private LoginWin loginWin;
        private ObservableCollection<ViewData> viewDatas = new ObservableCollection<ViewData>();
        public MainWindow()
        {
@@ -60,24 +62,19 @@
        // 设置
        private void Login_MouseLeftButtonDown(object sender, RoutedEventArgs e)
        {
            win = new LoginWin();
            loginWin = new LoginWin();
            this.Hide();
            win.Show();
            loginWin.Show();
        }
        public void SetLoginInfo()
        {
            if (win != null) win.Close();
            if (loginWin != null) loginWin.Close();
            this.Show();
            //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 Common.UserId);
            //int.TryParse(didStr, out Common.DirId);
            this.tbUid.Text = CommonProp.UserId.ToString();
            this.tbUname.Text = CommonProp.Uname;
            this.tbToken.Text = CommonProp.Token;
            this.btnLoad.IsEnabled = true;
            this.btnImport.IsEnabled = true;
@@ -86,7 +83,21 @@
        // 资源目录
        private void Dir_MouseLeftButtonDown(object sender, RoutedEventArgs e)
        {
            resWin = new ResWin();
            this.Hide();
            resWin.Show();
        }
        public void SetRes(string dircode, string fullName)
        {
            if (resWin != null) resWin.Close();
            this.Show();
            if (!string.IsNullOrEmpty(dircode))
            {
                CommonProp.Dircode = dircode;
                this.tbDir.Text = fullName;
            }
        }
        // 数据目录