2 using System.Collections;
3 using System.Collections.Generic;
4 using System.ComponentModel;
8 using System.Windows.Forms;
10 namespace Sample_Environment_Control_Interface.Dialogs.Associated_Files
26 InitializeComponent();
36 if (openFileDialog1.ShowDialog() == DialogResult.OK)
38 foreach (String filename
in openFileDialog1.FileNames)
40 lstFiles.Items.Add(filename);
52 ArrayList fails =
new ArrayList();
54 for (
int i = 0; i < lstFiles.Items.Count; ++i)
56 Boolean result = Seci.SeciInterface.Assoc_AddFile(
new Seci.AssociatedFile(lstFiles.Items[i].ToString()));
60 fails.Add(lstFiles.Items[i].ToString());
69 for (
int j = 0; j < fails.Count; ++j)
71 mess +=
"\t" + fails[j].ToString();
74 MessageBox.Show(
"The following associated files have already been added to the configuration:\n\n" + mess,
"Duplication!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
77 DialogResult = DialogResult.OK;
void btnOK_Click(object sender, EventArgs e)
void btnAdd_Click(object sender, EventArgs e)