private void method_1() { this.tv1.Nodes.Clear(); if (this.list_0 != null) { for (int i = 0; i < this.list_0.Count; i++) { clsTextureGroup clsTextureGroup_ = this.list_0[i]; this.method_0(clsTextureGroup_); } } }
private void method_0(clsTextureGroup clsTextureGroup_0) { System.Windows.Forms.TreeNode treeNode = new System.Windows.Forms.TreeNode(clsTextureGroup_0.name); treeNode.Tag = clsTextureGroup_0; this.tv1.Nodes.Add(treeNode); for (int i = 0; i < clsTextureGroup_0.TexturePaths.Count; i++) { string path = clsTextureGroup_0.TexturePaths[i]; System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode(Path.GetFileNameWithoutExtension(path)); treeNode2.Tag = clsTextureGroup_0.Symbols[i]; treeNode.Nodes.Add(treeNode2); } }
public void GetRoofColor() { try { clsTextureGroup pTG = this.m_pTG; this.DlgCommonColor.ShowDialog(); pTG.RoofColorRGB = System.Drawing.ColorTranslator.ToOle(this.DlgCommonColor.Color); this.DoNodeClick(this.tv1.SelectedNode); } catch { } }
public static List <clsTextureGroup> PreloadTextureGroups(bool bool_0) { List <clsTextureGroup> result; try { List <clsTextureGroup> list = new List <clsTextureGroup>(); clsTextureGroup clsTextureGroup = new clsTextureGroup(); list.Add(new clsTextureGroup { name = "默认", RoofColorRGB = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Brown), TexturePaths = { "[facade01]", "[facade02]", "[facade03]", "[facade04]", "[facade05]" } }); bool flag = false; string path = System.Windows.Forms.Application.StartupPath + "\\TextureGroups.ini"; if (File.Exists(path)) { flag = true; } if (!flag) { } if (bool_0) { modFacades.InitTextures(list, false); } result = list; return(result); } catch { } result = null; return(result); }
public void AddGroup() { System.Windows.Forms.OpenFileDialog openFileDialog = new System.Windows.Forms.OpenFileDialog(); openFileDialog.Filter = "*.bmp|*.bmp"; openFileDialog.Multiselect = true; if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { clsTextureGroup clsTextureGroup = new clsTextureGroup(); string[] fileNames = openFileDialog.FileNames; for (int i = 0; i < fileNames.Length; i++) { string text = fileNames[i]; if (clsTextureGroup.name == null || clsTextureGroup.name.Length == 0) { clsTextureGroup.name = Path.GetFileNameWithoutExtension(text); } clsTextureGroup.TexturePaths.Add(text); } clsTextureGroup.Init(); this.list_0.Add(clsTextureGroup); this.method_0(clsTextureGroup); } }