public void SetChoices(BaseStructure structure1, BaseStructure structure2) { CurrentSelectionModeState = SelectionMode.Double; towerType1 = structure1.GetType(); towerType2 = structure2.GetType(); StructureChoice1.DisplayChoice(structure1); StructureChoice2.DisplayChoice(structure2); StructureChoice1.HasEvents = true; StructureChoice1.ExposeChildrenEvents = false; StructureChoice2.HasEvents = true; StructureChoice2.ExposeChildrenEvents = false; structure1.X = StructureChoice1.X; structure1.Y = StructureChoice1.Y - 260; structure1.Z = 2; structure1.IsBeingPlaced = false; structure2.X = StructureChoice2.X; structure2.Y = StructureChoice2.Y - 260; structure2.Z = 2; structure2.IsBeingPlaced = false; StructureChoice1.Click += StructureChoice1_Click; StructureChoice2.Click += StructureChoice2_Click; ConfirmButton.Click += (unused) => ConfirmTowerSelection?.Invoke(this); }
public void SetOnlyChoice(BaseStructure structure1) { CurrentSelectionModeState = SelectionMode.Single; towerType1 = structure1.GetType(); StructureTypeChosen = towerType1; StructureChoice1.DisplayChoice(structure1); StructureChoice1.HasEvents = false; StructureChoice1.ExposeChildrenEvents = false; structure1.X = StructureChoice1.X; structure1.Y = StructureChoice1.Y - 260; structure1.Z = 2; structure1.IsBeingPlaced = false; ConfirmButton.Click += (unused) => ConfirmTowerSelection?.Invoke(this); ConfirmButton.Visible = true; }