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 _waterLevels长江; public List GetWaterLevels长江() { return _waterLevels长江; } private void btnOk_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(textBox长江水位.Text)) { return; } var all_cjsw = IStation.JsonHelper.Json2Object>(textBox长江水位.Text); _waterLevels长江 = new List(); 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"); } } }