Controllers/HomeController.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using Microsoft.AspNetCore.Mvc;
using QRCCOdeMVC.Common;
using QRCCOdeMVC.Models;
using System.Diagnostics;
using System.Drawing.Imaging;
using System.Xml.Linq;
namespace QRCCOdeMVC.Controllers
{
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
public HomeController(ILogger<HomeController> logger)
{
_logger = logger;
}
public IActionResult Index()
{
return View();
}
public FileResult ShowImage(string id)
{
IQRCode _iQRCode = new RaffQRCode();
var bytes = _iQRCode.GetQRCode(@"", 50);
return File(bytes, "image/jpg");
}
public FileResult m1()
{
//string root = System.AppDomain.CurrentDomain.BaseDirectory;
//string path = string.Concat(root, @"Content\images\demo.png");
//FileStream fs = new FileStream(path, FileMode.Open,FileAccess.Read);
//byte[] bytes = new byte[fs.Length];
//fs.Read(bytes, 0, bytes.Length);
//fs.Close();
//return File(bytes, "image/jpg");
string root = System.AppDomain.CurrentDomain.BaseDirectory;
string path = string.Concat(root, @"\content\images\demo.jpg");
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
byte[] bytes = new byte[fs.Length];
fs.Read(bytes, 0, Convert.ToInt32(bytes.Length));
fs.Close();
return File(bytes, "image/jpg");
}
public void m2()
{
IQRCode _QRCode = new RaffQRCode();
byte[] bytes = _QRCode.GetQRCode(@"", 5);
Response.Body.WriteAsync(bytes, 0, Convert.ToInt32(bytes.Length));
Response.Body.Close();
}
public IActionResult Privacy()
后面还有 11 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。