예제 #1
0
        /// <summary>
        /// Run auto facebook action
        /// </summary>
        /// <param name="e"></param>
        public void RunFbAction(DoWorkEventArgs e)
        {
            //init FbAction
            action = FbAction.GetInstance();
            //init LoginModel
            LoginModel login = new LoginModel(action, txtUser.Text, txtPass.Text);

            //do auto login function
            login.DoProcess();
            //get param from DoWorkEventArgs e
            Hashtable _arguments = (Hashtable)e.Argument;

            //check LikePost function
            if (ChkLikePost.Checked)
            {
                //if param has data
                if (_arguments.Count > 0)
                {
                    //get urllist for LikePost Function
                    string[] _urlList = _arguments["LikePost"] as string [];
                    //do like post function
                    action.LikePost(_urlList);
                }
            }

            //check LikePost function
            if (ChkPostStatus.Checked)
            {
                //if param has data
                if (_arguments.Count > 0)
                {
                    //get urllist for PostStatus Function
                    string[] _contentList = _arguments["PostStatus"] as string[];
                    //do post status function
                    action.PostStatus(_contentList);
                }
            }

            //check Comment function
            if (ChkComment.Checked)
            {
                //if param has data
                if (_arguments.Count > 0)
                {
                    //get urllist for LikePost Function
                    string[] _urlList = _arguments["LinkComment"] as string[];
                    //get content comment
                    string _contentComment = _arguments["CommentContent"] as string;
                    //do like post function
                    action.PostComment(_urlList, _contentComment);
                }
            }

            //close driver when done
            //action.Close();
        }
예제 #2
0
 public LoginModel(FbAction _action, string _email, string _pass)
 {
     action = _action;
     email  = _email;
     pass   = _pass;
 }
 public PostStatusModel(FbAction _action, string[] _content)
 {
     action        = _action;
     StatusContent = _content;
 }
예제 #4
0
 public LikePostModel(FbAction _action, string [] _url)
 {
     action  = _action;
     UrlPost = _url;
 }
 public CommentModel(FbAction _action, string[] _linkPost, string _comment)
 {
     action         = _action;
     CommentContent = _comment;
     LinkPost       = _linkPost;
 }