public void AddButton_Click(object sender, RoutedEventArgs e)
        {
            RLSOptionsWindow dlg = new RLSOptionsWindow();

            dlg.ShowDialog();

            if (dlg.DialogResult.Value == true)
            {
                RLS rls = new RLS();
                rls.Set(ref dlg.rls_ui);
                rlsList.Add(rls);

                ListBoxItem lbi = new ListBoxItem();
                RLSList_Set(ref lbi, ref dlg);
                rlsListBox.Items.Add(lbi);
            }
        }
        public void OptionsButton_Click(object sender, RoutedEventArgs e)
        {
            RLSOptionsWindow dlg = new RLSOptionsWindow();

            dlg.rls_ui.Set(rlsList[rlsListBox.SelectedIndex]);

            dlg.ShowDialog();
            if (dlg.DialogResult.Value == true)
            {
                RLS rls = new RLS();
                rls.Set(ref dlg.rls_ui);
                rlsList[rlsListBox.SelectedIndex] = rls;

                ListBoxItem lbi = new ListBoxItem();
                RLSList_Set(ref lbi, ref dlg);
                int i = rlsListBox.SelectedIndex;
                rlsListBox.Items.RemoveAt(i);
                rlsListBox.Items.Insert(i, lbi);
            }
        }