コード例 #1
0
 private void itemAdd_Click(object sender, EventArgs e)
 {
     using (frmAddRange frmadd = new frmAddRange("Add range"))
     {
         if (frmadd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             FixedRanges.Add(frmadd.Range);
         }
     }
 }
コード例 #2
0
 private void EditRange()
 {
     if (listView1.SelectedItems.Count == 1)
     {
         int[] Range = ReadSelectedRange();
         using (frmAddRange EditRange = new frmAddRange("Edit range", Range))
         {
             if (EditRange.ShowDialog() == System.Windows.Forms.DialogResult.OK)
             {
                 this.FixedRanges.Remove(Range);
                 this.FixedRanges.Add(EditRange.Range);
             }
         }
     }
 }