private void Button_Click_1(object sender, RoutedEventArgs e)
        {
ask:
            OneFieldInputView_Dialog ofiv = new OneFieldInputView_Dialog();

            if (ofiv.ShowDialog(LocalizationManager.Current.Simulation["Flags"]["Flag_ID"], LocalizationManager.Current.Simulation["Flags"]["Flag_Remove"]) == true)
            {
                if (ushort.TryParse(ofiv.Value, out ushort flagID))
                {
                    if (Flags.Remove(flagID))
                    {
                        list.Items.Clear();

                        foreach (var f in Flags)
                        {
                            list.Items.Add(f);
                        }
                    }
                }
                else
                {
                    goto ask;
                }
            }
        }
Esempio n. 2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
ask:
            OneFieldInputView_Dialog ofiv = new OneFieldInputView_Dialog();

            if (ofiv.ShowDialog(LocalizationManager.Current.Simulation["Quests"]["Quest_ID"], LocalizationManager.Current.Simulation["Quests"]["Quest_Add"]) == true)
            {
                if (ushort.TryParse(ofiv.Value, out ushort flagID))
                {
                    if (Quests.Add(flagID))
                    {
                        list.Items.Add(flagID);
                    }
                }
                else
                {
                    goto ask;
                }
            }
        }