private void openInTextureToolToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode t = treeView5.SelectedNode; if (t == null || t.Nodes.Count != 0) { return; } string path = t.Text; while (t.Parent.Text != "") { t = t.Parent; path = t.Text + "/" + path; } timer1.Enabled = false; renderer.device.Dispose(); renderer = null; Application.DoEvents(); ContentTools.MeshTool ttool = new ContentTools.MeshTool(); ttool.MdiParent = this.MdiParent; ttool.WindowState = FormWindowState.Maximized; ttool.Show(); ttool.LoadById(path); this.Close(); }
public void addSpecialObject(string specialObjName, short transX, short transY, short transZ) { Render.Renderer specialObjRenderer = new Render.Renderer(); if (!modelHelper.elemExists(specialObjName)) { specialObjRenderer.SetRenderMode(LakiTool.Render.RenderMode.Geo); specialObjRenderer.rendererObject.Georenderer.SetInitialDataFromLabelName(OBJs.Special.Utils.SpecialUtil.findSpecialFromPresetName(specialObjName).GeoName()); specialObjRenderer.initRenderer(); modelHelper.rList.Add(new Render.NamedRenderer(specialObjRenderer, specialObjName)); } specialObjRenderer = modelHelper.getRendererFromName(specialObjName); Obj.Translation translation = new Obj.Translation(); translation.xTrans = transX; translation.yTrans = transY; translation.zTrans = transZ; renderStack.Add(new Render.RenderStackObject(specialObjRenderer, translation)); }
public void RefreshRESThread(object obj) { try { string type = (string)obj; this.Invoke(new Action(delegate { splitContainer4.Visible = false; toolStrip4.Enabled = false; status.Text = "Refreshing..."; } )); ttlist = new List <DBAccess.RESInformation>(); ttlist.AddRange(DBAccess.GetRESInformationsByType(type)); List <DBAccess.RESInformation> tmp = new List <DBAccess.RESInformation>(); foreach (DBAccess.RESInformation res in ttlist) { if (!res.isPatch) { tmp.Add(res); } } ttlist = tmp; this.Invoke(new Action(delegate { status.Text = "Preparing..."; Application.DoEvents(); MakeMeshTree(); } )); this.Invoke(new Action(delegate { splitContainer4.Visible = true; toolStrip4.Enabled = true; status.Text = "Loaded " + ttlist.Count + " ressources"; renderer = new Render.Renderer(); renderer.Init(pictureBox1.Handle, pictureBox1.Width, pictureBox1.Height); timer1.Enabled = true; } )); } catch (Exception) { } }
public void RefreshRESThread(object obj) { try { string type = (string)obj; this.Invoke(new Action(delegate { splitContainer4.Visible = false; toolStrip4.Enabled = false; status.Text = "Refreshing..."; } )); ttlist = new List<DBAccess.RESInformation>(); ttlist.AddRange(DBAccess.GetRESInformationsByType(type)); List<DBAccess.RESInformation> tmp = new List<DBAccess.RESInformation>(); foreach (DBAccess.RESInformation res in ttlist) if (!res.isPatch) tmp.Add(res); ttlist = tmp; this.Invoke(new Action(delegate { status.Text = "Preparing..."; Application.DoEvents(); MakeMeshTree(); } )); this.Invoke(new Action(delegate { splitContainer4.Visible = true; toolStrip4.Enabled = true; status.Text = "Loaded " + ttlist.Count + " ressources"; renderer = new Render.Renderer(); renderer.Init(pictureBox1.Handle, pictureBox1.Width, pictureBox1.Height); timer1.Enabled = true; } )); } catch (Exception) { } }
private void openInTextureToolToolStripMenuItem_Click(object sender, EventArgs e) { TreeNode t = treeView5.SelectedNode; if (t == null || t.Nodes.Count != 0) return; string path = t.Text; while (t.Parent.Text != "") { t = t.Parent; path = t.Text + "/" + path; } timer1.Enabled = false; renderer.device.Dispose(); renderer = null; Application.DoEvents(); ContentTools.MeshTool ttool = new ContentTools.MeshTool(); ttool.MdiParent = this.MdiParent; ttool.WindowState = FormWindowState.Maximized; ttool.Show(); ttool.LoadById(path); this.Close(); }