public override string getMyHtmlContent()
 {
     radioEdit form = new radioEdit();
     form.ShowDialog();
     string html = "<label style='font-size:12;font-weight:bold'>" + form.title.Text + "</label><br/><br/><textarea id='txt_"+new Random().Next().ToString()+"' style='width:90%;height:300px' ></textarea>";
     return html;
 }
Example #2
0
        private void listView1_DoubleClick(object sender, EventArgs e)
        {
            int idx = listView1.SelectedItems.Count;

            if (idx <= 0)
            {
                return;
            }

            radioEdit form = new radioEdit();

            form.title.Text = listView1.SelectedItems[0].Text;

            if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.title.Text.Equals(""))
                {
                    MessageBox.Show("请正确填写选项名称");
                    return;
                }
                for (int i = 0; i < listView1.Items.Count; i++)
                {
                    if (listView1.Items[i].Text.Equals(form.title.Text))
                    {
                        MessageBox.Show("对象已经存在请正确填写");
                        return;
                    }
                }
                listView1.SelectedItems[0].Text = form.title.Text;
            }
        }
Example #3
0
        public override string getMyHtmlContent()
        {
            radioEdit form = new radioEdit();

            form.ShowDialog();
            string html = "<label style='font-size:12;font-weight:bold'>" + form.title.Text + "</label><br/><br/><textarea id='txt_" + new Random().Next().ToString() + "' style='width:90%;height:300px' ></textarea>";

            return(html);
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            radioEdit form = new radioEdit();

            if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.title.Text.Equals(""))
                {
                    MessageBox.Show("请正确填写选项名称");
                    return;
                }
                for (int i = 0; i < listView1.Items.Count; i++)
                {
                    if (listView1.Items[i].Text.Equals(form.title.Text))
                    {
                        MessageBox.Show("对象已经存在请正确填写");
                        return;
                    }
                }
                ListViewItem item = new ListViewItem(form.title.Text);
                listView1.Items.Add(item);
            }
        }
        private void listView1_DoubleClick(object sender, EventArgs e)
        {
            int idx = listView1.SelectedItems.Count;
            if (idx <= 0)
                return;

            radioEdit form = new radioEdit();
            form.title.Text = listView1.SelectedItems[0].Text;

            if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.title.Text.Equals(""))
                {
                    MessageBox.Show("请正确填写选项名称");
                    return;
                }
                for (int i = 0; i < listView1.Items.Count; i++)
                {
                    if (listView1.Items[i].Text.Equals(form.title.Text))
                    {
                        MessageBox.Show("对象已经存在请正确填写");
                        return;
                    }
                }
                listView1.SelectedItems[0].Text = form.title.Text;

            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            radioEdit form = new radioEdit();

            if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.title.Text.Equals(""))
                {
                    MessageBox.Show("请正确填写选项名称");
                    return;
                }
                for (int i = 0; i < listView1.Items.Count; i++)
                {
                    if (listView1.Items[i].Text.Equals(form.title.Text))
                    {
                        MessageBox.Show("对象已经存在请正确填写");
                        return;
                    }
                }
                ListViewItem item = new ListViewItem(form.title.Text);
                listView1.Items.Add(item);
            }
        }