示例#1
0
        void OnListItemChanged(InfoItem info, string property)
        {
            if (string.IsNullOrEmpty(info.Key))
            {
                return;
            }

            switch (property)
            {
            case "Key":
                if (string.IsNullOrEmpty(info.OldKey))
                {
                    module.SetInfo(info.Key, info.Text);
                }
                else
                {
                    module.ChangeInfo(info.OldKey, info.Key, info.Text);
                }
                break;

            default:
                module.SetInfo(info.Key, info.Text);
                break;
            }
            info.Apply();
        }
示例#2
0
 void OnItemRemoved(InfoItem item)
 {
     module.RemoveInfo(item.Key);
 }