示例#1
0
        public void DisplayPictureConstructorTest()
        {
            PictureBox[]   pbPets = null; // TODO: Initialize to an appropriate value
            DisplayPicture target = new DisplayPicture(pbPets);

            Assert.IsNotNull(target);
        }
示例#2
0
        public void displayTest()
        {
            PictureBox[]   pbPets  = new PictureBox[] { new PictureBox() }; // TODO: Initialize to an appropriate value
            DisplayPicture target  = new DisplayPicture(pbPets);            // TODO: Initialize to an appropriate value
            List <Animal>  animals = new List <Animal>();

            string[] animalData = new string[] { "Spike", "Cat" };
            animals.Add(new Animal(animalData));
            target.display(animals);
        }
 public void UserLogin()
 {
     ulog = new UserLogin(driver);
     browserOps.Goto("https://uitesting.eb-test.site/");
     ulog.UserName.SendKeys("*****@*****.**");
     ulog.Password.SendKeys("Qwerty@123");
     ulog.LoginButton.Click();
     Console.WriteLine("Login Success");
     d = new DisplayPicture(driver);
     browserOps.UrlToBe("https://uitesting.eb-test.site/UserDashBoard");
 }
        public async Task <List <FindFanForReturnDto> > FindFanReturn(int userId)
        {
            var test1 = (from c in _context.Fan

                         join t in _context.UserLog
                         on c.IdFan equals t.IduserLog
                         where c.UserId == userId

                         select new
            {
                id_fan = c.IdFan,
                user_fullname = t.UserFullname,
                time_added = c.TimeAdded,
                photo_url = ""
            }).ToList();


            List <FindFanForReturnDto> fan_list = new List <FindFanForReturnDto>();

            foreach (var element in test1)
            {
                FindFanForReturnDto temporary = new FindFanForReturnDto();
                DisplayPicture      pic       = await _context.DisplayPicture.FirstOrDefaultAsync(i => i.UserId == element.id_fan);

                // String temp1 = await _context.DisplayPicture.ElementAtOrDefault().ToString();
                temporary.IduserLog = element.id_fan;
                if (pic == null)
                {
                    temporary.Url = "null";
                }
                else
                {
                    temporary.Url = pic.Url;
                }
                temporary.UserFullname = element.user_fullname;
                String   temp     = element.time_added.ToString();
                DateTime tempTime = Convert.ToDateTime(temp);
                temporary.Time = tempTime.ToString("MMMM").ToLower() + " " + tempTime.ToString("yyyy");

                fan_list.Add(temporary);
            }

            return(fan_list);
        }
示例#5
0
        //查看校历
        private void toolStripButton9_Click(object sender, EventArgs e)
        {
            DisplayPicture pi = new DisplayPicture();

            pi.ShowDialog();
        }