Esempio n. 1
0
        public ActionResult Index()
        {
            string url            = Request.RawUrl;
            string size           = Request.QueryString["matrix_size"];
            string representation = Request.QueryString["matrix_base"];

            var entity = new MultiplyViewModel();

            if (!string.IsNullOrEmpty(representation))
            {
                entity.Representation = GetRepresentation(representation);
            }

            if (!string.IsNullOrEmpty(size))
            {
                int currSize;
                entity.Size = Int32.TryParse(size, out currSize) ? (currSize >= 3)? currSize :10 : 10;
            }

            return(View("Index", entity));
        }
Esempio n. 2
0
        public ActionResult RefreshDisplayTable(int size, NumericRepresentation representation)
        {
            var entity = new MultiplyViewModel(size, representation);

            return(View("Index", entity));
        }
 public MainWindow()
 {
     DataContext = new MultiplyViewModel();
     InitializeComponent();
 }