Beispiel #1
0
        /*-------------------------------------------------------------------------
         * アイテムを作成する
         * ---------------------------------------------------------------------------*/
        private ListViewItem create_item(SeaRoutes.Voyage i, bool is_draw_show_flag)
        {
            GvoWorldInfo.Info info1     = m_db.World.FindInfo_WithoutSea(transform.ToPoint(i.MapPoint1st));
            string            _1st_name = (info1 != null)? info1.Name: "";

            GvoWorldInfo.Info info2     = m_db.World.FindInfo_WithoutSea(transform.ToPoint(i.MapPointLast));
            string            last_name = (info2 != null)? info2.Name: "";

            string show_str = (i.IsEnableDraw)? "表示": "非表示";

            if (!is_draw_show_flag)
            {
                show_str = "---";
            }

            ListViewItem item = new ListViewItem(show_str, 0);

            item.UseItemStyleForSubItems = false;
            item.Tag = i;
//			item.ToolTipText				= i.TooltipString;
            item.SubItems.Add(_1st_name + "(" + i.GamePoint1stStr + ")");
            item.SubItems.Add(last_name + "(" + i.GamePointLastString + ")");
            item.SubItems.Add(i.MaxDaysString);
            item.SubItems.Add(i.DateTimeString);

            if (is_draw_show_flag)
            {
                item.SubItems[0].ForeColor = (i.IsEnableDraw)? Color.Blue: Color.Red;
            }
            return(item);
        }
Beispiel #2
0
        /*-------------------------------------------------------------------------
         * 選択されているinfoを選択する
         * ---------------------------------------------------------------------------*/
        private void update_select_info()
        {
            GvoWorldInfo.Info info = m_item_window.info;

            if (info != null)
            {
                foreach (ListViewItem i in listView2.Items)
                {
                    object tag = i.Tag;
                    if (tag == null)
                    {
                        continue;
                    }

                    spot.spot_once s = (spot.spot_once)tag;
                    if (s.info.Name != info.Name)
                    {
                        continue;
                    }

                    // 選択状態にし、見える位置にスクロールさせる
                    i.Selected = true;
                    i.EnsureVisible();
                    i.Focused = true;
                    return;
                }
            }

            // 選択中のinfoが含まれない場合は1番目を選択状態にする
            // 文化圏のスポット時
            if (listView2.Items.Count > 0)
            {
                listView2.Items[0].Selected = true;
            }
        }
Beispiel #3
0
 /*-------------------------------------------------------------------------
  *
  * ---------------------------------------------------------------------------*/
 public spot_once(GvoWorldInfo.Info info, string name, string ex)
 {
     m_info = info;
     m_name = name;
     m_ex   = ex;
 }