A simple application of Chess which mainly makes use of ASP.NET MVC and jQuery UI
1 Design the UI
Chessboard
2 Project structure
The following shows the folder structure of ASP.NET MVC.
A demo of chess demo
<system.web> <compilation debug="true" targetFramework="4.5.2" /> <authentication mode="Forms"> <forms name=".timecapture" cookieless="UseCookies" loginUrl="~/Account/Login" timeout="432000" protection="All" path="/" slidingExpiration="true" /> </authentication> <httpRuntime targetFramework="4.5.2" /> </system.web>
namespace TimeCapture.Controllers { [Authorize] public class HomeController : Controller { public ActionResult Index() { return View(); }
FormsAuthentication.SetAuthCookie(user.Username.ToLower(), true);
class Reflection { static void Main(string[] args) { Assembly executingAssembly = Assembly.GetExecutingAssembly(); Type EmployeeType = executingAssembly.GetType("CSharp.Employee"); object EmployeeInstance = Activator.CreateInstance(EmployeeType); MethodInfo getFullNameMethod = EmployeeType.GetMethod("GetFullName"); string[] parameters = { "Jason", "Kong" }; string fullName = (string)getFullNameMethod.Invoke(EmployeeInstance, parameters); //Employee c = new Employee(); //string fullName = c.GetFullName("Jason", "Kong"); Console.WriteLine("The full name is {0}", fullName); } } public class Employee { public string GetFullName(string FirstName, string LastName) { return FirstName + " " + LastName; } }
Reference:Productivity Power Tools 2015