public ActionResult DeleteConfirmed(int id)
        {
            SuspendedState suspendedstate = db.SuspendedStates.Find(id);

            db.GPAStates.Remove(suspendedstate);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public PicoDebuggerController(DebuggablePlatform platform)
     : base(platform)
 {
     _notLoadedIState = new PicoNotLoadedState(this);
     // No picoComputer specific stuff in suspended state.
     _suspendedIState = new SuspendedState(this);
     _runningIState   = new PicoRunningState(this);
 }
 public ActionResult Edit(SuspendedState suspendedstate)
 {
     if (ModelState.IsValid)
     {
         db.Entry(suspendedstate).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(suspendedstate));
 }
        //
        // GET: /SuspendedState/Edit/5

        public ActionResult Edit(int id = 0)
        {
            SuspendedState suspendedstate = (SuspendedState)db.GPAStates.Find(id);

            if (suspendedstate == null)
            {
                return(HttpNotFound());
            }
            return(View(suspendedstate));
        }
        //
        // GET: /SuspendedState/Delete/5

        public ActionResult Delete(int id = 0)
        {
            SuspendedState suspendedstate = db.SuspendedStates.Find(id);

            if (suspendedstate == null)
            {
                return(HttpNotFound());
            }
            return(View(suspendedstate));
        }
 public ActionResult Edit([Bind(Include = "GradePointStateId,LowerLimit,UpperLimit,TuitionRateFactor")] SuspendedState suspendedState)
 {
     if (ModelState.IsValid)
     {
         db.Entry(suspendedState).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(suspendedState));
 }
        public ActionResult Create(SuspendedState suspendedstate)
        {
            if (ModelState.IsValid)
            {
                db.GPAStates.Add(suspendedstate);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(suspendedstate));
        }
        public ActionResult Create([Bind(Include = "GradePointStateId,LowerLimit,UpperLimit,TuitionRateFactor")] SuspendedState suspendedState)
        {
            if (ModelState.IsValid)
            {
                db.SuspendedStates.Add(suspendedState);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(suspendedState));
        }
        // GET: SuspendedStates/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SuspendedState suspendedState = db.SuspendedStates.Find(id);

            if (suspendedState == null)
            {
                return(HttpNotFound());
            }
            return(View(suspendedState));
        }
Example #10
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Parameterized.Parameters(name = "From {0} and {1} to {2} should end in {3}") public static Iterable<Object[]> data()
        public static IEnumerable <object[]> Data()
        {
            IList <object[]> @params = new List <object[]>();

            foreach (LifeCycleState lifeCycleState in LifeCycleState.values())
            {
                foreach (SuspendedState suspendedState in SuspendedState.values())
                {
                    foreach (SuspendedState toSuspendedState in toSuspendedState())
                    {
                        @params.Add(new object[] { lifeCycleState, suspendedState, toSuspendedState, ExpectedResult(lifeCycleState, suspendedState, toSuspendedState) });
                    }
                }
            }
            return(@params);
        }
Example #11
0
 private static LifeCycleState ExpectedResult(LifeCycleState fromState, SuspendedState fromSuspendedState, SuspendedState toSuspendedState)
 {
     if (toSuspendedState == SuspendedState.Disabled)
     {
         return(LifeCycleState.Stop);
     }
     else if (toSuspendedState == SuspendedState.Enabled)
     {
         if (fromSuspendedState == SuspendedState.Disabled)
         {
             if (fromState == LifeCycleState.Init || fromState == LifeCycleState.Shutdown)
             {
                 return(LifeCycleState.Stop);
             }
         }
         return(fromState);
     }
     else
     {
         throw new System.InvalidOperationException("Should not transition to any other state got: " + toSuspendedState);
     }
 }
Example #12
0
 private static LifeCycleState ExpectedResult(SuspendedState state, LifeCycleState toLifeCycle)
 {
     if (state == SuspendedState.Untouched || state == SuspendedState.Enabled)
     {
         return(toLifeCycle);
     }
     else if (state == SuspendedState.Disabled)
     {
         if (toLifeCycle == LifeCycleState.Shutdown)
         {
             return(toLifeCycle);
         }
         else
         {
             return(LifeCycleState.Stop);
         }
     }
     else
     {
         throw new System.InvalidOperationException("Unknown state " + state);
     }
 }
Example #13
0
 internal static extern ErrorCode AppEventGetSuspendedState(IntPtr handle, out SuspendedState state);
 private void Awake()
 {
     movementState  = new MovementState(this);
     suspendedState = new SuspendedState(this);
     initialState   = movementState;
 }
Example #15
0
 // GET: SuspendedStates
 public ActionResult Index()
 {
     //return View(db.SuspendedStates.ToList());
     return(View(SuspendedState.getInstance()));
 }
        //
        // GET: /SuspendedState/

        public ActionResult Index()
        {
            return(View(SuspendedState.getInstance()));
        }
 /// <summary>
 /// Initializes SuspendedStateEventArgs class
 /// </summary>
 /// <param name="state">The information of the SuspendedState</param>
 /// <since_tizen> 6 </since_tizen>
 public SuspendedStateEventArgs(SuspendedState state)
 {
     SuspendedState = state;
 }