void acceptB_Click(object sender, EventArgs e) { if (StringsXMLEditor.ContainsKey(resFile, name)) { int i = 0; while (StringsXMLEditor.ContainsKey(resFile, name + ++i)) { ; } name = name + i; } DialogResult = DialogResult.OK; }
void checkStatus() { if (name.Length == 0) { acceptB.Enabled = false; statusCSL.SetError("Please specify a resource name"); } else { acceptB.Enabled = true; if (StringsXMLEditor.ContainsKey(resFile, name)) { statusCSL.SetWarn("Resource name will be changed due to another already exists with that name"); } else { statusCSL.SetStatus("Ready to extract the string resource"); } } }