예제 #1
0
        private void SaveImageForm_Load(object sender, EventArgs e)
        {
            fnc_GetCommondArgs();
            //MessageBox.Show(SaveImageCommon.CON_SAVEIMAGE_INI);

            fnc_ClearStatus();                  // 初期化
            fnc_GetFormSize();                  // 画面サイズ設定
            fnc_GetUrlList();                   // URL情報取得設定
            fnc_SetImageExtenseCombox();        // URL除外情報取得設定
            fnc_GetImageVerticalScorllSize();   // 縦分割値取得
            // Add Webbrowser状でTabキー効かない不具合(B002)対応 2019/05/20 Start
            this.pAvoidTwiceEventCount = 0;
            // Add Webbrowser状でTabキー効かない不具合(B002)対応 2019/05/20 End
            this.pSaveUrlList = false;

            if (cob_url.Items.Count > 0)
            {
                TargetWebBrowser.Navigate(cob_url.Items[0].ToString());
            }
            else
            {
                TargetWebBrowser.GoHome();
            }

            // コントロールパンネル
            //this.tsb_ctrl_panel.Visible = true;
            this.tsb_ctrl_panel.Visible = false;

            StatusTimer.Interval = 3000; // 3秒待ち
        }
예제 #2
0
 private void tsb_GoHome_Click(object sender, EventArgs e)
 {
     try
     {
         fnc_ClearStatus();
         TargetWebBrowser.GoHome();
     }
     catch (Exception ex) { CommonLogger.WriteLine(ex.Message); }
 }
예제 #3
0
 private void tsb_Stop_Click(object sender, EventArgs e)
 {
     try
     {
         fnc_ClearStatus();
         UrlTimer.Enabled = false;
         TargetWebBrowser.Stop();
         this.Text = TargetWebBrowser.DocumentTitle + SaveImageCommon.GetVersionInfo();
     }
     catch (Exception ex) { CommonLogger.WriteLine(ex.Message); }
 }
예제 #4
0
 private void tsb_GoAhead_Click(object sender, EventArgs e)
 {
     try
     {
         if (TargetWebBrowser.CanGoForward == true)
         {
             fnc_ClearStatus();
             TargetWebBrowser.GoForward();
         }
     }
     catch (Exception ex) { CommonLogger.WriteLine(ex.Message); }
 }
예제 #5
0
        private void TargetWebBrowser_NewWindow(object sender, System.ComponentModel.CancelEventArgs e)
        {
            WebBrowser wb     = (WebBrowser)sender;
            string     strURL = wb.StatusText;

            if (strURL != "")
            {
                //開こうとしていたページに移る
                if (strURL.Length > 4 && strURL.Substring(0, 4) == "http")
                {
                    TargetWebBrowser.Navigate(strURL);
                }
            }
            //ここで標準ブラウザで開くのをキャンセルしている
            e.Cancel = true;
        }
예제 #6
0
 private void cob_url_KeyPress(object sender, KeyPressEventArgs e)
 {
     try
     {
         if (e.KeyChar.ToString() == "\r")
         {
             //comboBox1_Click(sender, e);
             if (this.pDontNavigateNow == false)
             {
                 this.pSaveUrlList = true;
                 UrlTimer.Enabled  = true;
                 if (cob_url.Text != "")
                 {
                     TargetWebBrowser.Navigate(cob_url.Text);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         CommonLogger.WriteLine(ex.Message);
     }
 }
예제 #7
0
        private void TargetWebBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e)
        {
            int    i;
            bool   bFound;
            string sUrl;

            fnc_ClearStatus();
            this.Text = TargetWebBrowser.DocumentTitle + SaveImageCommon.GetVersionInfo();

            sUrl = TargetWebBrowser.Url.ToString();

            // Enterキー押下時のみURLを保存
            if (this.pSaveUrlList == true)
            {
                bFound = false;
                for (i = 0; i < cob_url.Items.Count; i++)
                {
                    if (cob_url.Items[i].ToString() == sUrl)
                    {
                        bFound = true;  break;
                    }
                }

                this.pDontNavigateNow = true;
                if (bFound == false)
                {
                    cob_url.Items.Add(sUrl);
                }
                this.pDontNavigateNow = false;

                this.pSaveUrlList = false;
            }

            cob_url.Text = sUrl;
            TargetWebBrowser.Select();
        }