CyManager/Print/Common.cs
(开头部分) 26KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Drawing;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Print.Properties;
namespace Print
{
public class Common
{
public static float gExpandNum = 4f;
public static ConfigInfo gConfigInfo;
public static DataInfo gDataInfo;
public static int gsize = 10;
public static string gfontName ="";// Resources.str_gfont;
public static string gDisfontName ="";// Resources.str_gdisfont;
public static string PrintWidth = ConfigurationManager.AppSettings["PrinterWidth"];
public static ConfigInfo GetCfgInfo(string fileName)
{
ConfigInfo result = default(ConfigInfo);
result.tempList = new List<TemplateInfo>();
result.tempNameList = new List<TempInfo>();
result.listValue = new List<TempInfo>();
result.itemListValue = new List<TempInfo>();
result.payListValue = new List<TempInfo>();
try
{
using (StreamReader streamReader = new StreamReader(fileName, Encoding.GetEncoding("GB2312")))
{
try
{
new JsonSerializer();
JsonTextReader reader = new JsonTextReader(streamReader);
JObject jObject = JObject.Load(reader);
JToken jToken = jObject["templates_name"];
foreach (JToken current in (IEnumerable<JToken>)jToken)
{
TempInfo item = default(TempInfo);
string text = current.ToString();
if (text.Contains("name"))
{
item.fileName = current["name"].ToString();
}
if (text.Contains("disname"))
{
item.displayName = current["disname"].ToString();
}
result.tempNameList.Add(item);
}
JToken jToken2 = jObject["templates"];
foreach (JToken current2 in (IEnumerable<JToken>)jToken2)
{
TemplateInfo item2 = default(TemplateInfo);
item2.listTemp = new List<TempInfo>();
后面还有 564 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。