// Methods public ListViewEx() { this.endArrow = false; try { base.Items.Add("нч"); SvgDocument fadde1=new SvgDocument(); ResourceManager manager1 = new ResourceManager(base.GetType()); string text1 = manager1.GetString("arrow"); fadde1.LoadXml(text1); XmlNodeList list1 = fadde1.GetElementsByTagName("marker"); for (int num1 = 0; num1 < list1.Count; num1++) { XmlElement element1 = list1[num1] as XmlElement; if (element1 != null) { // base.Items.Add(new Arrow((SvgElement)element1)); } } text1 = null; } catch (Exception exception1) { Console.Write(exception1.Message); } this.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; base.BorderStyle = BorderStyle.None; // this.ItemHeight = 16; }
// Methods public ArrowSelector() { this.endArrow = false; try { base.Items.Add("нч"); SvgDocument fadde1=new SvgDocument(); string filename = Path.GetDirectoryName(Assembly.GetAssembly(base.GetType()).Location)+"\\symbol\\arrow.xml"; if (File.Exists(filename)) { fadde1 = SvgDocumentFactory.CreateDocumentFromFile(filename); } else { ResourceManager manager1 = new ResourceManager(base.GetType()); fadde1.LoadXml(manager1.GetString("arrow")); } XmlNodeList list1 = fadde1.GetElementsByTagName("marker"); for (int num1 = 0; num1 < list1.Count; num1++) { XmlElement element1 = list1[num1] as XmlElement; if (element1 != null) { base.Items.Add(new Arrow((SvgElement)element1)); } } } catch (Exception exception1) { Console.Write(exception1.Message); } this.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; base.BorderStyle = BorderStyle.None; this.ItemHeight = 16; }
private void frmLayerManagerYear_Load_1(object sender, EventArgs e) { checkedListBox1.Items.Clear(); if (symbolDoc != null) { XmlNodeList list1 = symbolDoc.GetElementsByTagName("layer"); for (int num1 = 0; num1 < list1.Count; num1++) { Layer element1 = list1[num1] as Layer; string elename = element1.Label.ToString(); string elenameyear = ""; if (elename.Length >= 4) { elenameyear = elename.Substring(0, 4); } if (progtype == "电网规划层") { if ((!IsNum(elenameyear)) || (elenameyear == "")) { } else { if (element1.GetAttribute("layerType") == progtype) { if (Key == "ALL") { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } else { if (element1.GetAttribute("visibility") == "visible" || (element1.GetAttribute("ParentID") == "")) { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } } } else { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } } } } Layerlist = symbolDoc.getLayerList(); } }
private void frmLayerManager2_Load(object sender, EventArgs e) { checkedListBox1.Items.Clear(); if (symbolDoc != null) { XmlNodeList list1 = symbolDoc.GetElementsByTagName("layer"); for (int num1 = 0; num1 < list1.Count; num1++) { Layer element1 = list1[num1] as Layer; if (progtype == "地理信息层") { if (element1.GetAttribute("layerType") == progtype) { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } } if (progtype == "城市规划层") { if (element1.GetAttribute("layerType") == progtype || element1.GetAttribute("layerType") == "地理信息层") { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } } if (progtype == "电网规划层") { if (element1.GetAttribute("layerType") == progtype) { if (Key == "ALL") { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } else { if ((element1.GetAttribute("visibility") == "visible") || (element1.GetAttribute("ParentID") == "")) { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } } } else { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } } if (progtype == "所内接线图") { if (element1.GetAttribute("layerType") == progtype) { string strLayerID = element1.GetAttribute("id"); int n = this.checkedListBox1.Items.Add(element1, element1.Visible); if (element1.Visible) { checkedListBox1.SetItemChecked(n, true); } } } } Layerlist = symbolDoc.getLayerList(); } }