コード例 #1
0
ファイル: FormBrowser.cs プロジェクト: tdenc/nicorank
        private void LoadRankFile()
        {
            if (!File.Exists(textBoxRankFilePath.Text))
            {
                MessageBox.Show("ランクファイルが存在しません。");
                return;
            }
            RankFile rank_file = new RankFile(textBoxRankFilePath.Text, new RankFileCustomFormat());

            comboBoxNavigateUrl.Items.Clear();
            for (int i = 0; i < rank_file.Count; ++i)
            {
                comboBoxNavigateUrl.Items.Add(rank_file[i] + "   " + rank_file.GetVideo(i).title);
            }
            labelInfo.Text = "読み込みました";
        }
コード例 #2
0
ファイル: FormChoicePic.cs プロジェクト: tdenc/nicorank
 private void FormChoicePic_Load(object sender, EventArgs e)
 {
     try
     {
         RankFile rank_file = iooption_.GetRankFile();
         comboBoxChoiceVideo.Items.Add(" ");
         for (int i = 0; i < rank_file.Count; ++i)
         {
             Video video = rank_file.GetVideo(i);
             // 動画ID: タイトル
             comboBoxChoiceVideo.Items.Add(video.video_id + ": " + video.title);
         }
     }
     catch (Exception err)
     {
         MessageBox.Show("エラー:" + err.Message, "エラー", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }