using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Google.GData.Client; using Google.GData.Extensions; using Google.GData.YouTube; using Google.GData.Extensions.MediaRss; using Google.YouTube; namespace Manager { public partial class Login : Form { public Login() { InitializeComponent(); } #region Login //insert your dev key here string devkey = ""; public void authenticate() { YouTubeService service = new YouTubeService("Manager"); service.setUserCredentials(textBox1.Text , maskedTextBox1.Text); try { service.QueryClientLoginToken(); frmMain frm = new frmMain(); frm.Username = textBox1.Text; frm.Password = maskedTextBox1.Text; frm.Show(); this.Hide(); } catch (System.Net.WebException e) { MessageBox.Show(e.Message ); } } #endregion private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "" && maskedTextBox1.Text != "") { authenticate(); } else { MessageBox.Show("Enter username and passsword"); } } private void Login_Load(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { Application.Exit(); } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)