private void OK_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < 4; i++)
     {
         if (ElementsTable.GetControlFromPosition(0, i).Text == "" || ElementsTable.GetControlFromPosition(0, i).Text == ElementsTable.GetControlFromPosition(0, i).Tag.ToString())
         {
             ElementsTable.GetControlFromPosition(0, i).Text = ElementsTable.GetControlFromPosition(0, i).Name.Last().ToString();
         }
     }
     //parent.GetStringProgram(ElementsTable.Controls[0].Text, ElementsTable.Controls[2].Text, ElementsTable.Controls[4].Text, ElementsTable.Controls[6].Text);
     Close();
 }
        private void FormulaReset_Click(object sender, EventArgs e)
        {
            Button Btn = sender as Button;

            ElementsTable.GetControlFromPosition(0, ElementsTable.GetPositionFromControl(Btn).Row).Text = ElementsTable.GetControlFromPosition(0, ElementsTable.GetPositionFromControl(Btn).Row).Tag.ToString();
        }