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("")); }
private static Shape CreateStar() { Shape result = new GoldStar(); Logger.Log("Одинчка: Создан новый синглтон"); return(result); }
private static GoldStar CreateStar() { GoldStar result = new GoldStar(); Logger.Log("Одиночка: Создан новый синглтон"); return(result); }
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)); }
public ProtoStar(GoldStar star) : base(star) { }
public override void Younger(GoldStar star) { }
public override void AnimateNewState(GoldStar star) { AnimateBlur(star, star.Height * 0.2); AnimateScale(star, 1.2); AnimateColor(star, Colors.Orange); }
public abstract void Older(GoldStar star);
public override void Older(GoldStar star) { Logger.Log("Состояние: переход в Golden."); star.State = new Golden(star); }
public abstract void AnimateNewState(GoldStar star);
public BlackDwarf(GoldStar star) : base(star) { }
public WhiteDwarf(GoldStar star) : base(star) { }
public override void AnimateNewState(GoldStar star) { AnimateBlur(star, 0); AnimateScale(star, 1); AnimateColor(star, Colors.LightYellow); }
public RedGiant(GoldStar star) : base(star) { }
public override void Younger(GoldStar star) { Logger.Log("Состояние: переход в RedGiant."); star.State = new RedGiant(star); }
public void AnimateColor(GoldStar star, Color toColor) { star.Fill.BeginAnimation(SolidColorBrush.ColorProperty, new ColorAnimation(toColor, TimeSpan.FromSeconds(1))); }
public void AnimateBlur(GoldStar star, double toRadius) { (star.Effect as BlurEffect).BeginAnimation(BlurEffect.RadiusProperty, new DoubleAnimation(toRadius, TimeSpan.FromSeconds(1))); }
public abstract void Younger(GoldStar star);
public Golden(GoldStar star) : base(star) { }
public override void AnimateNewState(GoldStar star) { AnimateBlur(star, 0); AnimateScale(star, 0.2); AnimateColor(star, Colors.Black); }
public override void Older(GoldStar star) { Logger.Log("Состояние: переход в BlackDwarf."); star.State = new BlackDwarf(star); }
public AbstractStarState(GoldStar star) { AnimateNewState(star); }
public override void AnimateNewState(GoldStar star) { AnimateBlur(star, 0); AnimateScale(star, 0.5); AnimateColor(star, Colors.White); }
public override void Older(GoldStar star) { }
public override void Younger(GoldStar star) { Logger.Log("Состояние: переход в WhiteDwarf."); star.State = new WhiteDwarf(star); }
public override void Younger(GoldStar star) { Logger.Log("Состояние: переход в ProtoStar."); star.State = new ProtoStar(star); }