管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2023-08-22 ca4c281f3e2f52b1e0cbb9caaf75581286d58a52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
using DataLoader.CS;
using System;
using System.ComponentModel;
using System.IO;
 
namespace DataLoader.Model
{
    /// <summary>
    /// 通用属性类
    /// </summary>
    public class CommonProp // : INotifyPropertyChanged
    {
        /// <summary>
        /// 初始化
        /// </summary>
        public static void Init()
        {
            string startPath = Tools.GetSetting("StartPath");
            int.TryParse(startPath, out StartPath);
 
            SourcePath = Tools.GetSetting("SourcePath");
            TargetPath = Tools.GetSetting("TargetPath");
 
            Owner.tbSource.Text = SourcePath;
            Owner.tbTarget.Text = TargetPath;
        }
 
        /// <summary>
        /// 所有者
        /// </summary>
        public static MainWindow Owner;
 
        /// <summary>
        /// 开始目录
        /// </summary>
        public static int StartPath;
 
        /// <summary>
        /// 用户ID
        /// </summary>
        public static int UserId = 1;
 
        /// <summary>
        /// 用户名
        /// </summary>
        public static string Uname = "admin";
 
        /// <summary>
        /// 令牌
        /// </summary>
        public static string Token;
 
        /// <summary>
        /// 单位编码
        /// </summary>
        public static string Depcode;
 
        /// <summary>
        /// 单位名称
        /// </summary>
        public static string Depname;
 
        /// <summary>
        /// 目录ID
        /// </summary>
        public static int dirId;
 
        /// <summary>
        /// 目录编码
        /// </summary>
        public static string Dircode;
 
        /// <summary>
        /// 目录名称
        /// </summary>
        public static string Dirname;
 
        /// <summary>
        /// 传感器类型
        /// </summary>
        public static string sensortype;
 
        /// <summary>
        /// 采集时间
        /// </summary>
        public static DateTime acq_time = DateTime.Now;
 
        /// <summary>
        /// 元数据类型
        /// </summary>
        public static string MetaType;
 
        /// <summary>
        /// 数据目录
        /// </summary>
        public static string SourcePath;
 
        /// <summary>
        /// 入库目录
        /// </summary>
        public static string TargetPath;
 
        /// <summary>
        /// 传感器类型
        /// </summary>
        public static string SensorType;
 
        /// <summary>
        /// 采集时间
        /// </summary>
        public static DateTime AcqTime;
 
        /*private string _sourcePath;
 
        /// <summary>
        /// 数据源目录
        /// </summary>
        public string SourcePath
        {
            get { return _sourcePath; }
            set
            {
                if (!String.IsNullOrEmpty(value) && Directory.Exists(value))
                {
                    _sourcePath = value;
                    PropertyChanged(this, new PropertyChangedEventArgs("SourcePath"));
                }
            }
        }
 
        private string _targetPath;
 
        /// <summary>
        /// 目标目录
        /// </summary>
        public string TargetPath
        {
            get { return _targetPath; }
            set
            {
                if (!String.IsNullOrEmpty(value) && Directory.Exists(value))
                {
                    _targetPath = value;
                    PropertyChanged(this, new PropertyChangedEventArgs("TargetPath"));
                }
            }
        }
 
        public event PropertyChangedEventHandler PropertyChanged;
 
        protected virtual void OnPropertyChanged(string propertyName)
        {
            //PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }*/
    }
}