/// <summary> /// 加载组件 /// </summary> /// <param name="Globe"></param> /// <param name="Parent"></param> public void LoadPlugin(iTelluro.GlobeEngine.MapControl3D.GlobeView Globe, PnlLeftControl Parent) { _globeView = Globe; _parent = Parent; this.Dock = DockStyle.Fill; //绑定控制台输出 //textBox4.BindConsole(); try { //绑定数据源 NodeModel[] nodes = Parent.ProjectModel.Nodes.Where(t => t.PNode == Guids.PMHL).ToArray(); fileChooseControl1.BindSource(Parent, (nodes != null && nodes.Count() > 0) ? nodes[0].NodeName : string.Empty); fileChooseControl2.BindSource(Parent, (nodes != null && nodes.Count() > 1) ? nodes[1].NodeName : string.Empty); fileChooseControl3.BindSource(Parent, (nodes != null && nodes.Count() > 2) ? nodes[2].NodeName : string.Empty); //显示之前的结果 _xmlPath = Path.Combine(Path.GetDirectoryName(Parent.ProjectModel.ProjectPath), ConfigNames.SlopeConfluence); if (File.Exists(_xmlPath)) { PMHLResult result = XmlHelper.Deserialize <PMHLResult>(_xmlPath); if (result != null) { textBox1.Text = result.L2 == 0 ? "" : result.L2.ToString(); textBox2.Text = result.l2 == 0 ? "" : result.l2.ToString(); textBox3.Text = result.A2 == 0 ? "" : result.A2.ToString(); } } } catch { } Parent.UIParent.Controls.Add(this); }
/// <summary> /// 加载组件 /// </summary> /// <param name="Globe"></param> /// <param name="Parent"></param> public void LoadPlugin(iTelluro.GlobeEngine.MapControl3D.GlobeView Globe, PnlLeftControl Parent) { _globeView = Globe; _parent = Parent; this.Dock = DockStyle.Fill; //绑定控制台输出 //textBox4.BindConsole(); Parent.UIParent.Controls.Add(this); }
/// <summary> /// 加载组件 /// </summary> /// <param name="Globe"></param> /// <param name="Parent"></param> public void LoadPlugin(iTelluro.GlobeEngine.MapControl3D.GlobeView Globe, PnlLeftControl Parent) { _globeView = Globe; _parent = Parent; this.Dock = DockStyle.Fill; //绑定控制台输出 //textBox4.BindConsole(); //初始化基础参数 DefaultArgModel model = XmlHelper.Deserialize <DefaultArgModel>(Path.Combine(Path.GetDirectoryName(Parent.ProjectModel.ProjectPath), ConfigNames.DefaultArgModel)); if (model != null) { txteps1.Text = model.esp1; txteps2.Text = model.esp2; txtp1.Text = model.p1; txtQm.Text = model.Qm; txttc.Text = model.tc; } Parent.UIParent.Controls.Add(this); }