Example #1
0
        private void storeRoundToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int sel = listBox1.SelectedIndex;

            if (sel >= 0)
            {
                //(listBox1.Items[sel] as REWRound).SetAt(e.Text, e.State, e.Index);
                for (int i = 0; i < WordCount; i++)
                {
                    (listBox1.Items[sel] as REWRound).SetAt(currentRound.GetTxtAt(i), currentRound.GetStateAt(i), i);
                }
            }
        }
Example #2
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int sel = listBox1.SelectedIndex;


            if ((sel >= 0) && (sel < listBox1.Items.Count))
            {
                wf.Edit = true;

                // Загрузка данных раунда
                REWRound rr = listBox1.Items[sel] as REWRound;

                for (int i = 0; i < WordCount; i++)
                {
                    currentRound.SetAt(rr.GetTxtAt(i), rr.GetStateAt(i), i);
                }
            }
            else
            {
                wf.Edit = false;

                // Очистка данных раунда
                for (int i = 0; i < WordCount; i++)
                {
                    currentRound.SetAt("", false, i);
                }
            }

            RefreshEditor();
            RefreshWordForm();
            oldSelected = sel;
        }