예제 #1
0
        public FormIgra(IgraZvj igra)
        {
            InitializeComponent();

            this.igra = igra;
            igrac     = igra.trenutniIgrac();

            this.frmFlotaPokret = new FormFlotaPokret(this);
            this.AddOwnedForm(frmFlotaPokret);

            pomakPogleda       = null;
            prikazMape         = new PrikazMape(igra);
            this.picMapa.Image = prikazMape.slikaMape;

            tabCtrlDesno.ImageList           = new ImageList();
            tabCtrlDesno.ImageList.ImageSize = new Size(32, 32);
            tabCtrlDesno.ImageList.Images.Add(new Bitmap(1, 1));
            tabCtrlDesno.ImageList.Images.Add(Slike.PlanetTab[Planet.Tip.ASTEROIDI][0].image);
            tabCtrlDesno.ImageList.Images.Add(Slike.FlotaTab);
            tabPageZvijezda.ImageIndex = 0;
            tabPageKolonija.ImageIndex = 1;
            tabPageFlote.ImageIndex    = 2;

            //listViewPlaneti.LargeImageList = new ImageList();
            //listViewPlaneti.LargeImageList.ImageSize = new Size(32, 32);
            //Image[] planetImages = new Image[Slike.PlanetImageIndex.Count];
            //foreach (Image img in Slike.PlanetImageIndex.Keys)
            //	planetImages[Slike.PlanetImageIndex[img]] = img;
            //listViewPlaneti.LargeImageList.Images.AddRange(planetImages);

            btnCivilnaGradnja.Text = "";
            btnVojnaGradnja.Text   = "";

            tvFlota.ImageList           = new ImageList();
            tvFlota.ImageList.ImageSize = new Size(20, 20);
            postaviJezik();
            postaviAkcijeBroda();

            for (int i = 0; i < 15; i++)
            {
                BriefPlanetItem planetInfo = new BriefPlanetItem();
                planetInfo.Click += this.listViewPlaneti_Click;

                planetInfoi[i] = planetInfo;
                planetiFlowPanel.Controls.Add(planetInfo);
            }

            this.Font = Postavke.FontSucelja(this.Font);
        }
예제 #2
0
        private void listViewPlaneti_Click(object sender, EventArgs e)
        {
            BriefPlanetItem planetInfo = sender as BriefPlanetItem;

            odaberiPlanet(planetInfo.Planet, true);
        }