Пример #1
0
 private void NavigateToCompany(ShoppingCompanyUI company)
 {
     _currentCompany = company;
     Branch.Remove(_companiesBranch);
     Branch.Add(_currentCompany.Branch);
     Branch.Add(_return);
     _isSelectingCompany = false;
 }
Пример #2
0
        public ShoppingApp()
        {
            Branch           = new ClickUIBranch("Item App", (int)ClickUIPriorities.Pad);
            _companiesBranch = new ClickUIBranch("Companies", (int)ClickUIPriorities.Pad);
            Branch.Add(_companiesBranch);

            for (var i = 0; i < _companies.Count; i++)
            {
                var company   = _companies[i];
                var companyUI = new ShoppingCompanyUI(company);
                var option    = new ShoppingCompanyOptionUI(company, i, () => NavigateToCompany(companyUI));
                _companyOptionUIs.Add(option);
                _companiesBranch.Add(option.Branch);
            }
            _return = ImageTextButtonFactory.Create("Return", new Vector2(1000, 625), NavigateToCompanySelection);
        }