//ライセンス情報はAgeOnフォルダのLISENCEフォルダを参照してください
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Diagnostics;
using mshtml;

using nispi.controlclass;

namespace nispi
{
    class HelpMenu
    {
        private ToolStripMenuItemParts mainMenuItemDocumentParts;
        private ToolStripMenuItemParts mainMenuItemHomePageParts;
        private ToolStripMenuItemParts mainMenuItem2chHomePageParts;
        private ToolStripMenuItemParts mainMenuItem2chSCHomePageParts;
        private ToolStripMenuItemParts mainMenuItemOpen2chHomePageParts;
        private ToolStripMenuItemParts mainMenuItemNext2chHomePageParts;

        private ToolStripMenuItemParts mainMenuItemJIKKYOHomePageParts;
        private ToolStripMenuItemParts mainMenuItemBLOGBANHomePageParts;
        private ToolStripMenuItemParts mainMenuItemSHIZUHomePageParts;

        private ToolStripMenuItemParts mainMenuItemVIP2CHHomePageParts;
        private ToolStripMenuItemParts mainMenuItemMACHIBBSHomePageParts;

        private ToolStripMenuItemParts mainMenuItemJBBSHomePageParts;

        private ToolStripMenuItemParts mainMenuItemCopyrightParts;

        public static MainForm form = null;

        public HelpMenu(ToolStripMenuItemParts menuItem)
        {
            mainMenuItemDocumentParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItemHomePageParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItem2chHomePageParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItemOpen2chHomePageParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItemCopyrightParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItem2chSCHomePageParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItemNext2chHomePageParts = ToolStripMenuItemPartsManager.Pop();

            mainMenuItemJIKKYOHomePageParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItemBLOGBANHomePageParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItemSHIZUHomePageParts = ToolStripMenuItemPartsManager.Pop();

            mainMenuItemVIP2CHHomePageParts = ToolStripMenuItemPartsManager.Pop();
            mainMenuItemMACHIBBSHomePageParts = ToolStripMenuItemPartsManager.Pop();

            mainMenuItemJBBSHomePageParts = ToolStripMenuItemPartsManager.Pop();

            mainMenuItemDocumentParts.Text = "AgeOnドキュメント";
            mainMenuItemDocumentParts.Click += new EventHandler(menuItemDocument_Click);

            mainMenuItemHomePageParts.Text = "AgeOnホームページ";
            mainMenuItemHomePageParts.Image = Resources.icon.ToBitmap();
            mainMenuItemHomePageParts.Click += new EventHandler(menuItemHomePage_Click);

            mainMenuItem2chHomePageParts.Text = "2chホームページ";
            mainMenuItem2chHomePageParts.Image = Resources.favicon_2ch;
            mainMenuItem2chHomePageParts.Click += new EventHandler(menuItem2chHomePage_Click);

            mainMenuItem2chSCHomePageParts.Text = "2chSCホームページ";
            mainMenuItem2chSCHomePageParts.Image = Resources.favicon_sc;
            mainMenuItem2chSCHomePageParts.Click += new EventHandler(menuItem2chSCHomePage_Click);

            mainMenuItemOpen2chHomePageParts.Text = "Open2chホームページ";
            mainMenuItemOpen2chHomePageParts.Image = Resources.favicon_open2ch;
            mainMenuItemOpen2chHomePageParts.Click += new EventHandler(mainMenuItemOpen2chHomePage_Click);

            mainMenuItemNext2chHomePageParts.Text = "Next2chホームページ";
            mainMenuItemNext2chHomePageParts.Image = Resources.favicon_next2ch;
            mainMenuItemNext2chHomePageParts.Click += new EventHandler(mainMenuItemNext2chHomePage_Click);

            mainMenuItemJIKKYOHomePageParts.Text = "jikkyo.orgホームページ";
            mainMenuItemJIKKYOHomePageParts.Image = Resources.favicon_jikkyo;
            mainMenuItemJIKKYOHomePageParts.Click += new EventHandler(mainMenuItemJIKKYOHomePage_Click);

            mainMenuItemBLOGBANHomePageParts.Text = "blogbanホームページ";
            mainMenuItemBLOGBANHomePageParts.Image = Resources.favicon_blogban;
            mainMenuItemBLOGBANHomePageParts.Click += new EventHandler(mainMenuItemBLOGBANHomePage_Click);

            mainMenuItemSHIZUHomePageParts.Text = "しずちゃんホームページ";
            mainMenuItemSHIZUHomePageParts.Image = Resources.favicon_shizu;
            mainMenuItemSHIZUHomePageParts.Click += new EventHandler(mainMenuItemSHIZUHomePage_Click);

            //
            mainMenuItemVIP2CHHomePageParts.Text = "VIP2chホームページ";
            mainMenuItemVIP2CHHomePageParts.Image = Resources.favicon_vip2ch;
            mainMenuItemVIP2CHHomePageParts.Click += new EventHandler(mainMenuItemVIP2CHHomePage_Click);

            mainMenuItemMACHIBBSHomePageParts.Text = "まちBBSホームページ";
            mainMenuItemMACHIBBSHomePageParts.Image = Resources.favicon_machi;
            mainMenuItemMACHIBBSHomePageParts.Click += new EventHandler(mainMenuItemMACHIBBSHomePage_Click);

            mainMenuItemJBBSHomePageParts.Text = "JBBSホームページ";
            mainMenuItemJBBSHomePageParts.Image = Resources.favicon_jbbs;
            mainMenuItemJBBSHomePageParts.Click += new EventHandler(mainMenuItemJBBSHomePage_Click);

            mainMenuItemCopyrightParts.Text = "ライセンス";
            mainMenuItemCopyrightParts.Click += new EventHandler(menuItemCopyright_Click);

            //menuItem.DropDownItemsAdd(mainMenuItemDocumentParts);
            //menuItem.DropDownItemsAdd("-");
            menuItem.DropDownItemsAdd(mainMenuItem2chHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItem2chSCHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemOpen2chHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemNext2chHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemJIKKYOHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemBLOGBANHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemSHIZUHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemVIP2CHHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemMACHIBBSHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemJBBSHomePageParts);
            menuItem.DropDownItemsAdd(mainMenuItemCopyrightParts);
            menuItem.DropDownItemsAdd("-");
            menuItem.DropDownItemsAdd(mainMenuItemHomePageParts);
            menuItem.DropDownItemsAdd("-");
            menuItem.DropDownItemsAdd(mainMenuItemCopyrightParts);
        }

        private void menuItemDocument_Click(object sender, EventArgs e)
        {
            Process.Start("http://maedanaoki.jp/software/ageon/document.html");
        }
        private void menuItemHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://maedanaoki.jp/software/ageon/index.html");
        }
        private void menuItem2chHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.2ch.net/");
        }
        private void menuItem2chSCHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.2ch.sc/");
        }
        private void mainMenuItemOpen2chHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.open2ch.net/");
        }
        private void mainMenuItemNext2chHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.next2ch.net/");
        }
        private void mainMenuItemJIKKYOHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://jikkyo.org/");
        }
        private void mainMenuItemBLOGBANHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://blogban.net/");
        }
        private void mainMenuItemSHIZUHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://shizu.0000.jp/");
        }
        private void mainMenuItemVIP2CHHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://vip2ch.com/");
        }
        private void mainMenuItemMACHIBBSHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://machi.to/");
        }
        private void mainMenuItemJBBSHomePage_Click(object sender, EventArgs e)
        {
            Process.Start("http://rentalbbs.shitaraba.com/");
        }
        private void menuItemCopyright_Click(object sender, EventArgs e)
        {
            MainFormConst.copyRightForm.Show();
        }
    }
}