void MapGis_StaticClick(ZzhaControlLibrary.StaticObject EventStaticObj) { this.EventStaticObject = EventStaticObj; if (EventStaticObject.Type == ZzhaControlLibrary.StaticType.Word) cmsMenu.Items[1].Visible = false; else cmsMenu.Items[1].Visible = true; cmsMenu.Show(MousePosition); }
private void AddStatic(XmlNode pntNode, string divname, ZzhaControlLibrary.StaticObject sobj) { string nodename = "Static" + sobj.StaticPoint.X.ToString() + sobj.StaticPoint.Y.ToString(); XmlNode node = ConfigXml.SelectSingleNode("//" + nodename); if (node != null) { node.ChildNodes[0].InnerText = node.ChildNodes[0].InnerText + divname + "|"; node.ChildNodes[2].InnerText = sobj.StaticPoint.X.ToString(); node.ChildNodes[3].InnerText = sobj.StaticPoint.Y.ToString(); node.ChildNodes[4].InnerText = sobj.StaticWidth.ToString(); node.ChildNodes[5].InnerText = sobj.StaticHeight.ToString(); node.ChildNodes[6].InnerText = sobj.StaticName.ToString(); } else { node = ConfigXml.CreateElement(nodename); XmlNode newnode = ConfigXml.CreateElement("Divname"); newnode.InnerText = divname + "|"; node.AppendChild(newnode); newnode = ConfigXml.CreateElement("Path"); newnode.InnerText = sobj.StaticState; node.AppendChild(newnode); newnode = ConfigXml.CreateElement("X"); newnode.InnerText = sobj.StaticPoint.X.ToString(); node.AppendChild(newnode); newnode = ConfigXml.CreateElement("Y"); newnode.InnerText = sobj.StaticPoint.Y.ToString(); node.AppendChild(newnode); newnode = ConfigXml.CreateElement("Width"); newnode.InnerText = sobj.StaticWidth.ToString(); node.AppendChild(newnode); newnode = ConfigXml.CreateElement("Height"); newnode.InnerText = sobj.StaticHeight.ToString(); node.AppendChild(newnode); newnode = ConfigXml.CreateElement("Word"); newnode.InnerText = sobj.StaticName; node.AppendChild(newnode); newnode = ConfigXml.CreateElement("Key"); newnode.InnerText = sobj.NameKey; node.AppendChild(newnode); newnode = ConfigXml.CreateElement("Type"); newnode.InnerText = sobj.Type.ToString(); node.AppendChild(newnode); newnode = ConfigXml.CreateElement("Font"); #region [字体] string FontName = sobj.StaticFont.Name; string FontSize = sobj.StaticFont.Size.ToString(); string Fontstyle = sobj.StaticFont.Style.ToString(); string FontColor = sobj.StaticColor.ToArgb().ToString(); XmlAttribute fontnode = ConfigXml.CreateAttribute("Name"); fontnode.InnerText = FontName; newnode.Attributes.Append(fontnode); fontnode = ConfigXml.CreateAttribute("Size"); fontnode.InnerText = FontSize; newnode.Attributes.Append(fontnode); fontnode = ConfigXml.CreateAttribute("Style"); fontnode.InnerText = Fontstyle; newnode.Attributes.Append(fontnode); newnode.InnerText = FontColor; node.AppendChild(newnode); #endregion pntNode.AppendChild(node); } }
public frmStaticConfig(ZzhaControlLibrary.StaticObject staticobj, ZzhaControlLibrary.ZzhaMapGis mapgis) { InitializeComponent(); this.StaticObj = staticobj; this.MapGis = mapgis; }
public frmStaticConfig(ZzhaControlLibrary.StaticObject staticobj) { InitializeComponent(); this.StaticObj = staticobj; }
public frmStaticConfig(ZzhaControlLibrary.StaticObject staticobj,ZzhaControlLibrary.ZzhaMapGis mapgis) { InitializeComponent(); this.StaticObj = staticobj; this.MapGis = mapgis; }