2 using System.Collections.Generic;
3 using System.ComponentModel;
7 using System.Windows.Forms;
9 namespace SeciUserInterface.Dialogs.AssocFiles
18 InitializeComponent();
23 List<String> conf =
new List<string>(Seci.Managers.AssocFileMgr.GetListOfAsscFiles(
false));
24 List<String> comp =
new List<string>(Seci.Managers.AssocFileMgr.GetListOfComponentAsscFiles());
26 for (
int i = 0; i < conf.Count; ++i)
28 lstProgs.Items.Add(conf[i]);
31 for (
int i = 0; i < comp.Count; ++i)
33 lstSubs.Items.Add(comp[i]);
39 if (lstProgs.SelectedIndex != -1)
41 lstToRemove.Items.Add(lstProgs.SelectedItem);
42 lstProgs.Items.RemoveAt(lstProgs.SelectedIndex);
48 if (lstToRemove.SelectedIndex != -1)
50 lstProgs.Items.Add(lstToRemove.SelectedItem);
51 lstToRemove.Items.RemoveAt(lstToRemove.SelectedIndex);
57 if (lstToRemove.Items.Count > 0)
60 toRemove =
new String[lstToRemove.Items.Count];
62 for (
int i = 0; i < lstToRemove.Items.Count; ++i)
64 toRemove[i] = lstToRemove.Items[i].ToString();
72 for (
int i = 0; i < toRemove.GetLength(0); ++i)
74 Seci.Managers.AssocFileMgr.RemoveFile(toRemove[i]);
78 DialogResult = DialogResult.OK;
void btnUndo_Click(object sender, EventArgs e)
void RemoveExe_Load(object sender, EventArgs e)
void btnOK_Click(object sender, EventArgs e)
void btnRemove_Click(object sender, EventArgs e)