示例#1
0
        private void RunMenu(ActionMenu actionMenu, int rowIndex)
        {
            Task t = new Task(() =>
            {
                if (!TaoChrome(rowIndex))
                {
                    return;
                }
                var facebook = new FaceBook(dgvAccounts, rowIndex, chromeDriver[rowIndex]);
                if (actionMenu == ActionMenu.OpenChrome)
                {
                    return;
                }
                else
                {
                    var rsLogin = facebook.DangNhap();
                    if (!rsLogin.rs)
                    {
                        return;
                    }
                    switch (actionMenu)
                    {
                    case ActionMenu.OpenFacebook:
                        break;

                    case ActionMenu.BackUpFacebookOnlyImageFriend:
                        facebook.BackUpFacebookOnlyImageFriend(chromeDriver[rowIndex], rowIndex);
                        break;

                    case ActionMenu.BackUpFacebookAll:
                        facebook.BackUpFacebookAll(chromeDriver[rowIndex], rowIndex);
                        break;

                    case ActionMenu.ChayDangKiHana:
                        break;

                    case ActionMenu.QuetThanhVienGroup:
                        facebook.QuetThanhVienGroup(chromeDriver[rowIndex], rowIndex);
                        break;

                    case ActionMenu.CommentGroup:
                        break;
                    }
                }
            });

            t.Start();
        }