接上个文章,在工作中,给客户完成了定制化房地产数据抓取采集工具,工具使用C#开发,最后打包成自带环境的客户端,又完成了公司派发的一个任务,现在分享一下该工具实现了哪些功能
1、启动界面功能区分,针对不同的抓取内容做定制化窗体开发。


接上个文章,在工作中,给客户完成了定制化房地产数据抓取采集工具,工具使用C#开发,最后打包成自带环境的客户端,又完成了公司派发的一个任务,现在分享一下该工具实现了哪些功能
1、启动界面功能区分,针对不同的抓取内容做定制化窗体开发。


主要是解决自己报销,打发票一张A4纸,合并几个发票一起打印的问题,WPS超级恶心,这样一点功能还要收钱!!!
运行环境:win + net8.0
代码自己看仓库,仓库在下面,工具下载:
https://gitee.com/netzhouxiang/fapiao/blob/master/FaPiaoHB.rar
运行效果:

合并三个文件:

合并结果:

仓库地址:https://gitee.com/netzhouxiang/fapiao.git
可以根据自己的需求调整
这个工具早就弄了,只是一直没有分享出来,闲的无聊分享一下
主要是日常工作中,需要用到把doc/docx文件转成html,而网上的各种转义,都带不好的代码,也不符合效果,所以自己搞了一个,界面比较简单,选择word文件就开始干活
界面:

给客户制作了一个刷游戏任务的PC外挂,利用C#获取窗口句柄,进行操作实现。
此方法,只适用于可以获取到句柄的游戏,获取不到的可以用按键精灵制作,手机也一样。
现在年代的外挂基本都基于简化操作,而不是以前的那种攻击数据,现在技术很难突破,除非自己人,实现核心代码如下,记录一下:
继续阅读最近项目需求 做了个小工具 操作EXCEL以及生成公司公章
TestOnSeal _top = new TestOnSeal();
_top.TextFont = new System.Drawing.Font("黑体", 16, FontStyle.Bold);
_top.FillColor = Color.Red;
//_top.ColorTOP = Color.Black;
_top.Text = comname;
_top.BaseString = "";
_top.ShowPath = true;
_top.LetterSpace = 1;
_top.SealSize = 180;
_top.CharDirection = Char_Direction.Center;
_top.SetIndent(20);
Graphics g = this.CreateGraphics();
g.DrawImage(_top.TextOnPathBitmap(), 0, 0);
_top.CharDirection = Char_Direction.ClockWise;
g.DrawImage(_top.TextOnPathBitmap(), 180, 0);
_top.CharDirection = Char_Direction.AntiClockWise;
g.DrawImage(_top.TextOnPathBitmap(), 0, 180);
_top.SetIndent(20);
_top.CharDirection = Char_Direction.Center;
g.DrawImage(_top.TextOnPathBitmap(), 180, 180);
_top.TextOnPathBitmap().Save(System.Windows.Forms.Application.StartupPath + "/tp/" + comname + ".png", System.Drawing.Imaging.ImageFormat.Png);
g.Dispose();
需要的类 用于反序列化
public class GuanZhuModel2
{
public int total { get; set; }
public int count { get; set; }
public OpenIdListData data { get; set; }
public string next_openid { get; set; }
}
public class OpenIdListData
{
///
/// OPENID的列表
///
public List openid { get; set; }
}
具体方法:
string returnStr = HttpUtil.Send("", "https://api.weixin.qq.com/cgi-bin/user/get?access_token=" + Convert.ToString(PayCenter.getCache("wxModelAccess")) + "&next_openid=");
var obj = JsonConvert.DeserializeObject(returnStr);
for (int i = 0; i < obj.data.openid.Count; i++)
{
var openid = Convert.ToString(obj.data.openid[i]);
UserOpen openmodel = new UserOpenDAL().GetOpenIDOrType(openid, 1);
new WXAPICommon(null, null, null).ReturnTxt(openid, "尊敬的用户,由于惠号网帐户体系升级,您的帐户类型已变更!");
if (openmodel == null)
{
WeiXinCommon.GuanZhuList.Add(new GuanZhuModel()
{
fromUserName = openid,
EventKey = ""
});
}
}
我从来都不废话 能用代码解决的 绝不说废话 (<_>)
void Application_Error(object sender, EventArgs e)
{
// 在出现未处理的错误时运行的代码
//在出现未处理的错误时运行的代码 周祥
Exception ex = Server.GetLastError().GetBaseException();
StringBuilder str = new StringBuilder();
str.Append("\r\n" + DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss"));
str.Append("\r\n.客户信息:");
string ip = "";
if (Request.ServerVariables.Get("HTTP_X_FORWARDED_FOR") != null)
{
ip = Request.ServerVariables.Get("HTTP_X_FORWARDED_FOR").ToString().Trim();
}
else
{
ip = Request.ServerVariables.Get("Remote_Addr").ToString().Trim();
}
str.Append("\r\n\tIP:" + ip);
str.Append("\r\n\t浏览器:" + Request.Browser.Browser.ToString());
str.Append("\r\n\t浏览器版本:" + Request.Browser.MajorVersion.ToString());
str.Append("\r\n\t操作系统:" + Request.Browser.Platform.ToString());
str.Append("\r\n\t访问路径:" + Request.Url.ToString());
str.Append("\r\n\t请求参数:" + Server.UrlDecode(Request.Form.ToString()));
str.Append("\r\n.错误信息:" + ex.ToString());
Log.ErrorLog(str);
}
log.cs 文件下载 错误会存储在根目录 app_data 里面
Log
好久没发文章了,整点东西上来,废话就不多说了,代码如下:
Bitmap bmp1 = new Bitmap(Application.StartupPath + "\\1.png");
Bitmap bmp2 = new Bitmap(Application.StartupPath + "\\1.jpg");
using (Graphics g = Graphics.FromImage(bmp1))
{
Size size = new Size(265, 265);
Rectangle rect = new Rectangle(new Point(bmp1.Width - size.Width - 118, 96), size);
g.DrawImage(bmp2, rect, new Rectangle(0, 0, bmp2.Width, bmp2.Height), GraphicsUnit.Pixel);
bmp1.Save(Application.StartupPath + "\\C.jpg");
}