예제 #1
0
 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);
     }
 }
예제 #2
0
        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 = "";
            }
        }
예제 #3
0
        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);
            }
        }