BioCore  5.0.0
A Windows .NET microscopy library and application for viewing, editing, and annotating images.
Loading...
Searching...
No Matches
Series.cs
Go to the documentation of this file.
1namespace BioCore
2{
3 public partial class Series : Form
4 {
5 public Series()
6 {
7 InitializeComponent();
9 }
10
12 public void UpdateItems()
13 {
14 imagesBox.Items.Clear();
15 foreach (BioImage item in Images.images)
16 {
17 imagesBox.Items.Add(item);
18 }
19 }
20
28 private void addBut_Click(object sender, EventArgs e)
29 {
30 if (imagesBox.SelectedIndices.Count == 0)
31 return;
32 foreach (BioImage item in imagesBox.SelectedItems)
33 {
34 seriesBox.Items.Add(item);
35 }
36 }
37
45 private void removeBut_Click(object sender, EventArgs e)
46 {
47 if (seriesBox.SelectedIndices.Count == 0)
48 return;
49 foreach (BioImage item in imagesBox.SelectedItems)
50 {
51 seriesBox.Items.Remove(item);
52 }
53 }
54
59 private void Series_Activated(object sender, EventArgs e)
60 {
62 }
63
70 private void saveOMEToolStripMenuItem_Click(object sender, EventArgs e)
71 {
72 if (saveFileDialog.ShowDialog() != DialogResult.OK)
73 return;
74 int i = 0;
75 List<BioImage> sts = new List<BioImage>();
76 foreach (BioImage item in seriesBox.Items)
77 {
78 sts.Add(item);
79 item.series = i;
80 i++;
81 }
82 BioImage.SaveOMESeries(sts.ToArray(), saveFileDialog.FileName, Properties.Settings.Default.Planes);
83 }
84
89 private void addAllBut_Click(object sender, EventArgs e)
90 {
91 foreach (BioImage item in imagesBox.Items)
92 {
93 seriesBox.Items.Add(item);
94 }
95 }
96
101 private void removeAllBut_Click(object sender, EventArgs e)
102 {
103 seriesBox.Items.Clear();
104 }
105
110 private void Series_FormClosing(object sender, FormClosingEventArgs e)
111 {
112 this.Hide();
113 e.Cancel = true;
114 }
115 }
116}
void UpdateItems()
It clears the listbox, then adds all the items in the Images class to the listbox.
Definition Series.cs:12