private void toolStripButton_change_Click(object sender, EventArgs e) { fancyModelMesh.MaterialBlock tBlock = (fancyModelMesh.MaterialBlock)Block; tBlock.DefineXML = textBox_content.Text; updateInfo(); }
private void toolStripButton_ok_Click(object sender, EventArgs e) { fancyModelMesh.MaterialBlock tBlock = (fancyModelMesh.MaterialBlock)Block; tBlock.MaterialName = toolStripTextBox_name.Text.Replace("\r\n", "\n"); updateInfo(); }
private void toolStripButton_restore_Click(object sender, EventArgs e) { fancyModelMesh.MaterialBlock tBlock = (fancyModelMesh.MaterialBlock)Block; textBox_content.Text = tBlock.DefineXML; toolStripButton_change.Visible = false; toolStripButton_restore.Visible = false; }
private void toolStripButton_cancel_Click(object sender, EventArgs e) { fancyModelMesh.MaterialBlock tBlock = (fancyModelMesh.MaterialBlock)Block; toolStripTextBox_name.Text = tBlock.MaterialName; toolStripButton_cancel.Visible = false; toolStripButton_ok.Visible = false; }
private void ToolStripMenuItem_newMat_Click(object sender, EventArgs e) { if (_File != null) { fancyModelMesh.Block tBlock = new fancyModelMesh.MaterialBlock(); _File.BlockList.Add(tBlock); AddNode(tBlock); } }
private void updateInfo() { fancyModelMesh.MaterialBlock tBlock = (fancyModelMesh.MaterialBlock)Block; ParentNode.Text = "材质数据块:" + tBlock.MaterialName; Text = "材质数据编辑器 - " + tBlock.MaterialName; textBox_content.Text = tBlock.DefineXML.Replace("\n", "\r\n"); toolStripTextBox_name.Text = tBlock.MaterialName; toolStripButton_change.Visible = false; toolStripButton_restore.Visible = false; toolStripButton_ok.Visible = false; toolStripButton_cancel.Visible = false; }