Ejemplo n.º 1
0
 /*-------------------------------------------------------------------------
  * 名称をクリップボードにコピーする
  * ---------------------------------------------------------------------------*/
 private void copy_name_to_clipboardToolStripMenuItem_Click(object sender, EventArgs e)
 {
     GvoDatabase.Find tag = get_selected_item_tag();
     if (tag == null)
     {
         return;
     }
     Clipboard.SetText(tag.NameString);
 }
Ejemplo n.º 2
0
        /*-------------------------------------------------------------------------
         * スポット表示する
         * ---------------------------------------------------------------------------*/
        private void do_spot(GvoDatabase.Find item)
        {
            if (item == null)
            {
                return;
            }

            // スポット
            m_lib.setting.req_spot_item.Request(item);
        }
Ejemplo n.º 3
0
 /*-------------------------------------------------------------------------
  * レシピ情報wikiを開く
  * 作成可能かどうか検索
  * ---------------------------------------------------------------------------*/
 private void open_recipe_wiki1_ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     GvoDatabase.Find tag = get_selected_item_tag();
     if (tag == null)
     {
         return;
     }
     if (tag.Database == null)
     {
         return;
     }
     tag.Database.OpenRecipeWiki1();
 }
Ejemplo n.º 4
0
        /*-------------------------------------------------------------------------
         * リスト内で右クリックされた
         * ---------------------------------------------------------------------------*/
        private void listView1_MouseClick(object sender, MouseEventArgs e)
        {
            if ((e.Button & MouseButtons.Right) == 0)
            {
                return;                                                                 // 右クリックのみ
            }
            GvoDatabase.Find tag = get_selected_item_tag();
            if (tag == null)
            {
                return;
            }

            // 表示位置調整
            Point pos = new Point(e.X, e.Y);

            ItemDatabaseCustom.Data db = tag.Database;
            if (db == null)
            {
                // アイテムデータベースと一致しない
                open_recipe_wiki0_ToolStripMenuItem.Enabled    = false;
                open_recipe_wiki1_ToolStripMenuItem.Enabled    = false;
                copy_all_to_clipboardToolStripMenuItem.Enabled = false;
            }
            else
            {
                copy_all_to_clipboardToolStripMenuItem.Enabled = true;
                if (db.IsSkill || db.IsReport)
                {
                    // スキルか報告
                    open_recipe_wiki0_ToolStripMenuItem.Enabled = false;
                    open_recipe_wiki1_ToolStripMenuItem.Enabled = false;
                }
                else
                {
                    if (db.IsRecipe)
                    {
                        // レシピ
                        open_recipe_wiki0_ToolStripMenuItem.Enabled = true;
                        open_recipe_wiki1_ToolStripMenuItem.Enabled = false;
                    }
                    else
                    {
                        // レシピ以外
                        open_recipe_wiki0_ToolStripMenuItem.Enabled = false;
                        open_recipe_wiki1_ToolStripMenuItem.Enabled = true;
                    }
                }
            }
            contextMenuStrip1.Show(listView1, pos);
        }
Ejemplo n.º 5
0
 /*-------------------------------------------------------------------------
  * 詳細をクリップボードにコピーする
  * ---------------------------------------------------------------------------*/
 private void copy_all_to_clipboardToolStripMenuItem_Click(object sender, EventArgs e)
 {
     GvoDatabase.Find tag = get_selected_item_tag();
     if (tag == null)
     {
         return;
     }
     if (tag.Data != null)
     {
         Clipboard.SetText(tag.Data.TooltipString);
     }
     else if (tag.Database != null)
     {
         Clipboard.SetText(tag.Database.GetToolTipString());
     }
 }
Ejemplo n.º 6
0
 /*-------------------------------------------------------------------------
  * スポットボタンの状態更新
  * ---------------------------------------------------------------------------*/
 private void update_spot_button_status()
 {
     GvoDatabase.Find tag = get_selected_item_tag();
     if (tag == null)
     {
         button3.Enabled = false;
     }
     else
     {
         if (tag.Type == GvoDatabase.Find.FindType.Database)
         {
             button3.Enabled = false;
         }
         else
         {
             button3.Enabled = true;
         }
     }
 }
Ejemplo n.º 7
0
        /*-------------------------------------------------------------------------
         * 追加する
         * ---------------------------------------------------------------------------*/
        private void add_item(ListView listview, GvoDatabase.Find i)
        {
            // フィルタ
            if (i.Type != GvoDatabase.Find.FindType.CulturalSphere)
            {
                // 文化圏以外のとき
                switch (m_lib.setting.find_filter)
                {
                case _find_filter.world_info:
                    if (i.Type == GvoDatabase.Find.FindType.Database)
                    {
                        return;
                    }
                    break;

                case _find_filter.item_database:
                    if (i.Type != GvoDatabase.Find.FindType.Database)
                    {
                        return;
                    }
                    break;

                case _find_filter.both:
                default:
                    break;
                }
            }

            ListViewItem item = new ListViewItem(i.NameString, 0);

            item.Tag         = i;
            item.ToolTipText = i.TooltipString;
            item.SubItems.Add(i.TypeString);
            item.SubItems.Add(i.SpotString);

            listview.Items.Add(item);
        }