Ejemplo n.º 1
0
        private void buttonNavigate_Click(object sender, EventArgs e)
        {
            if (!is_already_write_)
            {
                DialogResult result = MessageBox.Show("まだ保存されていませんが続けますか?",
                                                      "確認", MessageBoxButtons.OKCancel);
                if (result == DialogResult.Cancel)
                {
                    return;
                }
            }
            string url = comboBoxNavigateUrl.Text;

            try
            {
                current_video_id_ = NicoUtil.CutNicoVideoId(url);
            }
            catch (FormatException)
            {
                MessageBox.Show("動画IDまたはURLを入力してください。");
                return;
            }
            current_start_         = -1.0;
            current_end_           = -1.0;
            textBoxVideoStart.Text = "";
            textBoxVideoEnd.Text   = "";
            navigate_kind_         = NavigateKind.FromGo;
            is_already_write_      = false;
            timer1.Enabled         = false;
            label4.Text            = "0";
            labelInfo.Text         = "";

            webBrowser1.Navigate("http://www.nicovideo.jp/watch/" + current_video_id_);
        }
Ejemplo n.º 2
0
        private void buttonWrite_Click(object sender, EventArgs e)
        {
            string video_id;

            try
            {
                video_id = NicoUtil.CutNicoVideoId(webBrowser1.Url.ToString());
            }
            catch (FormatException)
            {
                MessageBox.Show("動画IDまたはURLを入力してください。");
                return;
            }
            UpdateCutList(video_id, textBoxVideoStart.Text, textBoxVideoEnd.Text);
            is_already_write_ = true;
        }