Click here to Skip to main content
15,896,912 members
Articles / Desktop Programming / Windows Forms

Manage YouTube using C# and Youtube API 1.6

Rate me:
Please Sign up or sign in to vote.
4.96/5 (30 votes)
7 Jan 2011CPOL8 min read 254.5K   18.9K   61  
I describe some of the things about Youtube video feeds
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;

namespace Manager
{
    public partial class SSettings : Form
    {
        #region searchsettings

        string author = "", orderby = "", qry = "", safesearch = "", sname = "";
        int choice = 0;

        public int Choice
        {
            get { return choice; }
            set { choice = value; }
        }

        public string Sname
        {
            get { return sname; }
            set { sname = value; }
        }

        public string Safesearch
        {
            get { return safesearch; }
            set { safesearch = value; }
        }

        public string Qry
        {
            get { return qry; }
            set { qry = value; }
        }

        public string Orderby
        {
            get { return orderby; }
            set { orderby = value; }
        }

        public string Author
        {
            get { return author; }
            set { author = value; }
        }

        #endregion
        public SSettings()
        {
            InitializeComponent();
        }

        private void SSettings_Load(object sender, EventArgs e)
        {
            cmbOrderBy.SelectedIndex = 0;
            cmbSafesearch.SelectedIndex = 0;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
         
            if (txtAuthor.Text != "" || txtQuerry.Text != "")
            {
                if (cmbOrderBy.SelectedIndex >= 0 || cmbOrderBy.SelectedIndex <= 3)
                {
                    if (cmbSafesearch.SelectedIndex >= 0 || cmbSafesearch.SelectedIndex <= 2)
                    {
                        choice = 1;
                        author = txtAuthor.Text;
                        orderby  = cmbOrderBy.SelectedIndex.ToString();
                        qry  = txtQuerry.Text;
                        safesearch  = cmbSafesearch.SelectedIndex.ToString();
                        this.Hide();
                    }
                }
            }
            else { MessageBox.Show("Please enter the correct data");}
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (txtSname.Text != "")
            {
                sname  = txtSname.Text;
                choice  = 2;
                this.Hide();
            }
            else { MessageBox.Show("Please enter the name"); }

        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Freelancer
India India
I completed my engineering in 2010.. Then i am working as freelancer.

Comments and Discussions