Beispiel #1
0
        private void Account_Click(object sender, RoutedEventArgs e)
        {
            student = new DataStudent();
            var account = new AccountProfile();
            var data    = student.MyAccount();

            account.StudentName.Content = data[0];
            account.University.Content  = data[1];
            account.Institute.Content   = data[2];
            account.Kafedra.Content     = data[4];
            account.Show();
        }
Beispiel #2
0
        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            JobsStack.Children.RemoveRange(0, JobsStack.Children.Count);
            student = new DataStudent();
            student.Placement(SearchBox.Text);
            foreach (var items in PlacementJson.JsonPlacement.items)
            {
                string price;
                if (items.Salary == null)
                {
                    price = null;
                }
                else if (items.Salary.To == null)
                {
                    price = items.Salary.From + " " + items.Salary.Currency;
                }
                else
                {
                    price = "from " + items.Salary.From + "-" +
                            items.Salary.To.ToString() + "." +
                            items.Salary.Currency;
                }



                #region instance
                //var BlockProfession = new TextBlock()
                //{
                //    Foreground = Brushes.DarkBlue,
                //    Text = items.Name
                //};
                //var BlockCompany = new TextBlock()
                //{
                //    Foreground = Brushes.Black,
                //    Text = items.Employer.Name
                //};
                //var BlockArea = new TextBlock()
                //{
                //    Foreground = Brushes.Black,
                //    Text = items.area.Name
                //};
                //var BlockMoney = new TextBlock()
                //{
                //    Foreground = Brushes.Black,
                //    Text = items.Salary.From + " " + items.Salary.To
                //};
                #endregion
                var infoJobs = new List <TextBlock>();

                infoJobs.Add(new TextBlock()
                {
                    // Element money
                    Foreground = Brushes.Black,
                    Text       = price,
                    Margin     = new Thickness(800, 5, 5, 5),
                    FontSize   = 15
                });
                infoJobs.Add(new TextBlock()
                {
                    // Element name of region
                    Foreground = Brushes.Black,
                    Text       = items.area.Name
                });
                infoJobs.Add(new TextBlock()
                {
                    // Element name of company
                    Foreground = Brushes.Black,
                    Text       = items.Employer.Name
                });
                infoJobs.Add(new TextBlock()
                {
                    // Element Profession
                    Foreground = Brushes.DarkBlue,
                    Text       = items.Name
                });
                infoJobs.Reverse();
                var stackPanel = new StackPanel();
                for (int i = 0; i < infoJobs.Count; i++)
                {
                    stackPanel.Children.Add(infoJobs[i]);
                }

                var listView = new ListViewItem();
                listView.Content    = stackPanel;
                listView.Background = Brushes.DarkGray;
                listView.Margin     = new Thickness(5);
                listView.Uid        = items.Id.ToString();
                listView.PreviewMouseLeftButtonUp += ListViewItem_Click;


                JobsStack.Children.Add(listView);
            }
        }