예제 #1
0
        public string GetText(HandbookGroup hg)
        {
            StringBuilder sb = new StringBuilder();

            if (hg != null)
            {
                foreach (Handbook hb in hg.GetAllHandbooks())
                {
                    string val = this[hb.id];
                    if (val.Trim().Length > 0)
                    {
                        if (sb.Length > 0)
                        {
                            sb.Append("; ");
                        }
                        sb.AppendFormat("{0}: {1}", hb.name, val);
                    }
                }
                if (sb.Length > 0)
                {
                    sb.Append(".");
                }
            }
            return(sb.ToString());
        }
예제 #2
0
 public void Init(HandbookGroup hg, HandbooksInfo hi)
 {
     foreach (Handbook hb in hg.GetAllHandbooks())
     {
         string val = hi[hb.id];
         if (val.Length > 0)
         {
             this[hb.id] = val;
         }
     }
 }