Ejemplo n.º 1
0
        public void Decode(string key, int sec, IList<Att> list)
        {
            // 查询数据是否为空
            if (string.IsNullOrEmpty(key))
            {
                return;
            }
            key = _UserModel.Decode(key, sec);

            // Guid
            GuidAtt guid = new GuidAtt();
            guid.Text = _Key.RegTime;
            guid.Data = _Key.LibId;
            list.Add(guid);

            // MetaItem
            MetaAtt meta = new MetaAtt();
            meta.Text = _Key.Title;
            meta.Data = _Key.MetaKey;
            list.Add(meta);

            // LogoItem
            LogoAtt logo = new LogoAtt();
            logo.Text = _Key.IcoName;
            logo.Data = _Key.IcoMemo;
            logo.SetSpec(LogoAtt.SPEC_LOGO_DIR, _Key.IcoPath);
            logo.LargeIcon = _Key.Icon;
            list.Add(logo);

            // HintItem
            HintAtt hint = new HintAtt();
            hint.Text = _Key.Gtd == null ? "<无提醒>" : _Key.Gtd.Subject;
            hint.Data = _Key.GtdMemo;
            hint.Gtd = _Key.Gtd;
            hint.Icon = _Key.GtdIcon;
            list.Add(hint);

            // AutoItem
            AutoAtt auto = new AutoAtt();
            auto.Text = _Key.Window;
            auto.Data = _Key.Script;
            list.Add(auto);

            // 处理每一个数据
            string[] arr = key.Split(Att.SP_SQL_EE);
            int i = 0;
            int j = arr.Length - 1;
            while (i < j)
            {
                string[] tmp = arr[i].Split(Att.SP_SQL_KV);
                if (tmp.Length < 5)
                {
                    return;
                }

                if (!CharUtil.IsValidateLong(tmp[1]))
                {
                    return;
                }
                Att item = Att.GetInstance(int.Parse(tmp[1]), tmp[3], tmp[4]);
                item.Id = tmp[0];
                item.Name = tmp[2];
                item.Order = (++i).ToString();
                item.DecodeSpec(tmp, 5);
                list.Add(item);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 过时提醒
 /// </summary>
 /// <returns></returns>
 public HintAtt InitHint()
 {
     HintAtt hint = new HintAtt { Order = "提醒" };
     hint.Id = (_Key.AttIndex++).ToString();
     _AttList.Add(hint);
     return hint;
 }
Ejemplo n.º 3
0
        public bool ShowData(Att att)
        {
            _Att = att as HintAtt;

            if (_Att != null)
            {
                LlHint.Text = _Att.Text;
                TbData.Text = _Att.Data;
                PbHint.Image = _Att.Icon;
            }
            return true;
        }