Beispiel #1
0
        /// <summary>
        /// Определяет размер параметра
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void editParameter_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems != null)
            {
                if (listView1.SelectedItems.Count > 0)
                {
                    ListViewItem selected = listView1.SelectedItems[0];
                    if (selected != null)
                    {
                        EditParameterForm frm = new EditParameterForm();
                        if (frm.ShowDialog(this) == DialogResult.OK)
                        {
                            selected.SubItems[0].Text = ((int)frm.numericUpDown1.Value).ToString();

                            if (selected.Tag != null)
                            {
                                if (selected.Tag is Parameter)
                                {
                                    Parameter parameter = selected.Tag as Parameter;
                                    parameter.Size = (int)frm.numericUpDown1.Value;
                                }
                            }
                        }
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Определяет размер параметра
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void editParameter_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems != null)
            {
                if (listView1.SelectedItems.Count > 0)
                {
                    ListViewItem selected = listView1.SelectedItems[0];
                    if (selected != null)
                    {
                        EditParameterForm frm = new EditParameterForm();
                        if (frm.ShowDialog(this) == DialogResult.OK)
                        {
                            selected.SubItems[0].Text = ((int)frm.numericUpDown1.Value).ToString();

                            if (selected.Tag != null)
                            {
                                if (selected.Tag is Parameter)
                                {
                                    Parameter parameter = selected.Tag as Parameter;
                                    parameter.Size = (int)frm.numericUpDown1.Value;
                                }
                            }
                        }
                    }
                }
            }
        }