コード例 #1
0
        public static string StatName(this string name)
        {
            string val;

            if (DbInfoHelper.Get().ItemStatNames.TryGetValue(name.ToLower(), out val))
            {
                return(val);
            }
            return(name);
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: ashllay/LQGMTool
 public MainForm()
 {
     CashCurItem   = -1;
     NormalCurItem = -1;
     CurUser       = new User();
     DataHelper    = DbInfoHelper.Get();
     InitializeComponent();
     this.Text    += " " + Application.ProductVersion.ToString();
     this.DefTitle = this.Text;
 }
コード例 #3
0
        public Mail AttachBox(DbDataReader reader)
        {
            this.MailID = reader.ReadInt64("MailID");
            string title = reader.ReadString("title");

            title      = DbInfoHelper.Get().GetMailTitle(title);
            this.Title = title;
            //Content
            this.Text = reader.ReadString("content");
            return(this);
        }
コード例 #4
0
        public Mail(DbDataReader reader)
        {
            //mailID
            this.MailID = reader.ReadInt64("RowID");
            string title = reader.ReadString("MailTitle");

            title      = DbInfoHelper.Get().GetMailTitle(title);
            this.Title = title;
            //Content
            this.Text  = reader.ReadString("MailContent");
            this.Count = reader.ReadInt32("Count");
        }
コード例 #5
0
 public override string ToString()
 {
     if (!string.IsNullOrEmpty(_Desc))
     {
         return(_Desc);
     }
     if (Type == ItemAttributeType.ENHANCE)
     {
         _Desc = "强化:" + Value;
     }
     else if (Type == ItemAttributeType.PREFIX)
     {
         EnchantInfo einfo = DbInfoHelper.Get().GetEnchant(Value);
         _Desc = "【字首】附魔:" + (einfo == null ? Value : einfo.ToString());
     }
     else if (Type == ItemAttributeType.SUFFIX)
     {
         EnchantInfo einfo = DbInfoHelper.Get().GetEnchant(Value);
         _Desc = "【字尾】附魔:" + (einfo == null ? Value : einfo.ToString());
     }
     else if (Type == ItemAttributeType.QUALITY)
     {
         _Desc = "星数:" + Arg;
     }
     else if (Type == ItemAttributeType.SYNTHESISGRADE)
     {
         _Desc = "评分:" + Value;
         if (!string.IsNullOrEmpty(Value))
         {
             string[] strs = Value.Split('/');
             if (strs.Length > 1)
             {
                 int            i    = Convert.ToInt32(strs[1]);
                 SkillBonusInfo info = new SkillBonusInfo();
                 if (DbInfoHelper.Get().SynthesisSkillBonues.TryGetValue(i, out info))
                 {
                     _Desc = "评分:" + info.GetKey() + " " + info.DESC;
                 }
             }
         }
     }
     else if (Type == ItemAttributeType.VALUE)
     {
         _Desc = Type + ":" + Value + " " + Arg + "," + Arg2;
     }
     return(_Desc);
 }