Пример #1
0
        public MainWindow(User user)
        {
            InitializeComponent();
            User           = user;
            this.Title     = "Hello " + user.Firstname + " " + user.Lastname;
            firstname.Text = user.Firstname;
            lastname.Text  = user.Lastname;
            email.Text     = user.Email;
            username.Text  = user.Username;
            var nameList = TestsController.GetServiceName();
            var listSize = nameList.Count;
            var newItem  = new ListItem();

            foreach (var item in nameList)
            {
                if (!string.IsNullOrWhiteSpace(item))
                {
                    newItem       = new ListItem();
                    newItem.Text  = item;
                    newItem.Value = item;
                    servicenameList.Items.Add(newItem);
                }
            }
        }