public ActionResult Add(int moudleId, int menuId, int btnId, EmailPool dto) { if (dto != null && !dto.ReceiverEmails.IsBlank()) { dto.Status = EmailStatus.等待发送; var res = emailPoolService.Add(dto); if (res) { var list = new List <EmailReceiver>(); dto.ReceiverEmails.Split(new [] { ';', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList() .ForEach(email => { if (email.IsValidEmail()) { list.Add(new EmailReceiver { EmailId = dto.Id, Email = email, Type = EmailReceiverType.收件人 }); } }); emailReceService.Add(list); } } return(RedirectToAction("Index", RouteData.Values)); }
public void NextState() { if (State == null) { State = new RegisterState(); } var @switchBefore = new Dictionary <Type, Action>() { [typeof(RegisterState)] = () => { CurrentAccountData = new ReggerAccountData() { EmailAccount = EmailPool.Get(), Keyboard = _inputSimulator.Keyboard, Window = _window }; }, }; if (@switchBefore.ContainsKey(State.GetType())) { @switchBefore[State.GetType()](); } State.Setup(CurrentAccountData); State.Execute(); var @switchAfter = new Dictionary <Type, Action>() { [typeof(RegisterState)] = () => State = new VerifyEmailState(), [typeof(VerifyEmailState)] = () => State = new EndRegisterState(), [typeof(EndRegisterState)] = () => State = new SetupAccountState(), [typeof(SetupAccountState)] = () => State = new AcceptGiftState(), [typeof(AcceptGiftState)] = () => State = new RegisterState() }; if (@switchAfter.ContainsKey(State.GetType())) { @switchAfter[State.GetType()](); } NextState(); }
static void Main(string[] args) { EmailPool.Load(); NicknamePool.Load(); KeysPool.Load(); var process = Process.GetProcessById(12864); HWND mainWindow = process.MainWindowHandle; var window = new Window(mainWindow); window.Bounds = new Rect() { Left = 2200, Top = 0, Right = 2200 + 1000, Bottom = 1000 }; var regger = new Regger(window); regger.NextState(); Console.ReadKey(); }
public override void Execute() { var login = _reggerAccount.EmailAccount.Email.Split('@')[0]; var password = _reggerAccount.EmailAccount.Password; WriteText(new Point(64, 366), login); Thread.Sleep(1000); WriteText(new Point(64, 436), password); Window.Click(new Point(500, 500)); Thread.Sleep(1000); WriteText(new Point(64, 497), password); Window.Click(new Point(500, 500)); Thread.Sleep(1000); Window.Click(new Point(483, 566)); _reggerAccount.SteamAccount.Login = login; _reggerAccount.SteamAccount.Password = password; File.AppendAllText("results.txt", $"{login};{password}\n"); EmailPool.Save(); Thread.Sleep(5000); }