Ejemplo n.º 1
0
        public IPchange(Form1 context, sql_connection_manager conn)
        {
            this.context = context;
            this.conn    = conn;

            current_IP = GetComputer_InternetIP();
        }
Ejemplo n.º 2
0
        public Main_Manager(Form1 context, sql_connection_manager conn_manager)
        {
            try
            {
                this.context      = context;
                this.conn_manager = conn_manager;


                DataRow r = conn_manager.version_control();
                if (r == null)
                {
                    throw new NullReferenceException();
                }

                context.log(" EASYGRAM Version. " + r["LatestVersion"].ToString() + "\n");
            }
            catch (NullReferenceException) { context.log("No Result Found!!!!"); }
        }
Ejemplo n.º 3
0
 public RegisteredUser_proc(Form1 context, sql_connection_manager conn_manager) : base(context, conn_manager)
 {
 }
Ejemplo n.º 4
0
 public HashTag_proc(Form1 context, sql_connection_manager conn_manager) : base(context, conn_manager)
 {
 }
Ejemplo n.º 5
0
        public void form_start()
        {
            conn_manager = new sql_connection_manager(this);


            manager = new Main_Manager(this, conn_manager);



            try
            {
                t = conn_manager.SelectData();


                r = t.Rows[0];
                try
                {
                    string now_date = DateTime.Now.ToString("yyyy-MM-dd");

                    string latest_date;


                    foreach (DataRow r2 in t.Rows)
                    {
                        listBox1.Items.Add(r2["user_id"].ToString());


                        latest_date = r2["latest_date"].ToString();
                        try
                        {
                            DateTime dt = DateTime.ParseExact(r2["latest_date"].ToString(), "MM/dd/yyyy", CultureInfo.InvariantCulture);
                            latest_date = dt.ToString("yyyy-MM-dd");
                        }
                        catch (Exception) { }

                        //if latest_date is not equal to current date then upadte date and set like and comment count to 0
                        if (latest_date != now_date)
                        {
                            conn_manager.update_count_date(r2["user_id"].ToString(), now_date);
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.StackTrace);
                }



                //Select the current item in the list
                listBox1.Focus();
                listBox1.SetSelected(0, true);

                //Check #tag Status ,comment and job status ..IF Ok then Proceed Otherwise Stop

                if (checkCommentStatus() && checkHashTag())
                {
                    //시작 버튼 활성화 시도
                    //get the total users and login
                    total_user = t.Rows.Count;
                    //total_user = 2;
                }
                else
                {
                    MessageBox.Show(" [데이터베이스] 기본 데이터를 입력하세요");
                }
            }

            //else { MessageBox.Show("먼저 로그인하세요 "); }


            catch (Exception ex) { log("No Users Record found!!!"); log(ex.StackTrace); }
        }
Ejemplo n.º 6
0
 public Request_proc(Form1 context, sql_connection_manager conn_manager) : base(context, conn_manager)
 {
 }
Ejemplo n.º 7
0
        public void like_proc()
        {
            while (true)
            {
                try
                {
                    for (int i = 1; i <= 10; i++)
                    {
                        if (ip_changing)
                        {
                            context.log(" [아이피 변경] 아이피 변경 중입니다 " + i + " / 10");
                            // Ip is changing
                            context.log(ip_changing.ToString());
                            Thread.Sleep(1500);
                            if (i == 10)
                            {
                                context.log(" [아이피 변경] 아이피 변경에 실패했습니다");
                                // Ip_change was failed
                                return;
                            }
                        }
                        else
                        {
                            break;
                        }
                    }

                    conn_manager = new sql_connection_manager(context);

                    insta_run = new insta_procedure(context, conn_manager);

                    //시작


                    insta_run.start();

                    //Check Login Language
                    insta_run.changeLanguageOnLogin();

                    if (insta_run.block_check())
                    {
                        //막힌 계정이면 끄고 루프 탈출
                        insta_run.quit();
                        continue;
                    }
                    //막힌 계정이 아니면 로그인



                    ////1.해시태그 검색 Run Hash Tag procedure if it is checked
                    HashTag_proc hash_run = new HashTag_proc(context, conn_manager);

                    if (context.checkBox1.Checked)
                    {
                        hash_run.hash_tag_search();
                        ////좋아요 루프
                        hash_run.like_loop(1);
                    }

                    ////2. 등록된 유저 검색  Run Random User procedure if it is checked

                    RegisteredUser_proc regiuser_run = new RegisteredUser_proc(context, conn_manager);

                    if (context.checkBox2.Checked)
                    {
                        regiuser_run.random_user();
                        regiuser_run.like_loop(1);
                    }


                    //3. 요청 유저   This Procedure is Mandatory
                    //팔로우, 좋아요
                    Request_proc req_run = new Request_proc(context, conn_manager);
                    req_run.require();

                    req_run.like_loop(1, req_run.require_like_count());


                    //update the Likes and comments
                    insta_run.saveLikesCount();
                    insta_run.saveCommentsCount();
                    insta_run.saveFollowsCount();


                    //Run Unfollow Procedure if is checked
                    if (context.checkBox3.Checked)
                    {
                        insta_run.unfollow();
                    }



                    //store of two numbers
                    insta_run.store_followers();


                    insta_run.quit();

                    //connection close();
                    conn_manager.quit_conn();

                    if (ipchanger != null)
                    {
                        ipchanger.send_change();
                    }
                }
                catch (NullReferenceException ex)
                {
                    context.log(ex.StackTrace);
                    context.log(" [데이터베이스] : 서버로부터 데이터를 가져오지 못했습니다");
                    insta_run.quit();
                }

                catch (MySqlException ex)
                {
                    context.log(ex.StackTrace);
                    context.log(" [데이터베이스] : 서버와 연결에 실패했습니다");
                    insta_run.quit();
                }

                catch (Exception ex)
                {
                    context.log(ex.StackTrace);
                    context.log(" [이지그램] : 에러 발생");
                    insta_run.quit();
                }
            }
        }