YKT_EShop/Admin/Plus/Picture/Notepad.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YKT_EShop._Class;
using System.IO;

namespace YKT_EShop.Admin.Plus.Picture
{
    public partial class Notepad : System.Web.UI.Page
    {
        protected Label lblNew;
        protected Label lblMsg;
        protected TextBox txtFilePath;
        protected TextBox txtFileContent;
        protected DropDownList ddlEncode;
        protected Button btnSave;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string filePath = Request.QueryString["objfile"];
                string folderPath = Request.QueryString["objfolder"];

                if (string.IsNullOrEmpty(folderPath))
                {
                    if (File.Exists(filePath))
                    {
                        string fileContent;
                        string getEncode;

                        new FileManagerProcessor().ReadTextFile(filePath, out fileContent, out getEncode);

                        lblNew.Text = "false";
                        txtFilePath.Text = filePath;
                        txtFileContent.Text = fileContent;
                        ddlEncode.SelectedValue = getEncode;
                    }
                    else
                    {
                        lblMsg.Text = "<script type=\"text/javascript\">alert(\"没有找到文件\");</script>";
                    }
                }
                else
                {
                    lblNew.Text = "true";
                    txtFilePath.Text = folderPath + "\\newText.txt";
                    txtFilePath.ReadOnly = false;
                    txtFileContent.Text = "在此输入文本内容";
                }
            }

            btnSave.Click += new EventHandler(OnSaveFile);
        }

        /// <summary>
        /// 保存文件
        /// </summary>
后面还有 20 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。