public void load() { noobjs.Clear(); foreach (pLayer layer in root.earth.objManager.zLayers.Values) { foreach (PowerBasicObject obj in layer.pModels.Values) { //if (obj.busiData.busiSort == "线路") if (obj is DistNetLibrary.DNACLine) { if (rd.NextDouble() < 0.1) { noobjs.Add(obj); } } } } foreach (pPowerLine lin in noobjs) { savethickness = lin.thickness; savecolor = lin.color; lin.color = Colors.Red; lin.thickness = 0.0008f; lin.AnimationBegin(pPowerLine.EAnimationType.闪烁); lin.LabelColor = Colors.Yellow; lin.LabelSizeX = lin.LabelSizeY = 0.18f; lin.Label = lin.name; lin.isShowLabel = true;//初始化时放最后(暂时) pData additionObj = new pData(lin.parent) { id = lin.id + "标志", location = lin.location, valueScale = 0.01f, radScale = 0.0025f }; additionObj.datas.Add(new Data() { id = lin.id + "数据", value = 1, argu = lin.name, color = Color.FromArgb(0xC3, 0xFF, 0x00, 0x00), geokey = "倒锥体" }); lin.AddSubObject("sf", additionObj); additionObj.aniRotation.isDoAni = true; } root.earth.UpdateModel(); lstObject.ItemsSource = noobjs; //===附加表格 grid = new PShareGrid { Width = root.grdContent.ActualWidth - this.Width, Height = 210, Margin = new System.Windows.Thickness(0, 0, 0, 24), VerticalAlignment = System.Windows.VerticalAlignment.Bottom, HorizontalAlignment = System.Windows.HorizontalAlignment.Left }; root.grdContent.Children.Add(grid); }
public void load() { root.earth.config.tooltipMoveEnable = true; cmbMode.SelectedIndex = 0; root.earth.VisualRangeChanged += new EventHandler(earth_VisualRangeChanged); //===附加表格 grid = new PShareGrid { Width = root.grdContent.ActualWidth - this.Width, Height = 210, Margin = new System.Windows.Thickness(0, 0, 0, 24), VerticalAlignment = System.Windows.VerticalAlignment.Bottom, HorizontalAlignment = System.Windows.HorizontalAlignment.Left }; root.grdContent.Children.Add(grid); }