2 using System.Collections.Generic;
3 using System.ComponentModel;
8 using System.Windows.Forms;
10 namespace SeciUserInterface.Dialogs.Blocks
14 public List<String> Order =
new List<string>();
18 InitializeComponent();
28 lstGroups.Items.Clear();
29 for (
int i = 0; i < Order.Count; ++i)
31 lstGroups.Items.Add(Order[i]);
37 DialogResult = System.Windows.Forms.DialogResult.OK;
48 if (lstGroups.SelectedIndex != -1 && lstGroups.SelectedIndex > 0)
50 string temp = Order[lstGroups.SelectedIndex - 1];
51 Order.RemoveAt(lstGroups.SelectedIndex - 1);
52 Order.Insert(lstGroups.SelectedIndex, temp);
53 int index = lstGroups.SelectedIndex;
55 lstGroups.SelectedIndex = index - 1;
61 if (lstGroups.SelectedIndex != -1 && lstGroups.SelectedIndex < Order.Count - 1)
63 string temp = Order[lstGroups.SelectedIndex + 1];
64 Order.RemoveAt(lstGroups.SelectedIndex + 1);
65 Order.Insert(lstGroups.SelectedIndex, temp);
66 int index = lstGroups.SelectedIndex;
68 lstGroups.SelectedIndex = index + 1;
void btnOK_Click(object sender, EventArgs e)
void btnCancel_Click(object sender, EventArgs e)
void btnDown_Click(object sender, EventArgs e)
void OrderGroups_Load(object sender, EventArgs e)
void btnUp_Click(object sender, EventArgs e)