Esempio n. 1
0
 void WordsForm_FieldChanged(object sender, WordEditorFieldEventArgs e)
 {
     // Индекс поля в событии
     // Передаем событие в главное окно
     if (WordFieldChanged != null)
     {
         WordFieldChanged(this, e);
     }
 }
Esempio n. 2
0
 void WordsForm_ItemDoubleClick(object sender, WordEditorFieldEventArgs e)
 {
     for (int i = 0; i < wordsCount; i++)
     {
         if (i != e.Index)
         {
             fields[i].EndEdit();
         }
     }
 }
        private void StoreNewText()
        {
            ItemText = textBox1.Text;
            if (ItemText == "")
            {
                State = false;
            }
            textBox1.Visible = false;

            WordEditorFieldEventArgs ea = new WordEditorFieldEventArgs();

            ea.Index = this.index;
            ea.State = this.state;
            ea.Text  = this.itemText;
            if (FieldChanged != null)
            {
                FieldChanged(this, ea);
            }
        }
 private void WordEditorField_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (edit)
     {
         if (e.Button == MouseButtons.Left)
         {
             if (ItemDoubleClick != null)
             {
                 WordEditorFieldEventArgs ea = new WordEditorFieldEventArgs();
                 ea.Index = this.index;
                 ea.State = false;
                 ea.Text  = "";
                 ItemDoubleClick(this, ea);
             }
             textBox1.Text    = ItemText;
             textBox1.Visible = true;
             textBox1.Focus();
         }
     }
 }
        private void WordEditorField_MouseClick(object sender, MouseEventArgs e)
        {
            if (edit)
            {
                if (this.itemText != "")
                {
                    if (e.Button == System.Windows.Forms.MouseButtons.Right)
                    {
                        State = !state;

                        WordEditorFieldEventArgs ea = new WordEditorFieldEventArgs();
                        ea.Index = this.index;
                        ea.State = this.state;
                        ea.Text  = this.itemText;
                        if (FieldChanged != null)
                        {
                            FieldChanged(this, ea);
                        }
                    }
                }
            }
        }
Esempio n. 6
0
        void wf_WordFieldChanged(object sender, WordEditorFieldEventArgs e)
        {
            // Изменения в редакторе
            currentRound.SetAt(e.Text, e.State, e.Index);
            if (autosaveChangesToolStripMenuItem.Checked)
            {
                int sel = listBox1.SelectedIndex;

                if (sel >= 0)
                {
                    (listBox1.Items[sel] as REWRound).SetAt(e.Text, e.State, e.Index);
                }
            }

            RefreshWordForm();

            if (toolStripMenuItem4.Checked)
            {
                sp.Play();
            }

            Saved = false;
        }