示例#1
0
        public static void VizualizeNewClientsSearchResult(ListBox listBox, Grid grid, TextBox textBox, IList <Client> list)
        {
            string        searchedText = textBox.Text.ToLower();
            List <Client> result       = new List <Client>();

            if (!string.IsNullOrEmpty(searchedText) && !searchedText.Equals("search by name"))
            {
                result = list.ToList().FindAll(item => item.Name.ToLower().Contains(searchedText));
            }
            else
            {
                result = new List <Client>(list);
            }

            ElementRenderer.VizualizeClientNamesToPanel(listBox, result);
        }
        public ClientsLibrary()
        {
            this.InitializeComponent();

            try
            {
                ElementRenderer.VizualizeClientNamesToPanel(this.ClientsListBox, App.Resources.Clients);
                clientInfoContainer = this.InfoAboutClientGrid;

                this.HideClientDescriptionImages();
                this.ShowBasketItemsToGrid();
            }
            catch (Exception)
            {
                new ApplicationProccessException();
            }
        }