public ActionResult GoldStar(int?pId, string status)
        {
            var GS = db.GoldStar.ToList();

            foreach (var item in GS)
            {
                item.StarActive = false;
            }

            GoldStar newGS = db.GoldStar.FirstOrDefault(x => x.ProjectId == pId);

            if (status == "true")
            {
                newGS.StarActive = false;
            }
            else
            {
                newGS.StarActive = true;
            }

            db.Entry(newGS).State = EntityState.Modified;

            db.SaveChanges();

            return(PartialView(""));
        }
예제 #2
0
        private static Shape CreateStar()
        {
            Shape result = new GoldStar();

            Logger.Log("Одинчка: Создан новый синглтон");

            return(result);
        }
예제 #3
0
        private static GoldStar CreateStar()
        {
            GoldStar result = new GoldStar();

            Logger.Log("Одиночка: Создан новый синглтон");

            return(result);
        }
예제 #4
0
        public void AnimateScale(GoldStar star, double toScale)
        {
            DoubleAnimation animation = new DoubleAnimation(toScale, TimeSpan.FromSeconds(1))
            {
                EasingFunction = new CubicEase()
                {
                    EasingMode = EasingMode.EaseInOut
                }
            };
            ScaleTransform transform = star.RenderTransform as ScaleTransform;

            transform.BeginAnimation(ScaleTransform.ScaleXProperty, animation);
            transform.BeginAnimation(ScaleTransform.ScaleYProperty, animation);
        }
 public ActionResult Create([Bind(Include = "Id,ProjectName,FS,G0,RDB,G1,R2,G2,R3,R4,G3,R5,R7,R8,G4,END,Status,KPI,Comment,CategoryId,GateKeeperId,ProjectmanagerId")] Projects projects)
 {
     if (ModelState.IsValid)
     {
         GoldStar gs = new GoldStar();
         gs.StarActive = false;
         db.GoldStar.Add(gs);
         projects.GoldStar = gs;
         Projectmanagers projectManagerSession = (Projectmanagers)Session["projectManager"];
         projects.ProjectmanagerId = projectManagerSession.ID;
         projects.Status           = "#81c784";
         db.Projects.Add(projects);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CategoryId       = new SelectList(db.Categories, "Id", "Name", projects.CategoryId);
     ViewBag.GateKeeperId     = new SelectList(db.GateKeepers, "Id", "Name", projects.GateKeeperId);
     ViewBag.ProjectmanagerId = new SelectList(db.Projectmanagers, "ID", "Name", projects.ProjectmanagerId);
     return(View(projects));
 }
예제 #6
0
파일: ProtoStar.cs 프로젝트: Leikocid/oop2
 public ProtoStar(GoldStar star) : base(star)
 {
 }
예제 #7
0
파일: ProtoStar.cs 프로젝트: Leikocid/oop2
 public override void Younger(GoldStar star)
 {
 }
예제 #8
0
파일: ProtoStar.cs 프로젝트: Leikocid/oop2
 public override void AnimateNewState(GoldStar star)
 {
     AnimateBlur(star, star.Height * 0.2);
     AnimateScale(star, 1.2);
     AnimateColor(star, Colors.Orange);
 }
예제 #9
0
 public abstract void Older(GoldStar star);
예제 #10
0
파일: ProtoStar.cs 프로젝트: Leikocid/oop2
        public override void Older(GoldStar star)
        {
            Logger.Log("Состояние: переход в Golden.");

            star.State = new Golden(star);
        }
예제 #11
0
 public abstract void AnimateNewState(GoldStar star);
예제 #12
0
 public BlackDwarf(GoldStar star) : base(star)
 {
 }
예제 #13
0
 public WhiteDwarf(GoldStar star) : base(star)
 {
 }
예제 #14
0
파일: Golden.cs 프로젝트: Leikocid/oop2
 public override void AnimateNewState(GoldStar star)
 {
     AnimateBlur(star, 0);
     AnimateScale(star, 1);
     AnimateColor(star, Colors.LightYellow);
 }
예제 #15
0
 public RedGiant(GoldStar star) : base(star)
 {
 }
예제 #16
0
        public override void Younger(GoldStar star)
        {
            Logger.Log("Состояние: переход в RedGiant.");

            star.State = new RedGiant(star);
        }
예제 #17
0
 public void AnimateColor(GoldStar star, Color toColor)
 {
     star.Fill.BeginAnimation(SolidColorBrush.ColorProperty, new ColorAnimation(toColor, TimeSpan.FromSeconds(1)));
 }
예제 #18
0
 public void AnimateBlur(GoldStar star, double toRadius)
 {
     (star.Effect as BlurEffect).BeginAnimation(BlurEffect.RadiusProperty, new DoubleAnimation(toRadius, TimeSpan.FromSeconds(1)));
 }
예제 #19
0
 public abstract void Younger(GoldStar star);
예제 #20
0
파일: Golden.cs 프로젝트: Leikocid/oop2
 public Golden(GoldStar star) : base(star)
 {
 }
예제 #21
0
 public override void AnimateNewState(GoldStar star)
 {
     AnimateBlur(star, 0);
     AnimateScale(star, 0.2);
     AnimateColor(star, Colors.Black);
 }
예제 #22
0
        public override void Older(GoldStar star)
        {
            Logger.Log("Состояние: переход в BlackDwarf.");

            star.State = new BlackDwarf(star);
        }
예제 #23
0
 public AbstractStarState(GoldStar star)
 {
     AnimateNewState(star);
 }
예제 #24
0
 public override void AnimateNewState(GoldStar star)
 {
     AnimateBlur(star, 0);
     AnimateScale(star, 0.5);
     AnimateColor(star, Colors.White);
 }
예제 #25
0
 public override void Older(GoldStar star)
 {
 }
예제 #26
0
        public override void Younger(GoldStar star)
        {
            Logger.Log("Состояние: переход в WhiteDwarf.");

            star.State = new WhiteDwarf(star);
        }
예제 #27
0
파일: Golden.cs 프로젝트: Leikocid/oop2
        public override void Younger(GoldStar star)
        {
            Logger.Log("Состояние: переход в ProtoStar.");

            star.State = new ProtoStar(star);
        }