コード例 #1
0
ファイル: MainForm.cs プロジェクト: ggbebe8/ppomppuParsing
        //내용확인버튼
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            //List<string> liInfo = Paser.GetInfo(mURL, mStartStr, mLastStr);
            List <string> liFindWhat = new List <string>();

            liFindWhat.Add(mStartStr + "|&|" + mLastStr);
            liFindWhat.Add("'eng list_vspace' colspan=2  title=" + "|&|" + ">");

            List <string> liInfo = Paser.GetHtmlInfo(mURL, liFindWhat);

            string strInfo = "";

            for (int i = 0; i < liInfo.Count; i++)
            {
                strInfo += liInfo[i] + Environment.NewLine + Environment.NewLine;
            }

            MessageBox.Show(strInfo);
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: ggbebe8/ppomppuParsing
        //알림
        private void fnAlarm()
        {
            string strFindOK = "";

            mGetInfoList = Paser.GetInfo(mURL, mStartStr, mLastStr);
            if (mGetInfoList.Count < 1)
            {
                Log.Info(string.Format("fnAlarm() : 파싱된 정보가 없음"));
            }

            foreach (string wantToFind in lisbList.Items)
            {
                for (int i = 0; i < mGetInfoList.Count; i++)
                {
                    if (mChkInfoList.Contains(mGetInfoList[i]))
                    {
                        continue;
                    }

                    else if (mGetInfoList[i].Contains(wantToFind.ToUpper()))    //무조건 대문자로 변환
                    {
                        strFindOK += mGetInfoList[i] + Environment.NewLine;
                        mChkInfoList.Add(mGetInfoList[i]);
                    }
                }
            }

            if (mChkInfoList.Count > 100)
            {
                mChkInfoList.RemoveRange(0, 50);
            }

            if (strFindOK != "")
            {
                Telegram_Bot.Telegram_Send(strFindOK);
                //fnMailSend(strFindOK);
            }
        }
コード例 #3
0
        //알림
        private void fnAlarm()
        {
            string strFindOK = "";

            mGetInfoList = Paser.GetInfo(mURL, mStartStr, mLastStr);
            if (mGetInfoList.Count < 1)
            {
                MessageBox.Show("정보를 파싱할 수 없음", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            foreach (string wantToFind in lisbList.Items)
            {
                for (int i = 0; i < mGetInfoList.Count; i++)
                {
                    if (mChkInfoList.Contains(mGetInfoList[i]))
                    {
                        continue;
                    }

                    else if (mGetInfoList[i].Contains(wantToFind.ToUpper()))    //무조건 대문자로 변환
                    {
                        strFindOK += mGetInfoList[i] + Environment.NewLine;
                        mChkInfoList.Add(mGetInfoList[i]);
                    }
                }
            }

            if (mChkInfoList.Count > 100)
            {
                mChkInfoList.RemoveRange(0, 50);
            }

            if (strFindOK != "")
            {
                fnMailSend(strFindOK);
            }
        }