private void onFormClosing(object sender, FormClosingEventArgs e) { MetaList<MetaValue> keys = new MetaList<MetaValue>(); foreach (MetaValue key in this.vdValues.Keys) { if (keys.Contains(key)) { e.Cancel = true; MessageBox.Show(ERROR_DUPLICATE_KEYS, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning); break; } keys.Add(key); } }
private void Button_ClickAddMeta(object sender, RoutedEventArgs e) { if (!string.IsNullOrEmpty(TextBox_MetaName.Text)) { KeyValue kv = new KeyValue(); kv.key = TextBox_MetaName.Text; MetaList.Add(kv); MetaList = MetaList; TextBox_MetaName.Text = ""; } }
private void onFormClosing(object sender, FormClosingEventArgs e) { MetaList <MetaValue> keys = new MetaList <MetaValue>(); foreach (MetaValue key in this.vdValues.Keys) { if (keys.Contains(key)) { e.Cancel = true; MessageBox.Show(ERROR_DUPLICATE_KEYS, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Warning); break; } keys.Add(key); } }