Пример #1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FormScriptItem fsi = new FormScriptItem(new ScriptItem(), 0);

            fsi.SaveScriptItem += new FormScriptItem.SaveScriptItemDelegate(SaveNewScriptItem);
            fsi.ShowDialog(MainForm);
        }
Пример #2
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem item in listScripts.SelectedItems)
            {
                ScriptItem scr = new ScriptItem();

                scr.ScriptEvent  = item.Text;
                scr.Command      = item.SubItems[1].Text;
                scr.TextMatch    = item.SubItems[2].Text;
                scr.ChannelMatch = item.SubItems[3].Text;
                scr.Enabled      = item.Checked;

                FormScriptItem fi = new FormScriptItem(scr, item.Index);
                fi.SaveScriptItem += new FormScriptItem.SaveScriptItemDelegate(UpdateScriptItem);
                fi.ShowDialog(MainForm);
            }
        }
Пример #3
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem item in listScripts.SelectedItems)
            {
                ScriptItem scr = new ScriptItem();

                scr.ScriptEvent = item.Text;
                scr.Command = item.SubItems[1].Text;
                scr.TextMatch = item.SubItems[2].Text;
                scr.ChannelMatch = item.SubItems[3].Text;
                scr.Enabled = item.Checked;

                FormScriptItem fi = new FormScriptItem(scr, item.Index);
                fi.SaveScriptItem += new FormScriptItem.SaveScriptItemDelegate(UpdateScriptItem);
                fi.ShowDialog(MainForm);
            }
        }
Пример #4
0
 private void buttonAdd_Click(object sender, EventArgs e)
 {
     FormScriptItem fsi = new FormScriptItem(new ScriptItem(), 0);
     fsi.SaveScriptItem += new FormScriptItem.SaveScriptItemDelegate(SaveNewScriptItem);
     fsi.ShowDialog(MainForm);
 }