private void AuthFileInitialize(string authFilePath) { string authLine, commentLine, urlLine; int counter = 0; StreamReader authFile = new StreamReader(authFilePath, Encoding.Default, true); List <AuthVO> configVOs = new List <AuthVO>(); while ((authLine = authFile.ReadLine()) != null && !authLine.Equals("")) { AuthVO configVO = new AuthVO(); string[] s = authLine.Split('/'); configVO.username = s[0]; configVO.password = s[1]; configVO.ip = s[2]; configVO.memo = s[3]; configVOs.Add(configVO); counter++; } authFile.Close(); this.authVOs = configVOs; }
private async void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { label5.BackColor = Color.DarkOrange; label5.Text = "Ready"; AuthVO authVO = authVOs[dataGridView1.CurrentCell.RowIndex]; // 색갈 DataGridViewRowCollection rows = dataGridView1.Rows; for (int i = 0; i < rows.Count; i++) { dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Empty; } dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.Beige; // 아이디 표시 label3.Text = authVO.username; // 아이피 표시 label4.Text = authVO.ip; // 쿠키삭제 await DeleteCookieAsync(); // 아이피 변경 await ChangeProxServerAsync(authVO.ip); // 네이버로 이동 await LoadPageAsync(browser, NAVER_LOGIN_URL); await EvaluateScriptAsync(String.Format("document.querySelector('#id').value = '{0}'", authVO.username)); await EvaluateScriptAsync(String.Format("document.querySelector('#pw').value = '{0}'", authVO.password)); label5.BackColor = Color.FromArgb(0, 216, 255); label5.Text = "Complate"; }
private async void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { label5.BackColor = Color.DarkOrange; label5.Text = "Ready"; AuthVO authVO = authVOs[dataGridView1.CurrentCell.RowIndex]; // 색갈 DataGridViewRowCollection rows = dataGridView1.Rows; for (int i = 0; i < rows.Count; i++) { dataGridView1.Rows[i].DefaultCellStyle.BackColor = Color.Empty; } dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.Beige; // 아이디 표시 label3.Text = authVO.username; // 아이피 표시 label4.Text = authVO.ip; // 쿠키삭제 await DeleteCookieAsync(); // 아이피 변경 await ChangeProxServerAsync(authVO.ip); // 네이버로 이동 await LoadPageAsync(browser, YOUTUBE_LOGIN_URL); await LoginYoutubeAsync(authVO.username, authVO.password); label5.BackColor = Color.FromArgb(0, 216, 255); label5.Text = "Complate"; }