コード例 #1
0
ファイル: Liplis.cs プロジェクト: LipliStyle/LiplisDoll
 protected bool initDelegate()
 {
     try
     {
         //リフレッシュデリゲート
         reqReflesh = new LpsDelegate.dlgVoidToVoid(dlgReflesh);
         reqProcess = new LpsDelegate.dlgS1ToVoid(dlgProcess);
         return true;
     }
     catch (Exception err)
     {
         LpsLogControllerCus.writingLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, err.ToString());
         return false;
     }
 }
コード例 #2
0
        private void nicoSearch()
        {
            //宣言
            List<string> nicoVideoIdList = new List<string>();
            string nicoVideoId;
            string word = txtNicoSearchWord.Text;

            //デリゲート
            LpsDelegate.dlgS2ToVoid d = new LpsDelegate.dlgS2ToVoid(addNicoDgv);
            LpsDelegate.dlgVoidToVoid c = new LpsDelegate.dlgVoidToVoid(clearNicoDgv);

            //クリア
            Invoke(c);

            //ダウンロード
            NicoSearch nico = new NicoSearch(os.nicoId, os.nicoPass);

            //ログインチェック
            if (!nico._isLogin)
            {
                //ログインし直す
                nico = new NicoSearch(LiplisDefine.NICO_DEFAULT_ID, LiplisDefine.NICO_DEFAULT_PASS);
                //ログインチェック
                if (!nico._isLogin)
                {
                    //検索失敗
                    MessageBox.Show("ニコニコ動画へのログインに失敗しました。", "Liplis");
                    return;
                }
            }

            //ページ
            for (int page = 1; page <= 50; page++)
            {
                List<string> urlList = nico.getUrlList(word, opt, sortSelectedIdx, page);

                foreach (string url in urlList)
                {
                    nicoVideoId = LpsRegularEx.getNicoId(url);

                    if (nicoVideoIdList.IndexOf(nicoVideoId) < 0)
                    {
                        nicoVideoIdList.Add(nicoVideoId);
                        objNicoInfo o = new objNicoInfo(nicoVideoId);
                        Invoke(d, nicoVideoId, o.title);
                        Application.DoEvents();
                        Thread.Sleep(5);
                    }
                }
            }
        }
コード例 #3
0
ファイル: ActivityTalk.cs プロジェクト: LipliStyle/LiplisDoll
        /// <summary>
        /// initDelegate
        /// delegateの初期化
        /// </summary>
        protected void initDelegate()
        {
            //セットテキストデリゲート
            reqSetTextTotalkWindow = new LpsDelegate.dlgS1ToVoid(dlgSetTextTotalkWindow);

            //セットロケーションデリゲート
            reqSetLocation = new LpsDelegate.dlgI5ToVoid(dlgSetLocation);

            //セットバックグラウンド
            reqSetBackGround = new LpsDelegate.dlgVoidToVoid(dlgSetBackGround);

            //コールブラウザ
            reqCallBrowser = new LpsDelegate.dlgVoidToVoid(dlgCallBrowser);
        }