Example #1
0
        private async void LoadData()
        {
            playlists = DataHelper.LoadPlayList();
            lbxPlaylist.DataSource    = playlists;
            lbxPlaylist.DisplayMember = "PlaylistName";

            dgvMediaLink.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
            dgvMediaLink.AutoSizeRowsMode          = DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders;

            var isConnected = await YoutubeApiHelper.ConnectYoutube();

            if (isConnected)
            {
                LogHelper.AddLog($"Connected to your youtube channel");
                grbLivestream.Text    = "Connected";
                grbLivestream.Enabled = true;
            }
            else
            {
                LogHelper.AddLog("Authenticate failed");
                grbLivestream.Text    = "No connect";
                grbLivestream.Enabled = false;
            }
        }