mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
776 B
33 lines
776 B
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
namespace Volo.ClientSimulation.Demo.Pages
|
|
{
|
|
public class SimulationAreaModel : PageModel
|
|
{
|
|
public Simulation Simulation { get; }
|
|
|
|
public SimulationAreaModel(Simulation simulation)
|
|
{
|
|
Simulation = simulation;
|
|
}
|
|
|
|
public Task OnGetAsync()
|
|
{
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
public async Task<IActionResult> OnPostStartAsync()
|
|
{
|
|
Simulation.Start();
|
|
return new NoContentResult();
|
|
}
|
|
|
|
public async Task<IActionResult> OnPostStopAsync()
|
|
{
|
|
Simulation.Stop();
|
|
return new NoContentResult();
|
|
}
|
|
}
|
|
}
|