123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- 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
- {
- /// <summary>
- /// 星地定位
- /// </summary>
- 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<XDPosRes>("星地时差初值预估", 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<XZPosRes>("低轨双星时差初值预估", 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("加载时差初值预估失败");
- }
- }
-
- }
- }
|