Beispiel #1
0
 /* c_setcolorcode [char] [color] */
 void c_setcolorcode(IList <string> args)
 {
     if (ColorsTable.ContainsKey(args[1][0]))
     {
         ColorsTable[args[1][0]] = ParseColor(Args2Str(args, 2));
     }
     else
     {
         ColorsTable.Add(args[1][0], ParseColor(Args2Str(args, 2)));
     }
 }
Beispiel #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            Colors      color = new Colors(txtBNameCol.Text);
            DataRow     row   = color.BuildRow();
            ColorsTable ct    = new ColorsTable();

            if (ct.Add(row))
            {
                MessageBox.Show("הצבע התווסף בהצלחה");
            }
            else
            {
                MessageBox.Show("הצבע כבר קיים במאגר");
            }
        }