duheng
2024-07-25 713d5218ee2b47c0c92f75c19c49bb7e883cd214
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
using DevExpress.XtraEditors;
using DevExpress.XtraRichEdit.Commands;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace IStation.WinFrmUI.CalcErQu
{
    public partial class InputRiverWaterLevelData油猴Dlg : XtraForm
    {
        public InputRiverWaterLevelData油猴Dlg()
        {
            InitializeComponent();
        }
        DateTime _day = DateTime.Now;
        public void SetDay(DateTime date)
        {
            this._day = date;
        }
    List<Model.TimeWaterLevel> _waterLevels长江;
        public  List<Model.TimeWaterLevel> GetWaterLevels长江()
        {
            return _waterLevels长江;
        }
        private void btnOk_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBox长江水位.Text)) { return; }
            var all_cjsw =
                IStation.JsonHelper.Json2Object<List<cjsw_ui>>(textBox长江水位.Text);
 
            _waterLevels长江 = new List<Model.TimeWaterLevel>();
 
            for (int i = 0; i < all_cjsw.Count; i++)
            {
                _waterLevels长江.Add(new Model.TimeWaterLevel(
                     this._day.Date.AddHours(i),
                    all_cjsw[i].value / 100));//cm -> m
            }
 
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
        private bool InitialTimeWaterLevel长江()
        {
 
 
            return true;
        }
        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
        class cjsw_ui
        {
            public DateTime time { get; set; }
            public double value { get; set; }
        }
        private void InputRiverWaterLevelData油猴Dlg_Load(object sender, EventArgs e)
        {
 
        }
 
        private void labelControl1_Click(object sender, EventArgs e)
        {
 
            System.Diagnostics.Process.Start("explorer.exe", "https://www.chaoxibiao.net/chaxun.html");
 
        }
    }
}