private SectorUC GenerateSector(int xIndex, int yIndex) { SectorUC current = new SectorUC(); current.XIndex = xIndex; current.YIndex = yIndex; current.Dock = DockStyle.Fill; current.Width = 30; current.Height = 30; current.Margin = new System.Windows.Forms.Padding(0); current.SectorClicked += new EventHandler <SectorUC.SectorClickEventArgs>(sectorUC_SectorClicked); current.FlagImage = Properties.Resources._1399253824_Flag_red; current.MineImage = Properties.Resources.mine; current.TabStop = false; //current.UnrevealedSectorColor = Color.Black; return(current); }
private void ShowFlag(int x, int y) { SectorUC sector = FindSecctorByIndex(x, y); sector.Mark(); }