示例#1
0
        private void LstbxROI_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Delete)
            {
                NowPreset.ROIs.Remove(NowPreset.ROIs.Find(x => x.Name == ROI_list[lstbxROI.SelectedIndex].ToString()));
                lstbxROI.BeginUpdate();
                ROI_list.Clear();
                NowPreset = presets.Find(x => x.PresetName == listbxPreset.SelectedItem.ToString());
                if (NowPreset.ROIs.Count != 0)
                {
                    ROI_list.AddRange(NowPreset.ROIs.Select(x => x.Name).ToArray());
                }
                lstbxROI.EndUpdate();

                NowPreset.SaveJson();
            }
        }
示例#2
0
 private void BtnSavePreset_Click(object sender, EventArgs e)
 {
     NowPreset.SaveJson();
 }