예제 #1
0
        private void nation_selector_SelectedIndexChanged(object sender, EventArgs e)
        {
            selected_nation = nation_selector.Text;
            nf     = new NationFactory();
            nation = nf.getNation(selected_nation);
            nation.setBgColor(g);
            vill = new Village();

            disappearingUnnecessaryRb();
        }
예제 #2
0
        public void setSavedVill(Village vill)
        {
            selected_nation = vill.nation;
            nf     = new NationFactory();
            nation = nf.getNation(selected_nation);
            nation.setBgColor(g);

            Label_villName.Text = vill.village_name;

            if (!(vill.trees_drawn is null))
            {
                foreach (Point p in vill.trees_drawn.ToList())
                {
                    selected_component = "tree";
                    drawInPanel(p);
                }
            }
            if (!(vill.houses_drawn is null))
            {
                foreach (Point p in vill.houses_drawn.ToList())
                {
                    selected_component = "house";
                    drawInPanel(p);
                }
            }
            if (!(vill.trees_drawn is null))
            {
                foreach (Point p in vill.rivers_drawn.ToList())
                {
                    selected_component = "water_source";
                    drawInPanel(p);
                }
            }

            disappearingUnnecessaryRb();
        }