Пример #1
0
        private void CBClass_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            CBSubClass.Items.Clear();
            clearStatTextBlock();
            TBFeatExplanation.Text = null;
            CBFeats.Items.Clear();

            LBLSubClass.Visibility = Visibility.Visible;
            CBSubClass.Visibility  = Visibility.Visible;

            LBLSubClass.Content = BackendGenerators.getSubClassType(Convert.ToString(CBClass.SelectedValue));

            string temp = "";

            for (int i = 0; i < BackendGenerators.Classes[Convert.ToString(CBClass.SelectedValue)].Length; i++)
            {
                if (BackendGenerators.Classes[Convert.ToString(CBClass.SelectedValue)][i] == '|')
                {
                    CBSubClass.Items.Add(temp);
                    temp = null;
                }
                else
                {
                    temp += BackendGenerators.Classes[Convert.ToString(CBClass.SelectedValue)][i];
                }
            }
            CBSubClass.Items.Add(temp);
        }
Пример #2
0
        public MainWindow()
        {
            InitializeComponent();

            //intake all the info
            BackendGenerators.StartUp();

            //populate the combo boxes
            foreach (string i in BackendGenerators.Races.Keys)
            {
                CBRace.Items.Add(i);
            }
            foreach (string i in BackendGenerators.Classes.Keys)
            {
                CBClass.Items.Add(i);
            }
            foreach (string i in BackendGenerators.Backgrounds.Keys)
            {
                CBBackground.Items.Add(i);
            }
        }