Ejemplo n.º 1
0
        private void ButtonAdd_Click(object sender, RoutedEventArgs e)
        {
            CRim      newitem = new CRim("", 383, 0);
            RimEditor geditor = new RimEditor(this.Title, newitem);

            if (geditor.ShowDialog() != true)
            {
                return;
            }
            data.rimlist.Add(newitem);
            ButtonSave.IsEnabled = true;
            LoadData();
        }
Ejemplo n.º 2
0
        private void ButtonModify_Click(object sender, RoutedEventArgs e)
        {
            if (listBox1.SelectedIndex == -1)
            {
                return;
            }
            RimEditor editor = new RimEditor(this.Title, (CRim)listBox1.SelectedItem);

            if (editor.ShowDialog() == true)
            {
                ButtonSave.IsEnabled = true;
            }
            listBox1.Items.Refresh();
        }