2using System.Collections.Generic;
3using System.ComponentModel;
8using System.Threading.Tasks;
9using System.Windows.Forms;
13 public partial class Series : Form
17 InitializeComponent();
24 imagesBox.Items.Clear();
25 foreach (
BioImage item
in Images.images)
27 imagesBox.Items.Add(item);
38 private void addBut_Click(
object sender, EventArgs e)
40 if (imagesBox.SelectedIndices.Count == 0)
42 foreach (
BioImage item
in imagesBox.SelectedItems)
44 seriesBox.Items.Add(item);
53 private void removeBut_Click(
object sender, EventArgs e)
55 if (seriesBox.SelectedIndices.Count == 0)
57 foreach (
BioImage item
in imagesBox.SelectedItems)
59 seriesBox.Items.Remove(item);
67 private void Series_Activated(
object sender, EventArgs e)
72 private void saveOMEToolStripMenuItem_Click(
object sender, EventArgs e)
74 if (saveFileDialog.ShowDialog() != DialogResult.OK)
77 List<BioImage> sts =
new List<BioImage>();
78 foreach (
BioImage item
in seriesBox.Items)
84 BioImage.SaveOMESeries(sts.ToArray() , saveFileDialog.FileName, Properties.Settings.Default.Planes);
87 private void addAllBut_Click(
object sender, EventArgs e)
89 foreach (
BioImage item
in imagesBox.Items)
91 seriesBox.Items.Add(item);
95 private void removeAllBut_Click(
object sender, EventArgs e)
97 seriesBox.Items.Clear();
100 private void Series_FormClosing(
object sender, FormClosingEventArgs e)
void UpdateItems()
It clears the listbox and then adds all the items in the Images class to the listbox.