private void button_read_Click(object sender, EventArgs e) { string clkPath = this.textBox_Path.Text; string sp3Path = this.textBox_sp3Path.Text; if (!File.Exists(clkPath) || !File.Exists(sp3Path)) { MessageBox.Show("指定文件不存在!"); return; } ClockFileReader reader = new ClockFileReader(clkPath, false); _clockFile = reader.ReadAll(); if (_clockFile.ClockCount == 0) { return; } sp3File = new SingleSp3FileEphService(sp3Path); this.dateTimePicker_from.Value = _clockFile.First.First().Time.DateTime; this.dateTimePicker_to.Value = this.dateTimePicker_from.Value + TimeSpan.FromHours(6); List <String> prns = new List <string>(); foreach (SatelliteNumber prn in _clockFile.Header.PrnList) { prns.Add(prn.ToString()); } this.comboBox_name.DataSource = prns; this.bindingSource_clk.DataSource = _clockFile.AllItems; this.bindingSource_sp3.DataSource = sp3File.Gets(); }
private void button_filter_Click(object sender, EventArgs e) { if (this.comboBox_name.SelectedItem == null) { MessageBox.Show("请先读取数据。"); return;; } string name = this.comboBox_name.SelectedItem.ToString(); from = this.dateTimePicker_from.Value; to = this.dateTimePicker_to.Value; Clocks = _clockFile.GetClockItems(name, Time.Parse(from), Time.Parse(to)); this.bindingSource_clk.DataSource = Clocks; this.Ephemerides = sp3File.Gets(SatelliteNumber.Parse(name), Time.Parse(from), Time.Parse(to)); this.bindingSource_sp3.DataSource = Ephemerides; ShowComparing(); }