using DevExpress.Utils.Drawing.Helpers; using DevExpress.Utils.Extensions; using DevExpress.XtraEditors; using DevExpress.XtraExport.Helpers; using DevExpress.XtraGrid.Views.Grid; using DevExpress.XtraMap; using DevExpress.XtraTreeList.Data; using DxHelper; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.Entity; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Forms; using XzXdDw.App.Model; namespace CG.App.UserControl { /// /// 星地定位 /// public partial class CtrlDto : DevExpress.XtraEditors.XtraUserControl { DtXDParam dtxdctrl = null; DtSXLParam dtsxlctrl = null; public CtrlDto() { InitializeComponent(); } private async void CtrlDto_Load(object sender, EventArgs e) { try { mapControl1.UseDefalutOptions() .UseClearAll() .UseDistanceLine() .UseMarkDot() .UseDrawRect(rect => { if (dtxdctrl != null) { dtxdctrl.rect = rect; } }); mapControl1.AddRectMenu("星地时差初值预估", SvgHelper.LoadFromFile("Image\\初值预估.svg"), items => { var rect = mapControl1.GetCurrentRect(); if (dtxdctrl == null) { dtxdctrl = new DtXDParam(); } dtxdctrl.rect = rect; PopupHelper.ShowPopup(dtxdctrl, mapControl1, mapControl1.Width / 4); }) .AddRectMenu("低轨双星时差初值预估", SvgHelper.LoadFromFile("Image\\初值预估.svg"), items => { var rect = mapControl1.GetCurrentRect(); if (dtsxlctrl == null) { dtsxlctrl = new DtSXLParam(); } dtsxlctrl.rect = rect; PopupHelper.ShowPopup(dtsxlctrl, mapControl1, mapControl1.Width / 4); }); } catch (Exception ex) { Serilog.Log.Error("加载时差初值预估失败", ex); XtraMessageBox.Show("加载时差初值预估失败"); } } } }