private void newObjTrickBtn_Click(object sender, System.EventArgs e) { common.UserPrompt uInput = new COH_CostumeUpdater.common.UserPrompt("Object Trick Name", "Please enter New Object Trick Name"); DialogResult dr = uInput.ShowDialog(); if (dr == DialogResult.OK && uInput.userInput.Trim().Length > 0) { string matName = uInput.userInput.Trim().Replace(" ", "_"); buildObjectTrickProperties(); ArrayList data = getCurrentData(matName); ObjectTrick mt = getNewObjTrick(data, fileName, matName); deleteObjTrickBtn.Enabled = true; renameObjTrickBtn.Enabled = true; dupObjTrickBtn.Enabled = true; //saveObjTrickButton.Enabled = true; reOrderObjTrickButtons(); } }
private void renameMatBtn_Click(object sender, System.EventArgs e) { if (selectdMatBtn != null) { Button matBtn = (Button)selectdMatBtn; string matName = matBtn.Text; DialogResult dr = DialogResult.Yes; if (((MatTrick)matBtn.Tag).startIndex < 5000) { string deleteWarning = string.Format("Renaming \"{0}\" will break all references to this Material Trick!\n\nAre you sure you want to continue with this operation?", matName); dr = MessageBox.Show(deleteWarning, "Warning...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2); } if (dr == DialogResult.Yes) { common.UserPrompt uInput = new COH_CostumeUpdater.common.UserPrompt("Material Name", "Please enter New Material Name"); uInput.setTextBoxText(matName); DialogResult uInputDr = uInput.ShowDialog(); if (uInputDr == DialogResult.OK) { string matNewName = uInput.userInput; if (!matNewName.ToLower().StartsWith("X_".ToLower())) { matNewName = "X_" + matNewName; } renameMat(ref matBtn, matNewName); } } } }
private void newMatBtn_Click(object sender, System.EventArgs e) { if (this.matTrickPropertiesPanel.Controls.Count > 0) { this.matTrickPropertiesPanel.ScrollControlIntoView(this.matTrickPropertiesPanel.Controls[0]); } common.UserPrompt uInput = new COH_CostumeUpdater.common.UserPrompt("Material Name", "Please enter New Material Name"); DialogResult dr = uInput.ShowDialog(); if (dr == DialogResult.OK && uInput.userInput.Trim().Length > 0) { if (tgaFilesDictionary == null) { tgaFilesDictionary = common.COH_IO.getFilesDictionary(getRoot() + @"src\Texture_Library", "*.tga"); } string matName = uInput.userInput.Trim().Replace(" ", "_"); if (!matName.ToLower().StartsWith("X_".ToLower())) { matName = "X_" + matName; } buildMatProperties(); ArrayList data = getCurrentData(matName); MatTrick mt = getNewMatTrick(data, fileName, matName); deleteMatBtn.Enabled = true; renameMatBtn.Enabled = true; dupMatBtn.Enabled = true; //saveMatButton.Enabled = true; reOrderMatButtons(); } }
private void renameTextureTrickBtn_Click(object sender, System.EventArgs e) { if (selectdTextureTrickBtn != null) { Button ttBtn = (Button)selectdTextureTrickBtn; string ttName = ttBtn.Text; DialogResult dr = DialogResult.Yes; if (((TextureTrick)ttBtn.Tag).startIndex < 5000) { string deleteWarning = string.Format("Renaming \"{0}\" will break all references to this Trick!\n\nAre you sure you want to continue with this operation?", ttName); dr = MessageBox.Show(deleteWarning, "Warning...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2); } if (dr == DialogResult.Yes) { common.UserPrompt uInput = new COH_CostumeUpdater.common.UserPrompt("Texture Trick Name", "Please enter New Object Trick Name"); uInput.setTextBoxText(ttName); DialogResult uInputDr = uInput.ShowDialog(); if (uInputDr == DialogResult.OK) { string matNewName = uInput.userInput; renameTextureTrick(ref ttBtn, matNewName); } } } }