public static void Main(string[] args) { Program.setini(); Program.bool_error(); Program.checkTimer = new System.Timers.Timer(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Version version = Environment.OSVersion.Version; Version value = new Version("6.1"); Program.factor = Program.GetDpi_factor(); if (version.CompareTo(value) >= 0) { Program.SetProcessDPIAware(); } Program.ProgramStart(); if (!Program.createNew) { Program.ProgramStarted.Set(); Fmflags fmflags = new Fmflags(); fmflags.Show(); fmflags.DrawStr("软件已经运行"); return; } try { AppDomain.CurrentDomain.AssemblyResolve += Program.CurrentDomain_AssemblyResolve; } catch { MessageBox.Show("调用dll出错!"); } if (args.Length != 0 && args[0] == "更新") { new FmSetting { Start_set = "" }.ShowDialog(); } if (inihelp.GetValue("更新", "检测更新") == "True" || inihelp.GetValue("更新", "检测更新") == "发生错误") { //MessageBox.Show("开放全新的版本,有兴趣的想办法联系我,受制于吾爱规矩该软件不留联系方式。\r\n若不愿使用,请在设置中关闭检测更新!\r\n该版本不再进行维护!", "提醒"); new Thread(new ThreadStart(Program.check_update)).Start(); if (inihelp.GetValue("更新", "更新间隔") == "True") { Program.checkTimer.Enabled = true; Program.checkTimer.Interval = 3600000.0 * (double)Convert.ToInt32(inihelp.GetValue("更新", "间隔时间")); Program.checkTimer.Elapsed += Program.checkTimer_Elapsed; Program.checkTimer.Start(); } } else { Fmflags fmflags2 = new Fmflags(); fmflags2.Show(); fmflags2.DrawStr("天若OCR文字识别"); } Program.ReleaseDLL(); Application.Run(new FmMain()); }
// Token: 0x060001BD RID: 445 RVA: 0x00017BC4 File Offset: 0x00015DC4 private void 反馈send() { if (this.txt_问题反馈.Text != "") { string str = "sm=%E5%A4%A9%E8%8B%A5OCR%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB" + StaticValue.current_v + "&nr="; this.Post_Html("http://cd.ys168.com/f_ht/ajcx/lyd.aspx?cz=lytj&pdgk=1&pdgly=0&pdzd=0&tou=1&yzm=undefined&_dlmc=tianruoyouxin&_dlmm=", str + HttpUtility.UrlEncode(this.txt_问题反馈.Text)); this.txt_问题反馈.Text = ""; Fmflags fmflags = new Fmflags(); fmflags.Show(); fmflags.DrawStr("感谢您的反馈!"); return; } Fmflags fmflags2 = new Fmflags(); fmflags2.Show(); fmflags2.DrawStr("反馈文本不能为空"); }
// Token: 0x06000175 RID: 373 RVA: 0x00015318 File Offset: 0x00013518 private void doub_click(object sender, EventArgs e) { bool flag = this.dataGridView1.SelectedCells[0].Value.ToString().Remove(0, 3) != ""; bool flag2 = flag; bool flag3 = flag2; bool flag4 = flag3; bool flag5 = flag4; bool flag6 = flag5; bool flag7 = flag6; bool flag8 = flag7; if (flag8) { Clipboard.SetDataObject(this.dataGridView1.SelectedCells[0].Value.ToString().Remove(0, 3)); Fmflags fmflags = new Fmflags(); fmflags.Show(); fmflags.DrawStr("已复制"); } }
// Token: 0x06000299 RID: 665 RVA: 0x0001E854 File Offset: 0x0001CA54 public static void Get_update_check(string url) { try { string input = ""; HttpWebRequest httpWebRequest = WebRequest.Create(url) as HttpWebRequest; httpWebRequest.Method = "GET"; using (HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse()) { using (StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.UTF8)) { input = streamReader.ReadToEnd(); streamReader.Close(); httpWebResponse.Close(); } } httpWebRequest.Abort(); httpWebRequest = null; string text = "<li"; string text2 = "</ul></li>"; string text3 = "id=\"ml_"; string text4 = "\""; string text5 = ""; MatchCollection matchCollection = Regex.Matches(input, string.Concat(new string[] { "(?<=(", text, "))[.\\s\\S]*?(?=(", text2, "))" })); for (int i = 0; i < matchCollection.Count; i++) { bool flag = matchCollection[i].Value.ToString().Contains(StaticValue.content); bool flag2 = flag; bool flag3 = flag2; if (flag3) { text5 = new Regex(string.Concat(new string[] { "(?<=(", text3, "))[.\\s\\S]*?(?=(", text4, "))" }), RegexOptions.Multiline | RegexOptions.Singleline).Match(matchCollection[i].Value.ToString()).Value; break; } } string text6 = Program.Get_html("http://cc.ys168.com/f_ht/ajcx/wj.aspx?cz=dq&mlbh=" + text5 + "&_dlmc=tianruoyouxin&_dlmm="); string text7 = "版本V"; string text8 = "<"; bool flag4 = text6 != "" || text5 != ""; bool flag5 = flag4; bool flag6 = flag5; if (flag6) { Program.version_url = new Regex(string.Concat(new string[] { "(?<=(", text7, "))[.\\s\\S]*?(?=(", text8, "))" }), RegexOptions.Multiline | RegexOptions.Singleline).Match(text6).Value; string text9 = "url=\""; string text10 = "\""; Program.download_url = new Regex(string.Concat(new string[] { "(?<=(", text9, "))[.\\s\\S]*?(?=(", text10, "))" }), RegexOptions.Multiline | RegexOptions.Singleline).Match(text6).Value; } else { Program.version_url = "0"; Program.download_url = "0"; } } catch { Program.version_url = "0"; Program.download_url = "0"; } bool flag7 = !(Program.version_url != "0") || Convert.ToSingle(Program.version_url) <= Convert.ToSingle(StaticValue.current_v); bool flag8 = flag7; bool flag9 = flag8; if (flag9) { Fmflags fmflags = new Fmflags(); fmflags.Show(); fmflags.DrawStr("当前已是最新版本"); } else { Fmflags fmflags2 = new Fmflags(); fmflags2.Show(); fmflags2.DrawStr("有新版本V" + Program.version_url); Program.Get_update_x("http://cc.ys168.com/f_ht/ajcx/ml.aspx?cz=ml_dq&_dlmc=tianruoyouxin&_dlmm="); bool flag10 = Program.version_url == "0"; bool flag11 = flag10; bool flag12 = flag11; if (flag12) { MessageBox.Show("更新程序失效,请到百度网盘下载!", "提醒"); Process.Start("https://pan.baidu.com/s/1P2xb9kBwX1gj8j2_APivZw"); } else { bool flag13 = Program.version_url != "0"; bool flag14 = flag13; bool flag15 = flag14; if (flag15) { bool flag16 = new Version(Program.version_url) > new Version(StaticValue.current_v); bool flag17 = flag16; bool flag18 = flag17; if (flag18) { Process.Start("Data\\update.exe", " " + Program.download_url + " " + Path.GetFileName(Application.ExecutablePath)); Environment.Exit(0); } else { Process.Start("Data\\update.exe", " 最新版本"); } } } } }
// Token: 0x06000294 RID: 660 RVA: 0x0001E354 File Offset: 0x0001C554 public static void Get_update(string url) { Fmflags fmflags = new Fmflags(); fmflags.Show(); fmflags.DrawStr("天若OCR文字识别"); try { string input = ""; HttpWebRequest httpWebRequest = WebRequest.Create(url) as HttpWebRequest; httpWebRequest.Method = "GET"; using (HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse()) { using (StreamReader streamReader = new StreamReader(httpWebResponse.GetResponseStream(), Encoding.UTF8)) { input = streamReader.ReadToEnd(); streamReader.Close(); httpWebResponse.Close(); } } httpWebRequest.Abort(); httpWebRequest = null; string text = "<li"; string text2 = "</ul></li>"; string text3 = "id=\"ml_"; string text4 = "\""; string text5 = ""; MatchCollection matchCollection = Regex.Matches(input, string.Concat(new string[] { "(?<=(", text, "))[.\\s\\S]*?(?=(", text2, "))" })); for (int i = 0; i < matchCollection.Count; i++) { if (matchCollection[i].Value.ToString().Contains(StaticValue.content)) { text5 = new Regex(string.Concat(new string[] { "(?<=(", text3, "))[.\\s\\S]*?(?=(", text4, "))" }), RegexOptions.Multiline | RegexOptions.Singleline).Match(matchCollection[i].Value.ToString()).Value; break; } } string text6 = Program.Get_html("http://cc.ys168.com/f_ht/ajcx/wj.aspx?cz=dq&mlbh=" + text5 + "&_dlmc=tianruoyouxin&_dlmm="); string text7 = "版本V"; string text8 = "<"; if (text6 == "") { Program.version_url = "0"; Program.download_url = "0"; } else if (text5 == "") { Program.version_url = "0"; Program.download_url = "0"; } else { Program.version_url = new Regex(string.Concat(new string[] { "(?<=(", text7, "))[.\\s\\S]*?(?=(", text8, "))" }), RegexOptions.Multiline | RegexOptions.Singleline).Match(text6).Value; string text9 = "url=\""; string text10 = "\""; Program.download_url = new Regex(string.Concat(new string[] { "(?<=(", text9, "))[.\\s\\S]*?(?=(", text10, "))" }), RegexOptions.Multiline | RegexOptions.Singleline).Match(text6).Value; } } catch { Program.version_url = "0"; Program.download_url = "0"; } if (Program.version_url != "0" && Convert.ToSingle(Program.version_url) > Convert.ToSingle(StaticValue.current_v)) { fmflags.Show(); fmflags.DrawStr("有新版本V" + Program.version_url); } }