コード例 #1
0
 public new void AddParam(string key, string val)
 {
     if (key.Length == 0)
     {
         return;
     }
     if (key.StartsWith("i"))
     {
         sbImage.AddParam(key.Substring(1), val);
     }
     else
     {
         base.AddParam(key, val);
     }
 }
コード例 #2
0
        void AddParam(string key, string val)
        {
            if (key.Length == 0)
            {
                return;
            }
            char firstChar = key[0];

            switch (firstChar)
            {
            case 'p':
                sbPen.AddParam(key.Substring(1), val);
                break;

            case 's':
                if (key.StartsWith("sp"))
                {
                    sbPen2.AddParam(key.Substring(2), val);
                }
                else
                {
                    goto default;
                }
                break;

            case 'b':
                sbBrush.AddParam(key.Substring(1), val);
                break;

            case 'i':
                sbImage.AddParam(key.Substring(1), val);
                break;

            case 't':
            case 'f':
                sbText.AddParam(key, val);
                break;

            case 'e':
                sbExt.AddParam(key, val);
                break;

            default:
                string s = string.Format("{0}: {1}", Locale.Get("sbwrongparname"), key);
                AddErrorMsg(s);
                break;
            }
        }