private void buttonEdit_Click(object sender, EventArgs e)
 {
     var items = listViewMeas.SelectedItems;
     if (items.Count > 0)
     {
         using (var dialog = new TemplateItemDialog())
         {
             dialog.ShowDialog();
             if (dialog.DialogResult == DialogResult.OK)
             {
                 var pointClass = dialog.SelectedPointClass.ToString();
                 listViewMeas.SuspendLayout();
                 foreach (ListViewItem item in items)
                 {
                     item.SubItems[1].Text = pointClass;
                 }
                 listViewMeas.ResumeLayout();
             }
         }
     }
 }
Esempio n. 2
0
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            var items = listViewMeas.SelectedItems;

            if (items.Count > 0)
            {
                using (var dialog = new TemplateItemDialog())
                {
                    dialog.ShowDialog();
                    if (dialog.DialogResult == DialogResult.OK)
                    {
                        var pointClass = dialog.SelectedPointClass.ToString();
                        listViewMeas.SuspendLayout();
                        foreach (ListViewItem item in items)
                        {
                            item.SubItems[1].Text = pointClass;
                        }
                        listViewMeas.ResumeLayout();
                    }
                }
            }
        }