public UINominationSelectContainer(NhoodCandidateList candidates, bool nonPerson) { NonPerson = nonPerson; var ui = RenderScript("fsodonatorlist.uis"); var listBg = ui.Create <UIImage>("ListBoxBackground"); AddAt(0, listBg); listBg.With9Slice(25, 25, 25, 25); listBg.Width += 110; listBg.Height += 50; RoommateListSlider.AttachButtons(RoommateListScrollUpButton, RoommateScrollDownButton, 1); RoommateListBox.AttachSlider(RoommateListSlider); RoommateListBox.Columns[1].Alignment = Framework.TextAlignment.Left | Framework.TextAlignment.Middle; DonatorsLabel.Caption = "Search"; DonatorsLabel.CaptionStyle = DonatorsLabel.CaptionStyle.Clone(); DonatorsLabel.CaptionStyle.Shadow = true; DonatorsLabel.Y -= 26; foreach (var child in GetChildren()) { child.Y -= 45; } SearchBox = new UITextBox(); SearchBox.X = RoommateListBox.X; SearchBox.Y = 20; SearchBox.SetSize(listBg.Width, 25); SearchBox.OnChange += SearchBox_OnChange; Add(SearchBox); Candidates = candidates; UpdateCandidateList(candidates); }
public UINominationSelectContainer(NhoodCandidateList candidates) { var ui = RenderScript("fsodonatorlist.uis"); var listBg = ui.Create <UIImage>("ListBoxBackground"); AddAt(0, listBg); listBg.With9Slice(25, 25, 25, 25); listBg.Width += 110; listBg.Height += 50; /* * Dropdown = ui.Create<UIInboxDropdown>("PullDownMenuSetup"); * Dropdown.OnSearch += (query) => * { * FindController<GenericSearchController>()?.Search(query, false, (results) => * { * Dropdown.SetResults(results); * }); * }; * Dropdown.OnSelect += AddDonator; * Add(Dropdown);*/ RoommateListSlider.AttachButtons(RoommateListScrollUpButton, RoommateScrollDownButton, 1); RoommateListBox.AttachSlider(RoommateListSlider); RoommateListBox.Columns[1].Alignment = Framework.TextAlignment.Left | Framework.TextAlignment.Middle; DonatorsLabel.Caption = "Search"; DonatorsLabel.CaptionStyle = DonatorsLabel.CaptionStyle.Clone(); DonatorsLabel.CaptionStyle.Shadow = true; DonatorsLabel.Y -= 26; foreach (var child in GetChildren()) { child.Y -= 45; } SearchBox = new UITextBox(); SearchBox.X = RoommateListBox.X; SearchBox.Y = 20; SearchBox.SetSize(listBg.Width, 25); SearchBox.OnChange += SearchBox_OnChange; Add(SearchBox); Candidates = candidates; UpdateCandidateList(candidates); }
//listbox //smallThumb | avatarName | buildCheckbox | deleteButton public UIManageDonatorDialog(UILotControl lotControl) : base(UIDialogStyle.Standard | UIDialogStyle.OK, true) { this.LotControl = lotControl; Community = lotControl.vm.TSOState.CommunityLot; BuildIcon = new UIImage(); var ui = RenderScript("fsodonatorlist.uis"); var listBg = ui.Create <UIImage>("ListBoxBackground"); AddAt(4, listBg); listBg.With9Slice(25, 25, 25, 25); listBg.Width += 110; listBg.Height += 50; Dropdown = ui.Create <UIInboxDropdown>("PullDownMenuSetup"); Dropdown.OnSearch += (query) => { FindController <GenericSearchController>()?.Search(query, false, (results) => { Dropdown.SetResults(results); }); }; Dropdown.OnSelect += AddDonator; Add(Dropdown); RoommateListSlider.AttachButtons(RoommateListScrollUpButton, RoommateScrollDownButton, 1); RoommateListBox.AttachSlider(RoommateListSlider); RoommateListBox.Columns[1].Alignment = Framework.TextAlignment.Left | Framework.TextAlignment.Middle; Caption = GameFacade.Strings.GetString("f114", (Community)?"6":"12"); SetSize(405, 400); DonatorsLabel.CaptionStyle = DonatorsLabel.CaptionStyle.Clone(); DonatorsLabel.CaptionStyle.Shadow = true; DonatorsLabel.Caption = GameFacade.Strings.GetString("f114", (Community) ? "5" : "13"); AddAt(5, BuildIcon); var ctr = ControllerUtils.BindController <GenericSearchController>(this); UpdateDonatorList(); OKButton.OnButtonClick += (btn) => { UIScreen.RemoveDialog(this); }; }